On 2010-10-12 21.51, Niclas Hedhman wrote:
I guess some of our friends in Jayway have been involved of Appendix E
in http://www.leansoftwarearchitecture.com/home/table-of-contents

Enough for me to buy it.

Yeah, I worked with Jim on that. Although, my understanding of DCI has progressed a lot since I did that, and how I do it now is different from then. In Streamflow we now know how to do this properly, and with REST as a frontend to it all, but still have not migrated to actually do it. I'll ping the list when it's done, so you can see what the structure looks like.

Basically:
- REST code receives HTTP request
 - Look up entities in UoW based on URL path/query args
 - Validate authorization rules
 - Validate that selection of objects is ok
 - When a query/command is reached in the URL create a context
- Context is instantiated with object->role mapping
 - Interaction on context is invoked
 - Delegate to roles
- Roles validate business rules and delegates to data model

That's pretty much it, and IMO properly separates what each layer is supposed to do. And it makes for a fully compliant REST API, with HATEOAS support.

/Rickard


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to