Schema Changes...

Topics: Architecture
Coordinator
Aug 23, 2011 at 2:48 PM

I think the model is pretty solid breaking the massive Data Table Library in to very finite Entities to target a form and or functionality will allow the entity models to remain lean and very descriptive keeping the joins very visible and should allot for any scale required for the targeted form and functionality...

The one thing I struggle with is schema changes...  Whenever a table requires an additional field which will happen very often and or a entity will require an additional table or even may require a fix to an eroneous join...  Regardles schema changes will occur and at that moment they are painful...  You have to delete the entity and domain service and then reinstantiate them to pick up the schema changes...

We can alleviate the pain somewhat by creating a partial class of the Domain Service allotting us to keep custom Domain Service Methods as to not lose them on every schema change...

Is their anyone interestes in taking the model Company/Plant model that is currently posted and creating a couple of partial classes to pull this off?  And or do we have a better mouse trap here.  At the very least we should definately create a partial class of the domain service allotting us to only ever have the auto generated code in the domain service as to not lose any custom code that was added above and beyond the auto generated domain service code...

Coordinator
Aug 23, 2011 at 10:08 PM

I figured it out.  Simple enough I added another Class directly below the CompanyDomainService.cs called CompanyDomainServiceExtended.cs.  I then made the them both partial and wahla it is like they are one class we can keep the auto generated code unscathed and then add all the custom logic to the extended.cs...

I will the modifications to the CompanyPlant Example and repost it...