Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate REST based service from database schema [closed]

I used NetBeans' possibility to generate a fully fledge REST base service API automatically, based on a (relational) database schema. This is documented at http://netbeans.org/kb/docs/websvc/rest-mysql.html

I am looking for similar capabilities for other DB (NoSQL ... such as AWS SimpleDB or GAE DataStore) or other language such as Python, i.e. a tool that generates automatically all this boiler plate code. There is no added value to create a one-to-one map between objects and REST services. This should be done automatically by all frameworks.

So far, the only one framework generating the service automatically I found is AppEngine-REST-Server (http://code.google.com/p/appengine-rest-server/) (beside NetBeans of course)

I have two questions

  • What other libraries should I consider ?
  • Any experience with AppEngine-REST-Server ?
  • Any REST experience on top of SimpleDB (and NO, the Amazon provided HTTP API for SimpleDB is not REST :-)

Thanks

Seb

like image 261
Sébastien Stormacq Avatar asked May 05 '11 14:05

Sébastien Stormacq


2 Answers

The web2py Python web framework recently added functionality to automatically generate RESTful APIs based on data models defined via its database abstraction layer (DAL).

If you have an existing database schema, you'll need to model it using the web2py DAL in order to use this new RESTful API functionality. To make this easier, there are scripts to automatically generate web2py DAL models from existing MySQL and PostgreSQL databases (the scripts could probably be adapted easily for other databases as well).

Note, the web2py DAL (and this RESTful API functionality) can be used as a standalone module, independent of the rest of the web2py framework (i.e., you can use it with other web frameworks or Python programs). Also, the DAL not only works with most relational databases, but also with the Google App Engine datastore (and support is being added for CouchDB and MongoDB as well).

If you have any questions, feel free to ask on the web2py mailing list. We'd also be happy to get feedback on the new REST functionality.

like image 179
Anthony Avatar answered Sep 17 '22 07:09

Anthony


I created a rest service for my site using SpringMVC 3.0. The framework is very easy and friendly towards creating rest services. If I were you, I would consider this. Take a look at Build RESTful web services using Spring 3

With this setup, you can basically wrap anything that has a Java API into a rest service running on the tried and tested Tomcat server

like image 39
Danish Avatar answered Sep 20 '22 07:09

Danish