Giter Club home page Giter Club logo

Comments (9)

chekoopa avatar chekoopa commented on July 4, 2024 1

not sure why would anyone prefer simple REST APIs.

Because it is

simple

as you may generate the output without any dependencies, and it would work.

from mycorrhiza.

chekoopa avatar chekoopa commented on July 4, 2024 1

I'd propose using /api or /json base route and /<api/json>/about instead of /mycorrhiza, though.

from mycorrhiza.

handlerug avatar handlerug commented on July 4, 2024 1

as you may generate the output without any dependencies, and it would work.

What do you mean "without dependencies"? What dependencies do you need to make a single POST request?

from mycorrhiza.

chekoopa avatar chekoopa commented on July 4, 2024 1

Stop butthurting, please. At least we have a kind of common ground that we should change existing JSON API to utilize encoding/json. Sure, it is nearly standard, so why not.

The point which started the discussion is usage of more complex API, like GraphQL. My opinion is that plain JSON API complies the project's philosophy of sm0lness, nothing more, nothing less.

from mycorrhiza.

handlerug avatar handlerug commented on July 4, 2024

To be honest, GraphQL is much more robust and efficient. Not sure why would anyone prefer simple REST APIs.

from mycorrhiza.

chekoopa avatar chekoopa commented on July 4, 2024

What do you mean "without dependencies"?

I literally mean that Mycorrhiza generates JSON output from a template file. Cheap, easy, just working.

What dependencies do you need to make a single POST request?

If you don't need to provide JSON data as an input, it's nothing above we already have. If you do need, encoding/json is out-of-the-box, AFAIK. GraphQL, on the other hand, does require at least graphql-go, if not more.

from mycorrhiza.

handlerug avatar handlerug commented on July 4, 2024

I literally mean that Mycorrhiza generates JSON output from a template file. Cheap, easy, just working.

What the fuck why would you use templates for generating JSON responses, encoding/json is already used everywhere and GraphQL responses are encoded as JSON too

If you don't need to provide JSON data as an input, it's nothing above we already have. If you do need, encoding/json is out-of-the-box, AFAIK. GraphQL, on the other hand, does require at least graphql-go, if not more.

That's, like, an encoding library every proper language has?

from mycorrhiza.

bouncepaw avatar bouncepaw commented on July 4, 2024

Just to note, I've dropped both -json URLs some time ago

from mycorrhiza.

bouncepaw avatar bouncepaw commented on July 4, 2024

Unclear. Maybe add something about Betula and ActivityPub. There's no real issue yet, so closing for now.

from mycorrhiza.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.