Question

We've recently made the decision to move away from .NET and SQL on our backend and rather implement a nodejs solution with either MySQL or postgreSQL. My server guys are putting a standard restful API in place using sequelize as the orm middleware.

Does anyone have any experience in implementing breeze in such a scenario? I understand that I'll have to define the client metadata by hand, but once this is done, do I lose any of the functionality that breeze offers in a typical .NET implementation using the EFContextProvider and server generated metadata? Also, can I use a standard restful API call, or is additional configuration required on the server side?

Was it helpful?

Solution

I think this is an exciting approach.

Breeze does not (yet) offer node-ware for this scenario. You'll have to decide what features of the ContextProvider you like and port them to node. I don't think that has to be super difficult and we'd love to help where we can. This would be a terrific contribution to the community.

What you are looking for in "a standard restful API" will determine many of your design decisions. Do you want to support OData style queries so that client code can compose queries? Or will you take a different approach?

Do you intend to have separate PUT, POST, MERGE, and DELETE calls for each resource? Or will you have some notion of "change-sets" for combining multiple save operations in a single transaction? Something in between?

Breeze favors a change-set approach out of the box. OTOH, if you want to go "straight" REST, there are RESTy Breeze dataservice adapters that suit that style with more on the way.

You can could learn a lot about the mechanics of query and change-set saves in Node by looking at how we handled them in the "breeze-mongodb" npm module referenced in the Zza sample for Node + Mongo.

OTHER TIPS

Take a look at our MongoDB example. This is the breeze client talking to a Node/MongoDB backend. It's not exactly what you are looking for but it does should how one can build a Node backend to talk to Breeze. Also feel free to contact breeze@ideablade.com about consulting in the event that you need help with or want us to implement such a backend.

As a note there are now several samples on Github using node server / breeze / [mysql|postgresql|etc...]

Docs explaining -

http://breeze.github.io/doc-node-sequelize/

Related repositories -

https://github.com/Breeze/breeze.server.node

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top