Design Pattern « Language « Java Articles

Java Articles
1. Class Definition
2. Data
3. Development
4. GUI
5. J2EE
6. J2ME
7. JavaBeans
8. Language
9. Microsoft Collabration
10. Network
11. Swing
12. System Resource
13. XML
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Java Articles » Language » Design Pattern 
1. Strategy for success
Author:David Geary
URL:http://www.javaworld.com/javaworld/jw-04-2002/jw-0426-designpatterns.html?
Summary: The Strategy design pattern embodies two fundamental tenets of object-oriented (OO) design: encapsulate the concept that varies and program to an interface, not an implementation. In this article, David Geary shows how to use the Strategy pattern to implement an extensible design. (2,000 words; April 26, 2002)


2. Take command of your software
Author:David Geary
URL:http://www.javaworld.com/javaworld/jw-06-2002/jw-0628-designpatterns.html
Summary: The Command pattern lets an application framework make requests of application-specific objects, without the framework knowing the objects' exact type or the application-specific behavior they implement. In his latest Java Design Patterns column, David Geary explores how to use the Command pattern both in client-side Java to attach application-specific behavior to Swing menu items and in server-side Java to implement application-specific behavior with the Apache Struts application framework. (2,700 words; June 28, 2002)


3. Follow the Chain of Responsibility
Author:David Geary
URL:http://www.javaworld.com/javaworld/jw-08-2003/jw-0829-designpatterns.html?
Summary: The Chain of Responsibility (CoR) pattern decouples the sender and receiver of a request by interposing a chain of objects between them. In this installment of Java Design Patterns, David Geary discusses the CoR pattern and two implementations of that pattern in the Java APIs-one from client-side Java and the other from server-side Java. (2,200 words; August 29, 2003


4. Decorate your Java code
Author:David Geary
URL:http://www.javaworld.com/javaworld/jw-12-2001/jw-1214-designpatterns.html?
Summary: The Decorator design pattern lets you attach responsibilities to objects at runtime. This pattern proves more flexible than inheritance, which is static. In this latest installment of Java Design Patterns, David Geary explores Decorator with an implementation example. (2,800 words; December 14, 2001)


5. The trick to "Iterator Observers"
Author:Philip Bishop
URL:http://www.javaworld.com/javaworld/javatips/jw-javatip38.html?
Summary: Examples of the Iterator and Observer pattern can be found in most object-oriented systems and class libraries. Using these two patterns together to create Iterator Observers can help reduce code duplication and promote the degree to which software components depend on each other (coupling). The looser the coupling between components or subsystems the easy they are to interchange and maintain. (2,000 words)


6. Singletons rule
Author:Tony Sintes
URL:http://www.javaworld.com/javaworld/javaqa/2000-12/03-qa-1221-singleton.html?
Summary: Keep on the object-oriented track with singletons


7. Singletons with needles and thread
Author:Tony Sintes
URL:http://www.javaworld.com/javaworld/javaqa/2002-01/02-qa-0125-singleton4.html?
Summary: Two approaches to creating thread-safe singletons


8. Limit class instances with a modified singleton
Author:Tony Sintes
URL:http://www.javaworld.com/javaworld/javaqa/2001-11/01-qa-1102-singleton.html?
Summary: Limit class instances with a modified singleton


9. Speaking on the Observer pattern
Author:Tony Sintes
URL:http://www.javaworld.com/javaworld/javaqa/2001-05/04-qa-0525-observer.html?
Summary: How can you use the Observer pattern in your Java design?


10. Singletons vs. class (un)loading
Author:John D. Mitchell and Bill Foote
URL:http://www.javaworld.com/javaworld/javatips/jw-javatip52.html?
Summary: JavaSoft has tightened up the specification for loading and unloading classes in the upcoming Java 1.2 release. The changes to the specification and the JDK 1.2 implementation allow Java programmers to (finally) safely take advantage of the traditional implementation of the Singleton pattern. (750 words)


11. An inside view of Observer
Author:David Geary
URL:http://www.javaworld.com/javaworld/jw-03-2003/jw-0328-designpatterns.html?
Summary: The Observer pattern lets you build extensible software with pluggable objects by allowing communication between loosely coupled objects. In his latest Java Design Patterns column, David Geary explores the Observer pattern, how it's used throughout the Java 2 SDK, and how you can implement the pattern in your own code. (1,800 words; March 28, 2003)


12. Facade clears complexity
Author:David Geary
URL:http://www.javaworld.com/javaworld/jw-05-2003/jw-0530-designpatterns.html?
Summary: The Facade design pattern simplifies complex APIs by providing a simplified interface to a complex subsystem. In this installment of Java Design Patterns, David Geary explores a built-in Swing facade for creating dialog boxes and a custom facade for getting a Swing application off the ground. (1,500 words; May 30, 2003)


13. Factory methods
Author:Tony Sintes
URL:http://www.javaworld.com/javaworld/javaqa/2001-05/02-qa-0511-factory.html?
Summary: How do you employ factory methods to your best advantage?


14. Reflect on the Visitor design pattern
Author:Jeremy Blosser
URL:http://www.javaworld.com/javaworld/javatips/jw-javatip98.html?
Summary: The Visitor pattern is often used to separate the structure of an object collection from the operations performed on that collection. For example, it can separate the parsing logic in a compiler from the code generation logic. By keeping those separate, you can easily use different code generators. Even better, other utilities such as lint can use the parsing logic without dragging along the code generation logic. Unfortunately, adding new object types to a collection often requires modifying the visitor classes that have already been written. This article presents a more flexible approach to implementing visitors in Java, using reflection. (1,600 words)


15. How to decouple the Observer/Observable object model
Author:Albert Lopez
URL:http://www.javaworld.com/javaworld/javatips/jw-javatip29.html?
Summary: By using a decoupling technique, you can optimize the performance of the Observable by isolating, or decoupling, it from the dissemination of information to the Observers. (1,150 words)


16. Learn how to implement the Command pattern in Java
Author:Bala Paranj
URL:http://www.javaworld.com/javaworld/javatips/jw-javatip68.html?
Summary: Sometimes it's necessary to issue requests to objects without knowing anything about the operation being requested or the receiver of the request. In procedural languages, this type of communication is accomplished via a callback: a function that is registered somewhere to be called at a later point. Commands are the object-oriented equivalent of callbacks and encapsulate the callback function. This Java Tip demonstrates how to implement the Command pattern in Java. (1,070 words)


w_w__w___.__j___a__v___a_2s___._c__o_m___ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.