Silverlight + Workflow Foundation
I'm beginning work on a new project that will use WF4 for business processes and Silverlight 4 for UI.
I know that Silverlight will not host WF; I'm not interested in that.
I'm wondering whether I should
Create workflow services and add service references directly to those in Silverlight
OR
Expose the workflows through a DomainService
My workflows will be long running and will need to be persisted.
Suggesti开发者_开发百科ons?
It depends a bit on how much other logic you want to put on the server. In most cases I use the workflow service directly from the Silverlight UI Either way I would prefer to use workflow services if the workflow where long running.
Personally, I would use WCF RIA Services and just chain the WF into those endpoints (Invokes and CUDs). If you do have to deal with WFs that are not necessarily short-running then throwing in a message queue would be one way to deal with it.
I did both of the above. I started off with services, but issues with AppFabric, debugging, concurrent support of http and https, and the like made me switch to hosting the workflow in IIS (or an app server will work) and use web services for the interface.
Going that route was also really hard because none of the included workflow hosting components have enough enterprise features and I had to code them all. That is NOT easy to do and I don't think I would recommend it.
And lastly, Maurice is the only true expert I have found for WF4 outside of Microsoft (where I now work, but did not when I did the above project).
精彩评论