Kenan Sevindik – Developing Reusable Software Components Using MVP, Observer and Mediator Patterns


Having a layered architecture brings some benefits to software development. Some of them are;


It is a very common practice to employ classical three tier layered architecture to separate UI, business and data access parts from each other. However, in order to achieve those benefits listed previously, we need to create some other architecture on top of that layered architecture to handle functional aspects which are usually cross-cutting those three layers.


It is possible to create such an architecture which provides a basis to obtain those benefits by employing model-view-presenter (MVP), observer and mediator patterns together. Indeed, some frameworks, such as Vaadin UI Framework, Spring Application Framework, Hibernate Persistence Framework, provide means to easily realize such an architecture in our enterprise projects.


MVP helps us to separate handling backend logic from UI rendering completely. Any UI event, such as button click, list select etc, is immediately translated into a corresponding business event, and is let to be circulated among other components via Observer and Mediator patterns. Those other components are able to handle business events that they are interested in, execute their functionalities, publish new business events, update UI and so on. Components are totally unaware of each other. They can be introduced into the system optionally, and even at run time. As a result, it becomes possible to achieve modularity and reuse both on micro and macro level in our enterprise applications.

Kenan Sevindik


Kenan Sevindik is specialized on architecting and developing enterprise applications using various Java technologies for more than 15 years. His experience with Java dates back to 1998 in which he started developing Java applets for online education programs in university days. He has been working with various enterprise Java frameworks, such as Spring Application Framework, Spring Security Framework, Hibernate Persistence Framework since their initial phases.


Currently he develops enterprise software, gives trainings, mentoring and consultancy services about Java, OOP, AOP, Spring, Spring Security and Hibernate all over the world.


He is regularly invited to give public speeches about his experiences in various conferences and organizations nationally. He is also co-author of "Beginning Spring" book which is being published by Wiley Publishing in February 2015. He has bachelor degree in Computer Engineering.