posts - 81, comments - 262, trackbacks - 0

The Unifico Framework’s Organization

One major aspect to Unifico is its organization through assemblies and namespacing. Assemblies are 'cut' by component to allow for component plug-ability. One major goal of the project is to allow for a component to be easily added to an existing site without conflicting with other equally significant components. With a few modifications (to come) Unifico allows for a whole component to be dropped in as a dll without recompilation by virtue of Structure Map. Currently, each component's assembly has to be added to structure map in a common class, the 'bootstrapper'.

Within each component there are several namespaces, which are critical to understanding a component.

  • App.Component.Controllers – Where ASP.NET MVC Controllers for the component are placed. These are clients to the service.
  • App.Component.DataAccess.Interfaces – The interfaces for the data repository(s). These are usually rather small, with a Save, Delete and Get for each model.
  • App.Component.DataAccess.SqlServer –Where the SQL specific implementation of the interface resides.
  • App.Component.Diagrams – Contains the class diagrams for the component's models.
  • App.Component.HttpModules – An optional namespace where any HttpModules for the component would reside.
  • App.Component.Models – A namespace containing the models for the component. Models are serialized when remoting is used.
  • App.Component.Models.Forms – Contains the 'Form Models', essentially requests to perform an action. For example a 'UserForm' would be populated and sent to the UserService to request a new User.
  • App.Component.Service – Defines the service for the component. It is here where the WCF and in-process service definitions are located. The 'real work' of a component is defined within the service implementation.
  • App.Component.Views – Contains any embedded views for the component. Embedding views are optional, but are used in the examples provided.

Without delving into details, that introduces the parts of a component's organization. Another aspect to a component is its physical organization. That is, where are various parts hosted in a distributed situation? The physical boundaries are defined by the interfaces, particularly the service interfaces. Within the service the application is hosted on the WCF service host. Outside of the service the application is hosted within the website.

Though very brief, I hope this helps anyone taking a look at the code. As always, any thoughts are appreciated.

Print | posted on Wednesday, December 31, 2008 7:16 PM | Filed Under [ Web Programming ]

Powered by:
Powered By Subtext Powered By ASP.NET