Creating a REST-based service from a database schema

I used the NetBeans feature to automatically generate a fully basic REST service API based on a (relational) database schema. This is described at http://netbeans.org/kb/docs/websvc/rest-mysql.html

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

So far, the only infrastructure that creates an automatically found service is AppEngine-REST-Server ( http://code.google.com/p/appengine-rest-server/ ) (next to NetBeans Of course)

I have two questions

  • What other libraries should be considered?
  • Any experience with AppEngine-REST-Server?
  • Any REST experience on top of SimpleDB (and NO, Amazon has provided an HTTP API for SimpleDB not REST :-)

thanks

Seb

+7
source share
3 answers

web2py Python's web infrastructure recently added functionality to automatically generate a RESTful API based on data models defined through the database abstraction layer (DAL).

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

Please note that the web2py web descriptor function (and this RESTful API functionality) can be used as a stand-alone module, regardless of the rest of the web2py structure (i.e. you can use it with other web frames or Python programs). In addition, DAL works not only with most relational databases, but also with the Google App Engine data store (and support is also added for CouchDB and MongoDB).

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

+4
source

I created a recreation service for my site using SpringMVC 3.0. The framework is very light and friendly to create leisure services. If I were you, I would think about it. Take a look at Build RESTful Web Services with Spring 3

With this setting, you can basically wrap everything that has the Java API in a quiescent service running on a trusted and trusted Tomcat server

+1
source

Also see Yii Framework 2.0, which supports the HATEOAS REST level http://www.yiiframework.com/doc-2.0/guide-rest.html

0
source

All Articles