Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Asp.Net MVC + CSLA + DDD Possible

I was asked to review a system the other day that was based on ASP.NET MVC + CSLA + DDD (domain drive design). The first version of this system was based on ASP.NET MVC + CSLA. The second release was based on that plus added DDD. The reason is because..... well, I don't know what. As I looked at the diagrams from the two different architectures, it was pretty apparent that the second version was extremely more complex. The CSLA objects basically used the Domain objects. When you see something like this you know it already smells but it is hard to justify why someone shouldn't do it this way without A) having extreme knowledge of all topics or B) using it for a long time. I have neither of these for this topic but I know if I'd built this from scratch I wouldn't have done it this way, nor wouldn't a lot of developers I associate with.

So, dear reader, what would you do in this situation? My thoughts are that if you want to use CSLA and MVC and DDD then you make a stand and chose one or another (CSLA or DDD). If you don't there are too many cooks in the kitchen.

Please shed some insight if you have opinions on this matter.

like image 349
Keith Elder Avatar asked Oct 15 '22 16:10

Keith Elder


2 Answers

My thoughts are that if you want to use CSLA and MVC and DDD then you make a stand and chose one or another (CSLA or DDD). If you don't there are too many cooks in the kitchen.

I tend to agree with you there. If someone wants to do DDD with an already flushed out DDD friendly architecture + supporting frameworks, I'd recommend S#arp Architecture over CSLA.

That being said, some people feel it is possible to take on some of the aspects of DDD using CSLA. Obviously a DDD purist would probably cringe at that prospect, but you don't have to be a purist to gain something from DDD. Derick Bailey has an interesting blog regarding the topic: http://www.avocadosoftware.com/csblogs/dredge/archive/2007/02/19/687.aspx

like image 120
Daniel Auger Avatar answered Oct 18 '22 23:10

Daniel Auger


In my opinion, CSLA shot itself in its foot with the latest version. Opinions differ, but it's so wrong, in my book, when an object has to know if it is a child or not.

like image 44
Thomas Eyde Avatar answered Oct 18 '22 21:10

Thomas Eyde