Skip to content

February 2012

Separation of api and implementation

In every project you have to deal with apis and their implementations. While a lot of projects separate the api from it’s implementation through different java packages (mostly named internal or impl), I want to show you another approach and tell you why this approach makes more sense. I call this other approach “implementation separation by packaging artifact”. Let’s take a look at a widly used project structure that separates the api from the implementation by using a separate impl package. This kind of separation is widely used but it has a some impacts on design and api usage as I will show now. Api and implementation dependencies differ The… Read More »Separation of api and implementation

Simplify service layer design using bean validation – jsr-303

Some weeks ago I wrote a blog about Pros and cons of service layer designs. While that blog addresses the service layer design with pure java, this blog is about a service layer design using java bean validation as defined by jsr-303. Both strategies that I have discussed in the Pros and cons of service layer designs blog can be implemented easier by using the java bean validation framework. Let’s take a look at the shared request and response type strategy. The problem of this strategy is that the request and response types are used in a lot of different service methods and therefore they must define the properties of all… Read More »Simplify service layer design using bean validation – jsr-303

GDPR Cookie Consent with Real Cookie Banner