Joppa
Joppa

Reputation: 25

BreezeJS REST saveChanges

I've been pouring over BreezeJS documentation and stackoverflow posts looking for definitive information on using BreezeJS to interact with a REST tier (not .NET) that supports CRUD operations. I've read a number of posts that clearly communicates the philosophy behind the default behavior of saveChanges() which sends a collection of updated entities to the server. While creating server-side code to handle this may be possible it is likely that won't be our preferred path and yes, I do understand that there are transactional and state issues that decision would inflict on the client code.

In my searches on stackoverflow I've found a number of questions that are similar to mine, but those questions are all relatively old (at least for JavaScript libraries) - (ex. Save changes to RESTful URLS with Breeze JS).

Some of those posts, including the one above, seem to indicate that work is/has been done to address the desire to do CRUD operations via normal REST operations.

Finally my questions: What is the current state of BreezeJS with regard to supporting RESTful CRUD operations? If I choose to manage the entity updates via a named save operation what kinds of hoops will I need to jump through to get Breeze to send those CRUD operations to my REST tier? What else am I missing in my summary above that will make CRUD operations from BreezeJS to a REST tier challenging?

Note: our JavaScript framework is Angular.

Upvotes: 2

Views: 327

Answers (1)

Ward
Ward

Reputation: 17863

I do understand your question and your perspective. I haven't had time to document how to do this yet.

You'll find clues in the "breeze.ccjsActiveRecordDataServiceAdapter.js" in the CC-JS Ruby sample. That adapter is easy to examine in github.And also in the "breeze.labs.dataservice.sharepoint" adapter which you can examine in github.

Both adapters target servers that want PUT/POST/DELETE to specific per-type endpoints (and do not understand "batch saves").

Intend to do a thorough presentation and sample for these "REST CRUD" scenarios "soon" ... but probably not before May.

Upvotes: 1

Related Questions