State machine diagrams depict the various states that an object may be in and the transitions between those states. A state represents a stage in the behavior pattern of an object, and like Activity diagrams it is possible to have initial states and final states. An initial state, also called a creation state, is the one that an object is in when it is first created, whereas a final state is one in which no transitions lead out of. A transition is a progression from one state to another and will be triggered by an event that is either internal or external to the object.
We can show parallel states in the stae diagram. The state could also be reflexive. Transitions can have gaurd conditions which allow transition to other state only when they are full filled.
Each transition is a result of some event which would act as a trigger for the transition.
Tuesday, April 29, 2008
Monday, April 28, 2008
Characteristic Values
Name: Characteristic Values (Also Known as Colin's Pattern)
Intent: The characteristics and of things are commonly known and fixed allowing them to be captured using the attributes in a class . This pattern is useful when the number of characteristics is unknown or subject to change.
The structure for this pattern in built on the specification pattern. Consider a car manufacturer model where model are offered with extra features. These features can be captured by using an specification class of features. The actual car is associated to a specification class which specifies the features it offers. Thus instead of having multiple classes of features we can have a flexible model to capture what the actual model of car is fitted with.
Intent: The characteristics and of things are commonly known and fixed allowing them to be captured using the attributes in a class . This pattern is useful when the number of characteristics is unknown or subject to change.
The structure for this pattern in built on the specification pattern. Consider a car manufacturer model where model are offered with extra features. These features can be captured by using an specification class of features. The actual car is associated to a specification class which specifies the features it offers. Thus instead of having multiple classes of features we can have a flexible model to capture what the actual model of car is fitted with.
Sunday, April 27, 2008
Compatibilty

Name: Compatibilty (Also known as feasible combination or legal combination)
Intent: To model allowable combination of two sets of class instances in an extensible fashion.
We may use this model is we have to model set of classes( generalized/specialized set) which are associated to multiple classes of another set of classes ( generalized/specialized set), e.g different types of car need to be associated to different types of condition and use; where types of car can be a set of specialized classes (truck, cars , hybrid, motorcycles etc.) and (passenger, heavy goods, earth movers etc) can be another set of classes depending on the usage and conditions. If we use specialization between the 2 sets we get a rigid design which would need to be updated everytime a new type is to be added or updated to either of the sets. So we can use the specification classes to capture the different type of cars and conditions by creating specification classes called typeofcar and typeofenvironment class, now the the associations between the classes which were captured individually can be captured using an association class between the specification class. This model makes the design more flexible.
Intent: To model allowable combination of two sets of class instances in an extensible fashion.
We may use this model is we have to model set of classes( generalized/specialized set) which are associated to multiple classes of another set of classes ( generalized/specialized set), e.g different types of car need to be associated to different types of condition and use; where types of car can be a set of specialized classes (truck, cars , hybrid, motorcycles etc.) and (passenger, heavy goods, earth movers etc) can be another set of classes depending on the usage and conditions. If we use specialization between the 2 sets we get a rigid design which would need to be updated everytime a new type is to be added or updated to either of the sets. So we can use the specification classes to capture the different type of cars and conditions by creating specification classes called typeofcar and typeofenvironment class, now the the associations between the classes which were captured individually can be captured using an association class between the specification class. This model makes the design more flexible.
Multivalued Associative

Name: Multivalued Associative (Also known as Many-to-Many-to-Many association )
Intent: To allow multiple occurrences of the same association link to be modeled.
This model is applicable when we require the details of multiple occurrences of a link between two instances. Except for reflexive association, UML states that two classes may not be linked more than once via then same association.
Structure: To capture the extra information of multiple occurrences of an association we provide an extra class which is an abstraction of an occurrence of the association.
E.g If PreviousCaptains is the association link between the captain and aircraft class then we add associate the PreviousCaptains association class to another class called Captaincy occurrence which would capture the previous captaincy details of other captains/same captain using the same aircraft at different points in time.
Intent: To allow multiple occurrences of the same association link to be modeled.
This model is applicable when we require the details of multiple occurrences of a link between two instances. Except for reflexive association, UML states that two classes may not be linked more than once via then same association.
Structure: To capture the extra information of multiple occurrences of an association we provide an extra class which is an abstraction of an occurrence of the association.
E.g If PreviousCaptains is the association link between the captain and aircraft class then we add associate the PreviousCaptains association class to another class called Captaincy occurrence which would capture the previous captaincy details of other captains/same captain using the same aircraft at different points in time.
Thursday, April 24, 2008
Pattern - 1: Specification

Name: Specification (Also known as Type and Actual)
Intent: To Factor out unchanging facts from their occurrences in actual instances.
The idea is to separate type of things from actual things. This pattern reduces rdundencies as it factors out specification facts from actual class which realises them. The specification class would mostly display little or no behavior, will have static instance populations. Updating only the specification classes would remove the need to update all the instances.
A Specification pattern outlines a unit of business logic that is combinable with other business logic units. In this pattern, a unit of Business Logic inherits its functionality from the abstract aggregate Composite Specification class. The Composite Specification class has one function called IsSatisfiedBy that returns a boolean value. After instantiation, the specification is 'chained' with other specifications, making new specifications easily maintainable, yet highly customizable business logic. Furthermore upon instantiation the business logic may, through method invocation , have its state altered in order to become a delegate of other classes such as a persistence repository.
Intent: To Factor out unchanging facts from their occurrences in actual instances.
The idea is to separate type of things from actual things. This pattern reduces rdundencies as it factors out specification facts from actual class which realises them. The specification class would mostly display little or no behavior, will have static instance populations. Updating only the specification classes would remove the need to update all the instances.
A Specification pattern outlines a unit of business logic that is combinable with other business logic units. In this pattern, a unit of Business Logic inherits its functionality from the abstract aggregate Composite Specification class. The Composite Specification class has one function called IsSatisfiedBy that returns a boolean value. After instantiation, the specification is 'chained' with other specifications, making new specifications easily maintainable, yet highly customizable business logic. Furthermore upon instantiation the business logic may, through method invocation , have its state altered in order to become a delegate of other classes such as a persistence repository.
Subscribe to:
Posts (Atom)