Re: Is it "allowed" to access a database in a BC from the outside?
Dennis Traub <[email protected]>
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <CAJw46f78Zyj6o-8FB4ax=xjKqdBVj=x6Nu69uD37GLn6hEyX9Q@mail.gmail.com> |
Hi Atle, Eric Evans did a couple of talks on his strategies for dealing with legacy systems. Here's a recording from Skills Matter. The descriptions of the migration strategies starts somewhere at around 28 minutes: http://skillsmatter.com/podcast/java-jee/talk-from-eric-evans/mw-3447 Cheers Dennis -- Dennis Traub Software Development Consultancy Am Bogen 7 33178 Borchen Phone: 05293/73942-73 Fax: 05293/73942-74 Mobile: 0170/2842385 Mail: [email protected] <[email protected]> On Wed, Apr 10, 2013 at 10:18 AM, atle03 <[email protected]> wrote: > ** > > > Hi all, > > Anyone out there having experience on integrating a modern, DDD-style app > with a legacy system? > > We are planning to slowly start to replace our legacy system with a set of > smaller bounded contexts written DDD style. (This also means switching from > legacy development technology to more modern tools - .NET in this case). > The legacy system is very DB-centric, and will (because of the business > value of its code base) be with us for a long time yet. This gradual > replacement can be seen as a way of using Martin Fowler's strangler > application pattern ( > http://martinfowler.com/bliki/StranglerApplication.html). An important > note is that the legacy DB contains (almost) no stored procedures, just > plain data. > > The strategy we have chosen is to let the new bounded contexts use > (subsets of) the same database as the legacy system. This means that the > repositories in each "new" BC will work towards a subset of the db tables > used by the legacy system (they store their data in the same tables). > Technically this seems to work well, but I am a bit concerned if there are > more long-term aspects of this that we haven't thought about. > > Speaking in DDD terms, I guess we should see the common database as an > shared kernel upstream to the new bounded contexts, and treat all db > changes correspondingly. The repositories in the new bounded contexts will > in addition to being a repository also act as an anti-corruption layer > towards this shared kernel. But even with an ACL, we still have to pay > special attention to database changes, since we cannot just compensate for > everything in the ACL. Over time, more and more logic will be moved into > the new bounded contexts, but for all foreseeable future the legacy will > exist and some business processes will be implemented there. > > Anyone out there with any experience they want to share? > > Regards, > Atle > > >