Geeks With Blogs

@pliekhus
  • pliekhus @RoryBecker @MillerMark You guys rock! The wasted time was for not installing it sooner. The DuplicateCodeCheck is SWEET!!! about 996 days ago
  • pliekhus @MillerMark The shame on me was for not using it earlier. I love every minute of the tool. I should have installed it on release date. about 996 days ago
  • pliekhus #DevExpress DXv2 has been out for a little bit and I just installed it. Shame on me for wasting my own time. #Coderush is a must have! about 996 days ago
  • pliekhus @mikejmonahan Enjoy the turkey festivities. We are definitely on for ribs, fun and luminary walk. My peeps will contact your peeps. Thx about 1012 days ago
  • pliekhus Looking for good deals and a TV and ran across this. You could win some new Samsung toys by following #SamsungBlackFriday about 1012 days ago

Patrick's Blog Technical Ramblings and More

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.

domainbuilder_model 

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.

domainbuilder_solutionexplorer

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 | Back to top


Comments on this post: Domain Builder Progress

No comments posted yet.
Your comment:
 (will show your gravatar)
 


Copyright © Patrick Liekhus | Powered by: GeeksWithBlogs.net | Join free