The Composite pattern is a very powerful design pattern that you use regularly to manipulate a group of things through the very same interface than a single thing. By doing so you don’t have to discriminate between the singular and plural cases, which often simplifies your design. Yet there are cases where you are tempted [...]
Continue Reading »
Tags: closureofoperation, composite, design, fold, functional, intentionrevealing, interface, java, language, oo, pattern, Programming, trick
Posted in Functional style, Programming • Comments Off
In the first part of this article we introduced predicates, which bring some of the benefits of functional programming to object-oriented languages such as Java, through a simple interface with one single method that returns true or false. In this second and last part, we’ll cover some more advanced notions to get the best out [...]
Continue Reading »
Tags: ddd, design, functional, interface, java, language, logic, optimization, predicate, Programming, specification, subsumption, testing, trick
Posted in Patterns, Programming, ddd • 2 Comments »
You keep hearing about functional programming that is going to take over the world, and you are still stuck to plain Java? Fear not, since you can already add a touch of functional style into your daily Java. In addition, it’s fun, saves you many lines of code and leads to fewer bugs. What is [...]
Continue Reading »
Tags: ddd, design, functional, interface, java, language, predicate, Programming, specification, trick
Posted in Programming • 6 Comments »
As suggested by its name, Domain-Driven Design is not only about Event Sourcing and CQRS. It all starts with the domain and a lot of key insights that are too easy to overlook at first. Even if you’ve read the « blue book » already, I suggest you read it again as the book is at the [...]
Continue Reading »
Tags: analysis, ddd, design, domain, insight, language, methodology, model, Programming
Posted in Programming, ddd • 1 Comment »
If you happen to create your own annotations, for instance to use with Java 6 Pluggable Annotation Processors, here are some patterns that I collected over time. Nothing new, nothing fancy, just putting everything into one place, with some proposed names.
Continue Reading »
Tags: annotation, configuration, convention, default, dependencies, design, pattern, syntax, tool, trick, xml
Posted in General, Patterns, Programming • Comments Off
Domain-Driven Design encourages to analyse the domain deeply in a process called Supple Design. In his book (the blue book) and in his talks Eric Evans gives some examples of this process, and in this blog in several parts I will suggest some sources of inspirations and some recommendations drawn from my practice in order to help about this process.
Continue Reading »
Tags: analysis, ddd, design, domain, intent, maths, pattern, Programming, theory, tree
Posted in Patterns, Programming, ddd • 1 Comment »
Consider a domain, for example an online bookshop project that we call BuyCheapBooks. The Ubiquitous Language for this domain would talk about Book, Category, Popularity, ShoppingCart etc. Business Domains From scratch, coding this domain can be quite fast, and we can play with the fully unit-tested domain layer quickly. However if we want to ship, [...]
Continue Reading »
Tags: crosscuttingconcern, ddd, design, domain, Programming
Posted in Programming, ddd • Comments Off
Small details matter because you deal with them often. Any enhancement you make thus yields a benefit often, hence a bigger overall benefit. In other words: invest small care, get big return. This is an irresistible proposal! Examples of small design-level details that I care about because I have experienced great payback from them: Using [...]
Continue Reading »
Tags: craftsman, ddd, design, domain, human, methodology, Programming, trick
Posted in Programming • Comments Off
Deciding where and how to place the annotations is not innocent. The last thing we want is to create extra maintenance effort because of the annotations. In other words, we want annotations that are stable, or that change for the same reasons and at the same time than the elements they annotate. This article suggests [...]
Continue Reading »
Tags: annotation, aop, architecture, c#, classdiagram, crosscuttingconcern, dependencies, design, domain, intent, intrinsic, java, location, pattern, Programming, stereotype, uml, use case
Posted in Programming • 1 Comment »
The concept of degrees of freedom looks so relevant to software development that I am wondering why it is not considered more often. Fortunately Michael L. Perry dedicates a full section of his blog to that concept. In this post I will quote a lot, please consider that as a sign of enthusiasm. A common [...]
Continue Reading »
Tags: analysis, ddd, design, dof, domain, education, maths, methodology, problem, Programming, solution
Posted in Programming • 1 Comment »