This will be our final presentation for design patterns. 2 of our classmates are going to present the 6 usages , functionality and advantages of their design patterns.
Senthuran had presented :Observer Pattern, Builder Pattern & Command Pattern. During his presentation , I hardly hear his voice (too soft spoken). To able to understand the design pattern more deeply, i have to do some reading at home.
Observer design pattern : It is a behavioural pattern.In our new windowing world, we often would ike to display data in more than one form at the same time and have all of the displays reflect any changes in that data. For example, you might represent stock price changes both as a graph and as a table or list box. Each time the price changes, we’d expect both representations to change at once without any action on our part.We expect this sort of behavior because there are any number of Windows applications, like Excel, where we see that behavior.In Java, we can easily make use of the Observer Design Pattern to cause our program to behave in this way.
The Observer pattern assumes that the object containing the data is separate from the objects that display the data, and that these display objects observe changes in that data.
Builder Pattern is one of the creational pattern. A typical example is :
Your E-mail address book. You probably have both people and groups of people in your address book, and you would expect the display for the address book to change so that the People screen has places for first and last name, company, E-mail address and phone number. On the other hand if you were displaying a group address page, you’d like to see the name of the group, its purpose, and a list of members and their E-mail addresses. You click on a person and get one display and on a group and get the other display. Let’s assume that all E-mail addresses are kept in an object called an Address and that people and groups are derived from this base class.
The Builder Pattern assembles a number of objects, such as display widgets, in various ways depending on the data. Furthermore, since Java is one of the few languages where we can cleanly separate the data from the display methods into simple objects, Java is the ideal language to implement Builder patterns. Eg. CheckBox and ListBox Builder.
Command Pattern : In Chain of Responsibility forwards requests along a chain of classes, but the Command pattern forwards a request only to a specific module. It encloses a request for a specific action inside an object and gives it a known public interface. It lets you give the client the ability to make requests without knowing anything about the actual action that will be
performed, and allows you to change that action without affecting the client program in any way.
Lesson resume after the break. Mr Mok had discuss the topic on "Design patterns Introduction" . This topic let us to gain an appreciation of the potential uses of design pattern in software development and to examin a common patterns in details.Design patterns are difficult to learn or implement without a great deal of oo experience or a strong working team. Design patterns is known as a useful tool , However this is not the only one. There are other kinds of patterns apart from design pattern , there are , analysis pattern , workflow pattern and anti-pattern (software development , software architecture and software project management). To know more about desing pattern , I had also read up the "Building Flexible Components Based on Design Patterns" by Thomas Larsson and Mikael Snadberg. It talk about what is the exact relationship between design patterns and software components ? What benefits might design pattern bring to CBSE?Is there a set of design patterns defining software component?
Design pattern are important to CBD, even if they are a panacea. When developing components , one very obvious goal is to make them as usable as possible.Design pattern are very good tools to capture the pros and cons of different solutions.
Friday, November 9, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment