jump to navigation

Design pattern (Part 1) February 25, 2008

Posted by essamabdelaziz in JAVA.
trackback

Nowadays I’m so interested in Design pattern

So will start to blog regarding the same starting

Today I will start to give a small introduction about design pattern later on i will go in depth to

talk about every pattern one by one in details

*What is 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.

*design pattern VS Framework?

A framework is a product and

a design pattern is a specification.

Therefore a design pattern is part of your system design and a framework is part of your system.

The two could be looked at different contexts.

A design pattern suggests a solution for a recurring design problem in an application and the solution is generally open for future extensions.

A framework is a suite of packages using which applications (or the logical layers of applications), with all the functional and non-functional requirements, can be developed and hosted.

A design pattern it is the best solution for your problem like SingleTone,etc..

A framework like JSF,Struts,Spring,Hibernate

Do I have to use the design pattern?

If you want to be a professional Java developer, you should know at least some popular solutions to coding

problems. Such solutions have been proved efficient and effective by the experienced developers. These

solutions are described as so-called design patterns. Learning design patterns speeds up your experience

accumulation in OOA/OOD. Once you grasped them, you would be benefit from them for all your life and

jump up yourselves to be a master of designing and developing. Furthermore, you will be able to use these

terms to communicate with your fellows or assessors more effectively.

Many programmers with many years experience don’t know design patterns, but as an Object-Oriented

programmer, you have to know them well, especially for new Java programmers. Actually, when you solved

a coding problem, you have used a design pattern. You may not use a popular name to describe it or may not

choose an effective way to better intellectually control over what you built. Learning how the experienced

developers to solve the coding problems and trying to use them in your project are a best way to earn your

experience and certification.

Remember that learning the design patterns will really change how you design your code; not only will you

be smarter but will you sound a lot smarter, too.

How many design patterns?

Many. A site says at least 250 existing patterns are used in OO world, including Spaghetti which refers to

poor coding habits. The 23 design patterns by GOF are well known, and more are to be discovered on the

way.

Note that the design patterns are not idioms or algorithms or components

What is the relationship among these 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

 

http://www.javacamp.org/designPattern/index.html

Comments»

No comments yet — be the first.