Breeze and Web API (gui and no gui) -


i'm building new spa, , i'm having problems dealing appear conflicting concerns. wonder if breeze experts can me out?

so, on surface, spa basic crud. however, there's catch: want of functionality available web api.

that sounds fit, given breeze works on top of web api, keep feeling i'm pounding square peg round hole. can give me tow?

example of issue:

suppose have screen creating/adding widgets.

  • there validations
  • there business rules (if widget weighs on 5 lbs, call web service sends email)

so, breeze, that's pretty easy. hook efcontext provider, , hook beforesaveentity(ies) events , go town.

great, but

they want createwidget web api. it's not going acceptable client have build breeze compatible jobject bundle simulate save.

the api seem want conventional dto/domain service sort of thing. like:

string createwidget(widgetdto) 

breeze's client side library fantastic, , want able use gui app. i'm having hard time figuring out how use breeze , still separate concerns on server side domain services usable imperative api, , support unit testing

(i know can override savecore, , i've looked @ nodb example, important part says "// code go here" every avenue try smells huge hack, because really, breeze wants control of whole vertical stack on server, , want decode breeze client posts dto's can map same domain services api use, , want traffic errors raised services client (which surface excellent wzvalidate angular directive)

i have read lot of posts of people saying if feel need dto's, can use them, have come empty searching working example incorporates business logic on server. can point me resource?


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -