Reputation: 195
The google app engine documentation uses JS to build the frontend functionality for their google cloud endpoints. https://cloud.google.com/appengine/docs/python/endpoints/getstarted/clients/js/client_ui
It seems overly complicated.
Could I use python and my jinja2 templates to collect user data and redirect it to the endpoints with the handlers, without using any JS?
i.e. my request.handler collects the required info, redirects it to a specific endpoint that creates the ndb compatible Model, sends it to the database and returns a success.
Is that a good way to implement my application logic?
Upvotes: 0
Views: 355
Reputation: 599600
If you don't want to write a JS app, there's no reason to use the cloud endpoints at all; just write an AppEngine app in Python and Jinja and use the standard ndb calls to write to the datastore.
Edit of course you can post to the endpoints using any language you like - they're just HTTP, after all - but I really can't see why you would want to. Most of the complexity in an app is in defining the models correctly in the first place; adding the endpoints on top of that is something you would do only when you actually need to extend the app to other platforms. Don't build things you might need later; build what you need now, and the rest when you do need it.
Upvotes: 2