Remodeling the architecture

Design by data was the strategy that we used the build our systems years ago.  We have a very large database that is well normalized and our codebase reflects that.  Stored procedures are long with joins, CTEs and other techniques to extract the data for presentation.  In our codebase, we also tried to make sure that we did adhered to the DRY principles.  Just like our stored procedures the codebase is also bloated.

We are in the process of bringing our mobile site in house.  To improve our mobile experience we contracted a company that has technology that will translate the website into something more suitable for a mobile device.  This is giving us the opportunity to re  -envision our architecture and how is reflects our business.

Over the last several days, I have been analyzing our business to try to apply some of the DDD patterns.  This has been incredibly eye opening.  The battle lines that I thought were firm became a little mirky.  I started to see our business domains in a different light.

Like any other eCommerce we have our client facing website, back office operations and merchandising.  These seem to be obvious boundaries…until I took a deeper look.  Coming from a data driven designed (the other ddd)  system I took entities from the database and used them as the nouns.  I found that this left me with a lot of “things” that did not have any behavior.  For example, we have order and refunds so I started to separate the operations against the order and the refunds.

If you ask the question, can they exist independently you can see that they are not isolated.  In our business, you must have an order to which money can be refunded.  This relationship means that they shouldn’t be separated.  Once I finished doing that with all of the other nouns, our business started to look a lot different.

After I documented all of this, I started to review it with other colleagues and this started the creative juices flowing.  We moved the puzzle pieces around and re-named some of them.  The model that I drew had changed a good amount for the positive.  I think it will take a few more sessions, but I think we will soon know how our business runs and not how the data is organized.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s