Design patterns provides general solution for common design problems and initially design patterns were used in Object Oriented Programming. Later on realized that Design pattern need for other programming approaches to design software projects.
I general Programmers need some set of ideas/rules to design any use case or to develop any software application. In that case if we consider idea from already existing/developed application, it will easy for us to implement that application and also it is time saving and effort saving process.
If we have some of problems in our application development and if we solve the problems by following some approach and if we share that approach we follows to solve an issue, it will be helpful for other to use the same approach instead of writing new solution. This approaches we can consider as design patterns.
So we can call a design pattern as a collection of rules which describes how to perform certain tasks during the software development.
Some of advantages of Design Patterns:
We have Java/J2EE design patterns.
If we need of control which needs to handle and co ordinate all coming multiple user request like consider a online shopping website. Here we need to maintain some sequence of steps and if multiple users are logged in at time, then we need to handle consistency among multiple users. So some piece of code performing input processing and scattered across multiple objects and it is difficult to change the behavior of an object at run time.
We can go for front controller design patterns to provide the solution for above problem. Here we can use Front controller to handle multiple requests.
With this design pattern implementation, every request goes to front controller before it processed. The controller may forward the request to associate helper to verify authentication details of the user.
If we take Spring framework, Dispatcher controller will work as Front controller for application. i.e any request comes to server will be processed by dispatcher servlet.
I general Programmers need some set of ideas/rules to design any use case or to develop any software application. In that case if we consider idea from already existing/developed application, it will easy for us to implement that application and also it is time saving and effort saving process.
If we have some of problems in our application development and if we solve the problems by following some approach and if we share that approach we follows to solve an issue, it will be helpful for other to use the same approach instead of writing new solution. This approaches we can consider as design patterns.
So we can call a design pattern as a collection of rules which describes how to perform certain tasks during the software development.
Some of advantages of Design Patterns:
- They are already proved and verified as they have been built up on the knowledge and experience of developers.
- Design patterns are reusable ideas in multiple projects
- Design patterns captures the Software engineering experiences.
We have Java/J2EE design patterns.
- Front controller design pattern
- Data Access Object (DAO) design pattern
- Data Transfer Object (DTO) design pattern
- Singleton Design Pattern.
- Factory Desin Pattern
- Prototype Design Pattern
If we need of control which needs to handle and co ordinate all coming multiple user request like consider a online shopping website. Here we need to maintain some sequence of steps and if multiple users are logged in at time, then we need to handle consistency among multiple users. So some piece of code performing input processing and scattered across multiple objects and it is difficult to change the behavior of an object at run time.
We can go for front controller design patterns to provide the solution for above problem. Here we can use Front controller to handle multiple requests.
With this design pattern implementation, every request goes to front controller before it processed. The controller may forward the request to associate helper to verify authentication details of the user.
If we take Spring framework, Dispatcher controller will work as Front controller for application. i.e any request comes to server will be processed by dispatcher servlet.
No comments:
Post a Comment