14 04, 2014

Stateless Rest Service Authentication

By |April 14th, 2014|Architecture & Design, Security|0 Comments

REST Services are considered stateless. Therfore a Rest Service must not hold any client state. If so REST Services can be scaled easily by adding new server nodes without to worry about session replication. But this also means that a REST-Client must send all authentication information with every request. There are several techniques to […]

24 09, 2013

A type-safe named query design approach for JPA

By |September 24th, 2013|Architecture & Design|0 Comments

20 07, 2013

The MVC pattern implemented with java swing

By |July 20th, 2013|Architecture & Design, JDK|8 Comments

MVC Pattern Basics
The MVC pattern describes a way to organize the components of a graphical user interface. Therefore it must cover all aspects of a user’s interaction with an application.
If we take an analytic look at a graphical user interface we will understand why the MVC pattern is composed of the 3 elements model, […]

26 02, 2012

Separation of api and implementation

By |February 26th, 2012|Architecture & Design, Maven|2 Comments

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 […]

5 02, 2012

Simplify service layer design using bean validation – jsr-303

By |February 5th, 2012|Architecture & Design|0 Comments

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 […]

23 01, 2012

Impact of proxy on equals and hashCode

By |January 23rd, 2012|Architecture & Design, Hibernate, Spring|0 Comments

A lot of frameworks create proxies  to apply aspect oriented programming or the lazy loading pattern.

Hibernate for example uses cglib or javasissit to create lazy loading proxies. The famous springframework mainly uses java proxyies created via java.lang.reflect.Proxy.newProxyInstance(ClassLoader, Class<?>[], InvocationHandler) or cglib as well.
Therefore it is important to know exactly how proxies work and the […]

12 01, 2012

Pros and cons of service layer designs

By |January 12th, 2012|Architecture & Design|2 Comments

A service layer is a common approach in enterprise applications to encapsulage application specific use cases. So when I talk about service layers I mean the service layer pattern as described in the “pattern of enterprise application architecture” book by Martin Fowler.
While the pattern describes the responsibility of a service layer from a high […]

2 01, 2012

Handling complex object state with design

By |January 2nd, 2012|Apache Commons, Architecture & Design|0 Comments

Some APIs that implement a complex object state management often violate the single responsibility principle and make the usage very difficult. When you do all aspects of the complex state management in one inferface the interface’s methods must be invoked in the chronological correct order. Such APIs are hard to understand and to integrate. What […]

8 10, 2011

Impact of native sql queries on hibernate’s second level cache

By |October 8th, 2011|Architecture & Design, Hibernate|1 Comment

1 10, 2011

Anemic vs. Rich Domain Models

By |October 1st, 2011|Architecture & Design|3 Comments

There are a lot of discussions about rich and anemic domain models. Some developers tend to praise the anemic model, because of it’s simplicity while other blame the anemic model for it’s simplicity and they pray for the rich domain model.

In this blog I want to show both models, the advantages and disadvantages that […]