Adding a Design Pattern

The main feature of the application is the facility to incorporate design patterns in the object oriented design of the project. To do so, the developer can use the existing design pattern plug-in file or create a custom plug-in by using the plug-in editor that comes with the application.

Here is the step by step example :

Step 1

Lets say the design of your current component looks like this>>

step1.PNG

Initial Design before merge.


It has a few classes.. Asterix, Obliex, Calvin, Hobbes, and each class has a few methods/fields and there are a few relations between them.


Step 2

You want to add the adapter design pattern into the current class diagram and moreover you have identified the roles and responsibilities of the existing classes,...lets say you want the Asterix class to take up the role of Adaptee ,Obliex to take up the role of Adapter, Calvin to take up the role of Target... The adapter design pattern looks like this >>

step2.PNG

The Adapter Design Pattern.

Step 3

To complete this design pattern,
step3.PNG

Reivew the pattern, mapping before merge.

step6.PNG

After adding a design pattern.


DPAToolkit © 2004-2008 :: Hosted on Sourceforge :
SourceForge.net Logo