I know it's been awhile since I last posted, but let's blame it on the holidays.
Anyway, what I wanted to post today are screen shots of the latest working code. First I'll start with what the domain builder interface looks like. It leverages the DSL (Domain Specific Language) interface as part of the Visual Studio SDK package. Click on the picture below for a closer look.
The model represented above has all entities sharing common attributes and thus inherit from the BaseEntity class. You will also notice that each entity has an italicized name under it. This represents the table name that the entity relates to. Remember that this diagram will code generate the business layer using CSLA, the data layer using NHibernate and then generates the model view/presenter layers for reusability. Note the solution explorer below. This shows the layers that are generated for you. Again, click on the image for a closer look.
The Domain Builder tool generates each of the layers above and adds the appropriate references that it needs. Here are the layers that are generated and my reasoning behind it.
|Layer ||Description |
|Business ||Utilized CSLA and handles the RootBusinessEntity for each entity in the model. |
|BusinessListLayer ||Utilized CSLA and handles the RootListEntity for each of the entities in the model. |
|DataAccessLayer ||Generates the property to column mapping using NHibernate. Each class uses ActiveRecord to handle the mapping in an easier format. |
|Interfaces ||Generates an interface for each entity in the diagram so that the mapping between CSLA and NHibernate can be coded easier. Also, you should be coding for an interface and not for the actual implementation. |
|Presenter ||Currently generates a list and detail presenter for each of the entities in the diagram. This still needs some attention, but I like where it is currently headed. |
|QueryLayer ||This is one of the more interesting layers. This layer is generated based upon Ayende's Query Builder and create a "LINQ-like" interface for 2.0. This generates an API so that you can do something like the following: |
List list = List.Retrieve(Where.Entity.Property.Eq(Value)); -> reads much easier and simplifies the code drastically.
|View ||Creates the views for the detail and list presenters. These are just interfaces that represent what the view should provide. |
There are more details to come, but I wanted to update whoever was still listening. Thanks.
| posted on Thursday, January 3, 2008 11:24 PM