The Solving Domain Problems with Aspects talk that I did at Øredev is available. The slides are not clear at all so you may want get the MOV file here and step along.
Øredev Video is Available
February 6th, 2009 § 1
Øredev 2008
August 8th, 2008 Comments Off
I’ve mentioned it in bits and pieces before but now that the nice folk at Oredev have more or less finalised their program, I can put the down the talks I will be giving in November 2008.
- Architecture Track: Designing for Modularity – one of my pet frustration and, at the same time, fun challenges.
- Agile Track: Managing Diversity in Agile Teams – based on two years of experiences at a rather tough client.
- Java Track: Solving Domain Problems with Aspects – another big challenge for me since aspects are normally used to solve application infrastructure problems.
- Workshop: Bootstrapping your SOA Project – this is a modified version of the workshop I did for IQPC earlier this year.
I certainly did not expect to be doing 4 sessions! It’s going to be a busy conference but also immense fun. I hope that I get the time to attend the other talks and learn from some amazing people. I certainly will be catching up with old friends as well
Subtleties of Ubiquitous Language
March 5th, 2008 Comments Off
There is a thought that has been floating in my mind like an infectious song over the last few weeks and it is Niclas Nilsson’s fault! He posed the question “AOP- Why don’t people get it?” The essence of AOP is the application of old fashioned patterns, mixins and interceptors, using, most commonly, run-time sub-classing techniques. Also, important is that the mixins and interceptors (i.e. the aspects) can be weaved into any object, immaterial of it’s type, place in a class hierarchy, etc. The fact that this happens at run-time in a non-linear fashion (sort of) creates this air of magic around AOP. Not to mention that AOP has some really weird terminology to describe previously well understood concepts.
Andrea Provaglio also participated in the discussion and made the observation that a style class in CSS is, perhaps, an aspect because it alters the appearance of the HTML element to which the CSS style is applied at run-time. Again, I think that if CSS was explained in the language of AOP, it would probably have taken a longer time to gain wide-spread acceptance. What CSS succeeded in doing was to apply a language set consistently, introducing new terms that could be explained using existing, easily understood terms. Even though certain terms (e.g. class) have different meanings when used in the CSS domain, these terms have a foundation in clearly understood concepts.
From a DDD perspective, the use of ubiquitous language is very apparent and thorough in the domain of AOP (i.e point cuts, join points, introductions, advices, etc.). However, I think that the bridge between the language set in the AOP domain and language set of the patterns domain and object orientation domain, from which AOP is derived, is missing. Let me clarify my point with another question: “Would AOP have gained greater acceptance and understanding if it adopted a ubiquitous language set that transitioned already understood concepts (interceptor, mixin, subclassing, etc.) to introduce the newer terms (point cut, join point, advice, etc.)?”
There are three DDD subtleties lurking here:
- Having a ubiquitous language is not enough; the language set must be easily understood and explain new terms using already understood terms. It’s like mathematics. We prove new theorems based on fundamental laws and the already proven theorems. Because we have confidence and faith in the fundamental laws and proven theorems, we gain confidence in the correctness of the new theorem. This results in the acceptance of the new theorem. Similarly, explaining new concepts in a problem domain using already understood and accepted concepts increases overall understanding.
- The ubiquitous language must aim for simplicity and high readability. If complex concepts are explained in a simple language that is highly readable, it is more likely that the concepts stand a better chance of being understood. Overall, our design and solution for the problem domain will stand a greater chance of acceptance from all stakeholders.
- As we explore and gain further understanding of the domain, our language set will change to introduce new terms, bridges between old and new terms, transitions from retired terms to superceded terms, deprecated terms, etc. This occurs during conversation and natural dialog in an attempt to gain further understanding of the domain. But we need to be aware of these changes. What we are actually doing is refactoring our ubiquitous language set. In DDD, the language of the domain is reflected in code. If we refactor our code, we are refactoring our language set. If we refactor our language set, we are refactoring our code.
DDD – Just Entities and Repositories?
February 27th, 2008 § 1
Earlier this year Jimmy Nilsson of factor10 presented a great talk entitled “Domain Driven Design – Is it more than just Entities and Repositories?” at PBT Group in Cape Town. I certainly agree with Jimmy: it is more than just entities and repositories. While the entity, value object, repository, factory and other patterns are commonly sprinkled in a rich domain model, the subtleties of DDD such as bounded contexts in strategic design are easily forgotten.
A recent article on infoq.com raised the question Can DDD be adequately implemented with DI and AOP? The arguments are valid in that infrastructure code can be best isolated from a rich domain model using AOP and DI. This is not at all different to Mats Helander’s earlier article on Looking after your domain model.
However, I cannot help the aching feeling that a large part of DDD is being lost with an often blinkered focus on the lifecycle patterns (repositories, aggregates, factories, etc.) and structural patterns (entities, value objects, services, etc.). For example, I am currently focusing a lot of energy with Tania van Niekerk (a work colleague) on the issue of designing for modularity. Modularity is deceptively complex and DDD’s strategic design (bounded contexts, anti-corruption layers, transformations, etc) is certainly helping in us finding a solution.
My take: I agree that AOP and DI do contribute in keeping infrastructure out of a domain model but, more importantly, I agree with Jimmy that there is a lot more to DDD than entities and repositories.
Looking after your domain model
January 3rd, 2008 § 1
Mats Helander has written an excellent article on how to manage your domain model with some intelligent design trade-offs. It’s a lengthy article that even manages to introduce AOP as well. If you start reading it and wonder where it’s going, just carry on reading…it is written in an evolutionary style. Nice article, Mats! UPDATE: I have written the Java equivalent of the listing in Mats’ article and attached it. The AOP part uses SpringFramework 2.5 and AspectJ.