tag:blogger.com,1999:blog-385473814989421290.post4341296983401638212..comments2017-12-12T12:23:48.029+00:00Comments on Morts Like Us: Active Record and DDDAnonymoushttp://www.blogger.com/profile/06590048937018839085noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-385473814989421290.post-3010808188938870832017-12-12T12:23:48.029+00:002017-12-12T12:23:48.029+00:00Well put. I am just wondering then, if you are bui...Well put. I am just wondering then, if you are building a Rails application, how would you then leverage DDD principles, since by default all its models utilize the ActiveRecord pattern.<br />Anonymoushttps://www.blogger.com/profile/14356741340549073360noreply@blogger.comtag:blogger.com,1999:blog-385473814989421290.post-81917622797903599902015-03-26T17:25:06.880+00:002015-03-26T17:25:06.880+00:00Hey, this is an EXCELLENT article! Thank you very ...Hey, this is an EXCELLENT article! Thank you very much! This is really impressive and insightful!阿川https://www.blogger.com/profile/01776399695037003154noreply@blogger.comtag:blogger.com,1999:blog-385473814989421290.post-31151988710872932402010-09-03T17:03:17.786+01:002010-09-03T17:03:17.786+01:00Increasing complexity of the domain logic should n...Increasing complexity of the domain logic should not mean increasing complexity of the persistance for the first place. If you u are facing situation when persistance became complex, just refactor entity to more entities. Active record is not a solution for this problem. It just makes this problem to appear later.Mike Chaliyhttp://chaliy.namenoreply@blogger.comtag:blogger.com,1999:blog-385473814989421290.post-1777027412999691582010-08-25T13:16:21.981+01:002010-08-25T13:16:21.981+01:00Good post.
Been reading Evans book, and while not ...Good post.<br />Been reading Evans book, and while not doing Active Record but rather straight NHibernate, any input on the topic and how it usually shakes out in applications is great to augment the theory I am just beginning to grasp from the book.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-385473814989421290.post-31337922452209760852010-06-15T22:36:45.470+01:002010-06-15T22:36:45.470+01:00I'm actually looking at both the Active Record...I'm actually looking at both the Active Record approach and the Domain Model + Table Module approach as specified in P for EAA.<br /><br />Personally I am leaning towards the Domain Model + Table Module approach, but with a few modifications.<br /><br />In the book a Table Module represents one table. However, in my approach it can span more than one table as I am planning to have one "Table Module" per Domain Model.<br /><br />One Domain Model would represent multiple tables (one per class). And they would technically represent one "document" that I should be able to easily move.<br /><br />I would then have multiple Domain Models per document type: e.g. Person, Case, Financial.<br /><br />When I look at the Active Record pattern, I find that there is too much work being done in one class. I'd rather have separation.<br /><br />However, when I look at Table Module approach, there is going to be a lot of repetition and knowledge of the underlying implementation. Which may be okay at the moment.Archimedes Trajanohttps://www.blogger.com/profile/15993184075121538415noreply@blogger.comtag:blogger.com,1999:blog-385473814989421290.post-6941863302285964302009-04-04T17:51:00.000+01:002009-04-04T17:51:00.000+01:00@SumodI don't know if I would wrap the AR classes ...@Sumod<BR/><BR/>I don't know if I would wrap the AR classes in the domain classes. If you insist on it, do at least define DTO-Interfaces that the AR-classes implement and code your domain classes against that interfaces.<BR/><BR/>A better approach is mapping. You could use automapper (@ codeplex) as long as possible and map manually when the models diverge.Anonymoushttps://www.blogger.com/profile/06590048937018839085noreply@blogger.comtag:blogger.com,1999:blog-385473814989421290.post-62090969545264513222009-03-26T10:55:00.000+00:002009-03-26T10:55:00.000+00:00What a timely read!I had just started down this tr...What a timely read!<BR/><BR/>I had just started down this trap when I found your post. I am currently switching from inherited Base classes to using the Mediator on my way to DDD :-) Thanks for the warning!<BR/><BR/>At this point my Domain objects map closely to the persistent structure, so I could simply wrap the AR mapped classes within the Domain classes. <BR/><BR/>But when they diverge, what approach did you find worked best for you?Sumodhttps://www.blogger.com/profile/11642670949100591146noreply@blogger.com