/Images/MainImage/Marcus Hammarberg.jpg finns inte.

Inlägg May 2009

2009-05-18 19:05

DDD – what’s the deal?

After doing DDD (on a very basic level) for sometime now, I now realize that I could benefit with some sort of sum up. Often when I reach this point I quickly realize that many people has tread this paths before and that I’m reinventing the wheel…
Well, in that case I do it for me. I like my wheels or at least my way of understanding them…

So here is my take on what the deal with DDD is (i hope that it will change over time but here is how I see it today):

I think first that the whole idea of DDD can be divided into two aspects (actually Jocke pointed me in this way but i like it):

  • first code - a bunch of design patterns that help you produce great object-oriented, testable software
  • then the implications on the way you can do software projects.

For the code part there is not much to add, or rather not much that could fit here. But what I mean is that to do DDD is “simply” to apply the patterns Domain Model, repository, aggregate, services, factories and more.

It can be quite a challenge to grasp all these patterns and put them into use at once, so I recommend a some reading, that will set your mind into DDD-mode and most of the patterns will fall into place by themselves. Or you can grab hold of an example architecture and build from that.

The other part of the story is the way that setting your brain into DDD-mode will change the way you can be agile in your project. The main idea (as I founded out, and here) is of course to focus on the model and let implementation details such as database integration, technology or even GUI be of secondary importance. Of course you cannot take in the complete universe of your problem at once so doing a small part of it and letting that evolve with time is a recommended approach. See this from Jimmy Nilsson.

This approach lend itself very well to do in the form of for example user stories and TDD. In this way you only need to focus on the part of the model that the user story is about. The next user story might tell us more about the same part of the domain model, but we don’t care now. The tests will assure us that we’re not breaking anything that already works as we progress.

So by doing DDD you automatically get a step-by-step evolving architecture and also a very good way to use an agile approach in the project.

With BDD (a subject I know very little about) you can even go further and get specifications that you verify with tests. But that is out of knowledge.


Postad av Marcus Hammarberg

Kommentarer (0)   Kategorier:  DDD



2009-05-18 18:35

S#arp Architecture

In a previous post I briefly referred to Sharp Architecture (what’s the thing with the funky spelling?).

I have now read a bit about it and I must push for it harder. It’s rock good! What an ambitious project!

The idea is to give you a boiler-plate architecture that contains best practices and useable functionality when doing DDD, TDDASP.NET MVC and NHibernate.

You know – the way you always feel when a project is done… “This is so good that it easily could be a framework, if only …” – These guys has done it for you.

It’s not done and still have a bit to go before but I really like it.

Check it out. Here are some introduction videos:


Postad av Marcus Hammarberg

Kommentarer (1)   Kategorier:  .NET    TDD    DDD



2009-05-14 10:07

Sprint Planner Helper – final

I have had some real problems to get going with the Sprint Planner Helper Project after the trip to Ethiopia. I am not sure why – but it made me think about the project, the scope and purpose.

First and foremost – I am not working, i am on parental leave. That means this is my spare time project and I promised myself that I would end it if I didn’t feel up to it for some reason. Since I have found it hard to restart I conclude that I have reached that point.

Secondly – the main reason and purpose of the project was to learn, not to produce a wonder-application (although that would have been nice :)). I think that I have learned quite a lot during this project and that I am at a junction right now. You cannot pursue at depth in all directions.

OK – what was my learning goals and where have they taken me?

DDD

The main purpose was to look into Domain Driven Design. I feel that I have got a nice grasp around that subject – and I most certainly want to learn more. I’ll write a separate post about my thoughts on DDD and it’s implications on your project.

[UPDATED]

Here is my post on DDD

TDD

When I started the Sprint Planner Helper project I liked test. Now they are a part of the way I code. Over and over again you are struck by the fact that doing test first actually improves your code quality and helps you find flaws in your code early. I like that. Might be a post on these findings also.

ASP.NET MVC

Finally a web framework from Microsoft that I understand! I’ve been doing WebForms on and off during several years and still don’t get it. Actually I don’t think many do (how many developers does fully understand the implication of this…)

After doing ASP.NET MVC during this project I can honestly say that I will surely continue and never look back. Also the community is exploding with examples, code and projects that will assist you in creating great code. And of course the introduction Nerd Dinner chapter.

I am ridiculous proud of being the number one hit on this search. Before the actual book it self!!!

Extreme OOP

Eeeh – you can’t win them all, now can you? Actually this was the one thing that I pretty soon abandoned. Not that I don’t like the rules and the way they improve your code quality but it was one thing to much to think about.

I think that if you want to learn this you’ll need to do a separate project that solely focus on extreme OOP. And that would be quite fun.

Actually, in the PDF i am linking to above, you find an exercise that’ll get you started.

Where to go now

Some other reasons for me to stop is that I have found some great resources that is much more ambitious than my feeble tries. Here are a short list of them. Be sure to check them out, I know I will:

So I hope that anyone who has read this has enjoyed it for as long as it lasted. I know that I have learned a lot and that doing this project has made me a better developer.

The code will still be available at http://sprintplannerhelper.codeplex.com/, if not contact me to get it. I might even re-start the project later.


Postad av Marcus Hammarberg

Kommentarer (0)

  RSS Feed

Marcus Hammarberg

I am a consultant with Avega working with Microsoft, .NET, system design and agile system development. When i am not working most of my time is taken up by the Salvation Army and playing my instrument, the euphonium. I am married to Elin since july 2006 and we are living in the middle of Stockholm.. In january 2008 our son Albert was born and have taken a prominent place in our hearts and lives.


Kontakt