What is the design pattern?
If a problem occurs over and over again, a solution to that problem has been used effectively. That solution is described as a pattern. The design patterns are language-independent strategies for solving common object-oriented design problems. When you make a design, you should know the names of some common solutions. Learning design patterns is good for people to communicate each other effectively. In fact, you may have been familiar with some design patterns, you may not use well-known names to describe them. SUN suggests GOF (Gang Of Four--four pioneer guys who wrote a book named "Design Patterns"- Elements of Reusable Object-Oriented Software), so we use that book as our guide to describe solutions. Please make you be familiar with these terms and learn how other people solve the code problems.
Factory Design Pattern in Java:
Factory pattern comes into creational design pattern category, the main objective of the creational pattern is to instantiate an object and in Factory Pattern an interface is responsible for creating the object but the sub classes decides which class to instantiate. It is like the interface instantiate the appropriate sub-class depending upon the data passed. Here in this article we will understand how we can create an Factory Pattern in Java.
What is the relationship among various design patterns?
Generally, to build a system, you may need many patterns to fit together. Different designer may use different patterns to solve the same problem. Usually:
- Some patterns naturally fit together
- One pattern may lead to another
- Some patterns are similar and alternative
- Patterns are discoverable and documentable
- Patterns are not methods or framework
- Patterns give you hint to solve a problem effectively
If you need any urgent assistance on Factory_Design_Pattern, kindly email your requirement to us at : info@javagenious.com or Contact-an-Expert. Our experts will try their best to solve your problem.
Keyword Tags: Factory_Design_Pattern tutorial,Factory_Design_Pattern in java,Concepts of Factory_Design_Pattern,Java,J2EE,Interview Questions,Factory_Design_Pattern Examples
Most programming languages compile source code directly into machine code, suitable for execution on a particular microprocessor architecture. read more
|