I am about to build a web application that shares resources through a Restful API.
It struck me that CouchDB already has a good Restful API layer.
So why would I create my own one.
Couldn't I just let other web applications use my resources (json documents) on CouchDB through it's Restful API directly instead of node.js being the middleman?
Or will I need some logic in between CouchDB and 3rd party web applications?
Haven't yet used CouchDB so I don't know if it's capable of handling advanced authorization and if the "design document javascript" applications are as good as "node.js javascript".
The CouchDB database has a REST API which allows you to work with the database's JSON documents. With this API, you can create your own requests right in ReadyAPI to work with JSON documents inside the database and get the necessary data from the CouchDB server.
REST is an API (Application Programming Interface) in the Application Layer.
A REST API is a way of easily accessing web services. When a RESTful API is called, the server will transfer to the client a representation of the state of the requested resource.
There are several reason why you want to build your own thin layer in between:
For myself, I built a RESTful API using CouchDB and node.js. Due to the fact that both use JSON, the necessary overhead is still very small, but you have the full flexibility of your 100% own middle tier code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With