Architecture: Business Module, Found. Module, Service, other...

Topics: Web Client Software Factory, Project Management Forum
Jan 15, 2008 at 11:19 PM
Have I understood this correctly:

I use Business Modules for "slices of vertical functionality" or certain aspects of the model interaction from a user point of view. If, e.g. the user has four main tasks (e.g. manage orders, clients, complaints and his web site profile settings), it would be a good idea to make a Business Module for each one.

Within each BM, I have the Views, the Presenters and ONE controller.

The controller talks to the model via "Services". I implement these Services as Foundational Modules with the the WCSF.

Then I may have yet more plain class library projects, for example one for these tasks:

- one for all the business entities of the application
- one for the data access code that e.g. the Repository Factory creates for me
- one for business rules and entity conversion (to convert entities between the controller version and the database version, if necessary)
- one for Providers

And this is an important point/question: Should the controller talk to these other projects directly (I think NOT) or using a Service/Found. Module? I think so and want to use these Services as a Facade through which the Controller must communicate. One the one hand I think I am right, but on the other hand it might be convenient, if the controller could access e.g. the business entities directly.

Stuff like HTTP Modules are also plain class library projects and kind of seperate because they are invoked at a different time in the pipeline.

Where I have still no real idea where to put it and how to access it later is the stuff I would do at Application Start. Setting up one static readonly variables and such.

By the way...a chart explaning the architecture of the OrderManagement Reference Implementation would be helpful and certainly interesting. Because it does not stop at MVP, what would be good practice inside the "M" is also interesting.

A litte yes/no you got it right/wrong would be great!

Jan 16, 2008 at 8:13 PM
Thinking about it, Providers, like Membership, would also make a good Service/Found. might have different Membership Providers and different data stores depending on the situation. Then, the controller could just talk to the ASP.NET Membership API, not knowing what Provider is actually plugged....