Reputation: 3389
We are planning to develop a JavaScript API to expose some of our Java EE based services. We are doing this keeping Google Maps API in mind. Can someone please suggested where we should start and the approaches that we need to follow to create a useful and extensible JavaScript API? Any suggestion will be greatly helpful for us.
Upvotes: 0
Views: 392
Reputation: 2008
Definitely look to make it a RESTful JSON Api and then you'll be able to use it for various purposes. APIs like twitter et. al. are good models (although there is a lot of back and forth about what is completely REST).
I'm a big fan of Mike Pearce's take on how to design good APIs: http://blog.mikepearce.net/2010/08/08/api-anti-patterns-how-not-to-write-a-restful-api/
Upvotes: 0
Reputation: 4814
More than google maps, I think you should look at twitter which has a very nice REST API. (https://dev.twitter.com/docs/api) REST is the key of building your API.
Part from that, you should also think about generating API keys, so you have control about who is doing what with your services
Also that seems like a good reading to start:
http://blog.steveklabnik.com/posts/2011-07-03-nobody-understands-rest-or-http
Upvotes: 1