Java Architecture

You should all be doing Domain Driven Design, as described by Evans. If that’s too hard, read Vernon’s’ excellent book, Implementing Domain Driven Design, which explains it all a little easier.

Command Query Responsibility Separation is a good pattern to apply.

Don’t forget to use REST as the public interface to all of your services, and to publish commands on the command bus and the resulting events on the event bus. Aggregate and lifecycle events should be published on their own bus too. Your domain model should not be srializable and should not form part of your public interface. REST and json — that’s your interface.

I don’t really care what DB I use. I hardly ever touch it. I prefer an OO db, coherence, or something similar, but really don’t care because it is transparent to me most of the time. I’d rather stay away from relational databases like oracle, but if I have to use one then it is likely to be Oracle.

For all other components, please use open-source and preferably open-standard software. Spring is great, ish, and keeps getting better (although that fact is often hidden in the noise).

TDD with JUnit and Mockito.

Gather metrics. As many as possible. They’re all useful in one way or another (except perhaps McCabe’s cyclomatic complexity metric, but that’s only because it’s a little bit wrong, though it’s easy to fix).

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your 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