Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom endpoints #99

Open
irfinnew opened this issue Jul 24, 2018 · 1 comment
Open

Custom endpoints #99

irfinnew opened this issue Jul 24, 2018 · 1 comment

Comments

@irfinnew
Copy link

We've reached the point where Binders API is so generic and powerful that we have no idea what the front-end can do (and does) anymore. We're starting to realize that this genericity is starting to hurt us.

My opinion is that we should do away with it all, and use purpose-specific endpoints. These endpoints should be able to draw from a large assortment of Binder pooling to make it very easy to support the standard Binder API things, so that these endpoints still provide a uniform API experience to the front-end with minimum effort while giving the back-end back its control over the data.

Some Binder tooling that should be available for this:

  • Parsing, validating request paths; for example, it should be trivial to specify what fields the FE can filter on, or must filter on.
  • Parsing, validating request bodies; it should be easy to translate the json to Model instances which the endpoint can then further validate or adjust.
  • Serializing to json (including complex relations, with-style).
  • Permission checking, perhaps in a more "manual" / fine-grained way than the generic system.
  • Various reusable validation utilities, perhaps through the models in question.

Perhaps all this can be realized by somewhat restructuring the current Binder flow to use better defined data in the process (more models, less json dicts?), and providing much much better hooks to influence the request. Or perhaps a more radical departure is better. I honestly have no idea, most of this is wild brainstorming and vague notions. It needs reseach, and concrete proposals.

@irfinnew
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants