Sometimes we want to specify the order (algorithm) of operations that a method uses, but allow subclasses to provide their own implementations by using the same order (algorithm) of operations. The intension of this pattern is to define an algorithm of operations in a method, and implementation of those operations is defined in subclasses.
Flex is component based framework. It has many components like button, datagrid, containers etc. There are times when we want to write our own component when any of standard Flex components doesn’t meet our application needs. There are two ways to achieve this, either create the required custom component by extending exiting Flex standard components else create a component according to our requirements from scratch (completely new component).
The second pattern of Behavioral Design Patterns group is Observer Design Pattern. The pattern contains central point (Subject) to which information gathering Objects (Observers) get subscribed to get information on state change in central Point (Subject). Simply we can say that this like subscribed information distribution.
Behavioral Design Patterns are specifically concerned with communication between the objects. The loose coupling is maintained between the communicating objects. In these patterns responsibilities are assigned between the objects through either inheritance or composition. I have started looking into first pattern of the group, i.e Command Pattern.
The Composite Pattern is considerable pattern of Structural Design Patterns group. Composite pattern is solution for building complex systems which are made up of lots of smaller components. To understand the concept of Composite Pattern we need to understand the terms;
1) Components and
This is another pattern which lies in structural Design Pattern section. To understand the pattern, let’s assume that there are two persons, one person can understand English language only and another can understand Spanish language only. But the both persons need discuss about an application. Here both persons have different interfaces of language they can understand i.e incompatible interfaces, but the requirement is that they need to discuss on an application issue. There is a solution, that is the any one of two person need to learn others language, but it takes long time to learn a new language, so we don’t want go with that solution. The problem can be solved by adapting a third person who can understand both English and Spanish languages, so that he can act as a translator between two peoples.