Hot Posts

Design Patterns

Java EE Revisits Design Patterns

March 12, 2016 // 0 Comments

This and subsequent posts are a write up of my Java EE revisits design patterns talk at jDay Sweden 2016. The slides to the presentation are viewable here: Java EE Revisits Design Patterns and a video of the presentation will be made available as soon as jDays publish it. The book that accompanies this talk is available from Amazon. Master Java EE [ continue reading ... ]

Design patterns: the beginning

March 12, 2016 // 2 Comments

The beginning Where did they come from? Did they just appear overnight? In fact, design patterns have a long history starting way before computing. But it wasn’t really until the GOF wrote their seminal book Design Patterns: Elements of Reusable Object-Oriented Software, that the concept of design patterns was cemented in the world of software [ continue reading ... ]

Singleton Pattern

March 12, 2016 // 0 Comments

OK let’s have a look at our first pattern. The singleton pattern is one of the most well-known design patterns and is used extensively by frameworks such as Spring, pool mangers and loggers. If you read the GoF book, it’s about having a single instance of an object in the JVM which is only ever instantiated once within the life-cycle of the [ continue reading ... ]

Factory pattern

March 12, 2016 // 0 Comments

The factory pattern is a creational design pattern whose intent is to provide an interface for creating families of related or dependent objects without specifying their concrete classes. The creational logic is encapsulated within the factory which either provides a method for its creation or delegates the creation of the object to a subclass. [ continue reading ... ]

Façade Pattern

March 12, 2016 // 0 Comments

The simple definition is that it hides the complex logic and provides an interface to the client. Sounds familiar? This is nothing much more than the core part of abstraction: one of the core principles of object orientation. I often post about Java EE on Twitter. Click to Follow @readlearncode So what is special about this and why does it deserve [ continue reading ... ]

Decorator Pattern

March 12, 2016 // 0 Comments

I often post about design patterns on Twitter. Follow me here Follow @alextheedom The decorator pattern is one of the GoF Structural Pattern and dynamically adds logic to an object. Instead of inheritance the decorator adds functionality at run time. They introduce a huge amount of flexibility. In the classical implementation both decorator and [ continue reading ... ]

Observer Pattern

March 12, 2016 // 0 Comments

A little bit difficult to understand why it is needed in the first place and it goes down to the basic fundamental requirement of OO systems which is to pass a message from one object to another telling the object to do something as a result of a state change on another object but the big difference here verse simply invoking a method on a [ continue reading ... ]

Java EE revisits the Factory Pattern

December 12, 2015 // 2 Comments

The factory pattern is a creational design pattern whose intent is to provide an interface for creating families of related or dependent objects without specifying their concrete classes. The creational logic is encapsulated within the factory which either provides a method for its creation or delegates the creation of the object to a subclass. [ continue reading ... ]

Context Dependency Injection

November 23, 2015 // 0 Comments

The Java EE programming model has been simplified substantially since J2EE. Annotations have replaced the XML description files, convention over configuration have replaced the tedious manual configuration and dependency injection hides the creation and look up of resources. Resources are created and injected at injection points marked by [ continue reading ... ]

The beginning of Design Patterns

November 23, 2015 // 0 Comments

The beginning Did they just appear overnight? Where did they come from? In fact design patterns have a long history starting way before computing, in architecture. That’s the construction type of architecture. But it wasn’t really until the GOF wrote their seminal book Design patterns, that the concept of design patterns was cemented in [ continue reading ... ]