Any PHP framework implements ODATA protocol? [closed]
Asked Answered
C

1

9

Is there any php framework that implements odata protocol, native or by extension?

I need to use breezejs on the client and I hope I don't have to implement all the server side work of odata by myself.

in case there is no such thing, is there any alternative to breezejs?

jaydata is not an alternative, because actually it also requires the server side to implement odata protocol, so they are too similar.

Rest services, (like restangular in angularjs) are also not an alternative (not to me at least). They provide only a portion of the services of breezejs or jaydata. E.g. they don't provide caching data, change tracking or complicated rich query options.

any ideas?

thank you

Celestinecelestite answered 10/6, 2014 at 22:17 Comment(2)
There is one for laravel: github.com/Algo-Web/POData-LaravelFirstrate
Also for pure PHP: github.com/saintsystems/odata-client-php and github.com/POData/PODataFirstrate
P
4

Yes - there is an OData Producer Library for PHP which is available on github.

That might be both more and less than you need. A Breeze client basically needs three things from the server:

  1. Metadata describing the object model (which may be written by hand). OData's metadata may be inadequate because it sometimes omits foreign keys.
  2. An way to handle saving changes (I don't think the OData Producer for PHP implements this).
  3. A way to respond to the queries that your application needs.

You don't necessarily need the a full OData implementation. Look into breeze.server.php; it might be what you need.

EDIT - breeze.server.php actually uses the OData Producer Library.

Pedagogue answered 11/6, 2014 at 20:18 Comment(4)
OData Producer Library for PHP currently only supports read requests. We've tried to enhence it by the write part but with no success. Now we ended up using nodejs + jaydataserver for the server part.Municipality
Yes, OData writes are painful to implement; even Microsoft has trouble implementing the spec. Breeze doesn't use OData writes unless required; it uses a JSON save bundle by default.Pedagogue
BTW, Breeze has upcoming support for the Sequelize ORM on Nodejs, as well as a non-OData JSON query protocol.Pedagogue
From the Data Producer Library's Github repository : The OData Producer supports all Read-Only operations specified in the Protocol version 2.0. So if you want to consume Odata v4 and/or you need write access as well, you're pretty much screwed.Clandestine

© 2022 - 2024 — McMap. All rights reserved.