On 2 March 2018 at 04:43, Paul Norman <[email protected]> wrote: > I wrote a blog post on how to get started with the API projects: > http://paulnorman.ca/blog/2018/02/make-the-website-use-the-api-gsoc-project/ > > I recommend steps 2, 4, and 5 for anyone applying for a project which > interacts with the API.
It would be remiss of me to point out that I don't think this project is a good idea. Although I said similar things last year ( https://lists.openstreetmap.org/pipermail/dev/2017-February/029702.html ) I'll say it again now. The idea of having a single-page javascript app to replace the browse pages is overcomplicating a problem that barely exists. We would then have a browser asking the website for some javascript code, which then runs and asks the website for some API request. The website will fetch the data from the database, construct a response in XML, then the javascript decodes that, and finally constructs some html for the user to view. Much simpler, in my view, to have the browser make a request, and the server to respond with the html required. Now what would be useful is some refactoring of the code. Currently we have app/controllers/browse_controller.rb#way which returns some html representing a way, and also completely separate code at app/controllers/way_controller.rb#read which returns some XML, also representing the same way. I don't think we need different controllers just to return responses in different formats. So I'd like to see the browse pages refactored to use the same code as the XML api, but that's quite different from what is being proposed in this GSoC project. Thanks, Andy _______________________________________________ dev mailing list [email protected] https://lists.openstreetmap.org/listinfo/dev

