📜 ⬆️ ⬇️

Data Management with the OData Protocol

Open Data Protocol ( OData ) is an open web protocol for querying and updating data. The protocol allows you to perform operations with resources using HTTP commands as requests and exchange data in JSON or XML formats.

OData is one of the best standards for creating a RESTful API.

You can request data using simple HTTP requests, for example:
https://samples.databoom.space/api1/sampledb/collections/persons?$filter=firstname eq 'Lamar'
Find all the people by the name of Lamar.

OData allows you to set a huge number of parameters that allow you to create very complex queries to the data source, for example:
https://samples.databoom.space/api1/sampledb/collections/books?$filter=publisher/president/likes/author/firstname eq 'Georgie' & $ top = 10 & $ orderby = title
Select all the books that satisfy the following condition: the president of the publishing house in which the book is published loves a book by a certain author with the name “Georgie”. The result of the query must be sorted by title, issue the first 10 books.

The OData query language is comparable in power to SQL.

')

Basic OData features




Libraries to work with OData


Currently there are a large number of libraries that support the OData protocol, and new ones appear every day.
In particular, JavaScript libraries such as Kendo UI , DevExtreme Web , Syncfusion HTML5 controls , Infragistics HTML5 controls , OpenUI5 , Wijmo , JayData , Breeze.js , datajs , ODataJS , angular-odata , etc. work with OData. There are also libraries for Java, .NET, C ++, Python, Objective-C, etc.

Many of these libraries greatly simplify the development of complex applications thanks to the OData standard. For example, it is sufficient for the grid control to specify the URL to the OData server and it will do everything else: paging, sorting, adding-modification-deleting records, filtering data, grouping, etc.

NitrosBase.js - ready OData server


NitrosBase.js is a ready-to-use OData server. It gives you the opportunity to create a database, add arbitrary JSON objects without a description of the data schema, and make OData requests for receiving and modifying data.

The classic scenario of using NitrosBase.js is the rapid development of prototype applications that work with an OData server. When developing a prototype, you can simply put the necessary controls on the form, and they immediately work without creating server codes. If you add, delete fields in JavaScript objects, modify connections between objects, you do not have to change the database schema and modify server codes. At the same time, it allows you to perform queries of any complexity.

Having developed a living prototype of the application, you get the complete specification of your API and the well-established data scheme. Now you can start developing the server or leave NitrosBase.js

NitrosBase.js is our new project ( http://databoom.space ) and we would like to hear the recommendations of the community for the improvement and development of the project.

Source: https://habr.com/ru/post/250913/


All Articles