0Data (Thoughts/Questions)

Discussion in 'General Webmaster Support' started by rover2341, Sep 22, 2014.

  1. rover2341

    rover2341 Is riding a roller coaster...Wee!

    +114 / 0 / -0
    What Is 0Data

    The purpose of the Open Data protocol (hereafter referred to as OData) is to provide a REST-based protocol for CRUD-style operations (Create, Read, Update and Delete) against resources exposed as data services.

    You setup rights and rules, and put in the framework. after this is done then the client can query the db directly using oDatas query lanq. You can do things like paging or grouping tables.


    Lets say you have 100 fields, and the website really just needs 10 apis, pulling different amounts of data and pushing different amounts of data back.

    And then lets say all of those apis change slightly and need 1 more thing in them or 1 less. Now you need to rewrite the api, rewrite the JavaScript that calls it (at least for the update ones).

    With OData you could just ask for the data your allowed, and it will give it too you. Zero API Changes required.
    That only needs changed when the rules on the data (tables, and table cols) you can read, or write to change.

    oData like Fully Restful APIs, require no documentation, as all the data can be obtained by hitting the top node. and working your way downward.

    oData is already in nearly all Microsoft products since 2010. After this its setup, i can go to excel put in my login (assuming required) and then pull down any data i want.

    • Data Control - Lets say they cant see your own ssn anymore, you change it one spot. and done. the people calling have no more rights to it.
    • 90% of APIs cant reduced and used though this. some that need exactly 4 fields and then need to run some c# and additional business logic would be better served using a standard API
    • Very Open, When a API needs to add one more field, then it can be done straight on the client, its not required to go back and add or change in existing api.

    • Most Webpages that get info put into them are put in before hte page is even sent, reducing the usefulness of oData. As it may be done in php or C# ect anyway.
    • Additional Layer of complexity.
    • Could be considered less testable. as before all the apis had one less layer. And they total amount of openess of the db was extremely reduced to just the few things that were really required.
    • Due to the openness, the risks are higher, if the rules arnt setup correctly someone could wipe the entire db. Also they could access more then they should if things were not setup correctly.
    My Use Case

    We have 4 programmers, 1 is more of designer but does some JavaScript. For the most part we pull from the same data sources. But often a page needs a field added or removed or an additional api needs made to get more data, and another changed.

    Some times I do all the parts. (Add/Update API, Update/Add JavaScript call to push or pull the from the api correctly) This may not seem like a big deal. But it IS. More often then now after this is done, there is more changes required! as things change so often its some times madding. but i have accepted that's my fate things are gona change and they gona change often, I have no control over this.

    But when i have those 2 things done and i am working with someone else, (or just my self) it can take hours to go back and forth, for small changes. Huge waste of my time I could be reading comics...i mean working.
    So With this setup, It removes the need to EVER change the apis unless there on of the 10%..

    I am trying to figure out if its worth implementing this or more of the pros and cons. not just for my use case but in general. Id like more opinions on this.

  2. jonas

    jonas Well-Known Member

    +42 / 4 / -0
    Well, do you find yourself in such a situation frequently (it can take hours to go back and forth, for small changes)?
    Would it be more fun for you *and your team members* to develop with that API in those cases?

    I never used oData, but it looks like a lot of fun. I can think of many scenarios where it might have been useful, but you should check if your team likes working with it.

Share This Page