This time I want to talk about Strategy design pattern. In this way I start articles about behavioral design patterns. These kind of patterns represent some schemas of interaction between objects to make a code more flexible and well organized.The most essential point of this approach is loose coupling between objects.
Posts By Alex Fruzenshtein
It's hard to imagine a web-application which doesn't has some validation logic for an user data. Almost all user's data has some constraints, e.g. date of birth should consist of day, month, year etc. Spring MVC has its own solution for the data validation, and it's become available with the help of Validator interface.
The one of the most simplest things which you can implement in your application is MessageSource. Of course it make sense only after you have set up basic settings for a Spring MVC application. So in this tutorial I will demonstrate an example of MessageSource usage. As usually I'm going to use a java-based configuration.
The one of creational design patterns is a Prototype design pattern. Despite that the Prototype is the creational pattern it distinguishes from other patterns by a concept. I mean that the Prototype in some sense creates itself. I'm going to explain it bellow. All magic of the Prototype pattern is based on a clone() method of a java Object. So…
Sometimes there is a need to create a complex object in application. The one solution for this is a Factory pattern, the another one is a Builder design pattern. In some situation you even can combine these two patterns. But in this article I want to examine the Builder design pattern. The first thing which I need to say that it is a creational pattern.