Association between objects. Thread-of-control. Class/object with methods. between classes. Role class. Method with implementation

Size: px
Start display at page:

Download "Association between objects. Thread-of-control. Class/object with methods. between classes. Role class. Method with implementation"

Transcription

1 Roles & Patterns in Analysis, Design and Implementation Bent Bruun Kristensen Johnny Olsson Department of Computer Science, Aalborg University Fredrik Bajers Vej 7, DK-9220 Aalborg, Denmark fbbkristensen, Abstract. From a given set of abstraction mechanisms available in a language we form architectural abstractions for example design patterns and frameworks to support reuse of design. From recurring formations in concrete applications we conceive new abstraction mechanisms for example the role mechanism to be included in analysis and design notations as well as in programming languages. Concrete diagrams and programs probably including instances of design patterns have inspired the invention and design of the role mechanism. The role mechanism itself enables us to form new patterns and to revise existing patterns. Patterns to be used in analysis, design and implementation have an identical basic form a general idea to give a solution to a problem in a given context. However, patterns are classied as analysis patterns, design patterns and implementation patterns dependent on which phase in the development process they (best and most natural) support in terms of their level of abstractivity and degree of domain specicity. 1 Introduction Conceptual abstraction mechanisms and design patterns contribute to the further development of object-oriented programming, including the analysis, design and implementation phases. The evolution process of abstraction mechanisms and architectural abstractions is based on mutual inuence. From the available set of abstraction mechanism we form set of architectural abstraction to be reused in programming. The set of mechanisms supports and limits our formation of the concrete architectures, that in turn are further elaborated into abstract formations we turn these into catalogues of architectural abstractions. From available catalogues of architectural abstractions we form concrete applications by using/instantiating these. The recurring formations in the concrete applications inspire our understanding, and enables us to conceive new language mechanisms that capture the essence of the applications. We design language mechanisms, we integrate these into our languages, and we dene and implement them. The role is an example of a new abstraction mechanism based on a general understanding of phenomena and concepts the role is a natural element in our concept formation. Abstraction mechanisms and design patterns are used in object-oriented analysis and design This research was supported in part by the Danish Natural Science Research Council, No

2 ((Booch, 94) and (Rumbaugh et al., 91)) and implementation. Patterns to be used in analysis, design and implementation have the same general form a pattern expresses a general idea to give a solution to a problem in a given context. However, patterns do not address the same kind of problem domain, the context reects the specic domain, and accordingly, the kinds of solutions are dierent too. Patterns are classied as analysis patterns, design patterns and implementation patterns dependent on which phase in the development process they (best and most natural) support in terms of their level of abstractivity and degree of domain specicity. An analysis pattern is able to capture a problem in the application domain. A design pattern captures a problem in the model of the application domain it is a description of communicating objects and classes that are customized to solve a general design problem. An implementation pattern captures a problem the the realization of software in general and design patterns in particular (for which there may be several solutions). This classication of patterns is illustrated by the role mechanism. The role mechanism introduces new analysis patterns to be used in the modeling of an application domain. The role mechanism enables alternative organizations of design patterns it may eventually also introduce new design patterns. The role mechanism gives alternative possibilities for the implementation of design patterns it also introduces additional basic implementation patterns. Analysis patterns can be usable also in the design phase design patterns can be usable also in the implementation phase. Implementation patterns are more domain specic than design patterns, which are more specic than analysis patterns. Analysis patterns are more abstract than design patterns, which are more abstract than implementation patterns. Paper Organization. In section 2 we introduce conceptual abstraction mechanisms and patterns, and outline the evolution process of these. The evolution process is illustrated by experiments from which new analysis, design and implementation patterns originate. In section 3 we present a new analysis pattern based on the role mechanism. In section 4 we discuss the impact of the role mechanism on existing design patterns. In section 5 we discuss the relation between implementation patterns in terms of meta patterns and some general structures extracted form the the use of the role mechanism in design patterns. In section 6 we summarize the results of the paper. 2 Roles & Patterns In this section we discuss a conceptual abstraction mechanism (Kristensen & sterbye, 94), the role, and a category of architectural abstractions (Kristensen, 96), the design patterns. Both roles and design patterns are seen as supplementary abstractions to the class and object notation/language mechanisms that are available in the notation part of the objectoriented analysis and design methodologies and in object-oriented programming languages. In Figure 1, we illustrate the usual organization of an object-oriented structure in terms of (classes and) objects. The static aspect is organized in terms of generalization and aggregation hierarchies of the classes (not shown) as well as client-server relations between the classes, and the dynamic aspect is organized in terms of actual client-server relations between the object (illustrated as associations) as well as the method invocation structure, where a method of one object invokes a method of another, etc. Various possible sources of inspiration and motivation exist for the further development of object-oriented languages. One possibility is the invention of new abstraction mechanisms 2

3 Association between objects Thread-of-control Class/object with methods Figure 1: Object-Oriented Structure based on a general understanding of phenomena and concepts. In this approach we either use the theory on concept formation as the denition in the mapping to language constructs or we explore subconcepts for example role of (the concept) concept as new abstraction mechanisms. Another possibility is to design reusable software elements by identifying recurring patterns in the object-oriented diagrams and programs. A design pattern (Gamma et al., 94) is a description of communicating objects and classes that are customized to solve a general design problem in a particular context. Other types of patterns are described in (Coad et al., 95), (Pree, 95), and (Coplien & Schmidt, 95). Roles. The role concept (Kristensen, 95) is a natural element in our daily concept formation. The concept has already shown useful in object-oriented methodologies (Rumbaugh et al., 91) and languages (Kristensen & sterbye, 96). We classify phenomena such as tennis player, lecturer, etc. as roles of the person concept. In addition to being a usual concept the role is characterized by the fact that it is always dependent on an ordinary (intrinsic) concept and has no identity alone, it can be added and removed dynamically, and the properties of a role are visible for certain clients only (including the properties of the intrinsic concept, but excluding those of other roles for the concept). Class Association between classes Role class Method with implementation Figure 2: Role Classes In Figure 2, we illustrate the role as an alternative to the usual simulation of roles (either by aggregating the roles as usual objects or by roles as specializations of the intrinsic concept). The scheme employs roleication, where a role class is bound to a class, is associated with other classes, and can have methods on its own. The roleication is modeled by the role mechanism similar to the class mechanism, but reecting the characteristics of the role 3

4 as a concept. The term subject is used to denote an object and the role, and intrinsic object refers to the object of the subject. "Role of" link Role of method Figure 3: Role Methods In Figure 3, we illustrate that not only classes, but also methods can have roles. The method of a role class can be a method role for a method of the intrinsic class. The behavioral eect is a combination of the behavior described by the two methods. Reviewer Conference Conference-Associate Participant Paper Person Author Figure 4: Roles of the Role Conference-Associate As an illustrating example, we consider a Person involved in the preparation and/or holding of a conference by adding the role Conference-Associate. This includes several roles, for example as a Participant, an Author, and a Reviewer. These roles then become roles of Conference-Associate roles of a role as illustrated in Figure 4. A method of for example Participant can utilize the methods of Conference-Associate in its description, but not vice versa. We model Participant, Author, and Reviewer as roles of Conference-Associate because the various relations to a given conference are related to these specic roles only (and not to Conference-Associate as a whole): A Participant is related to the Conference; an Author is related to the Paper, and a Reviewer is related to a Paper. An abstraction mechanism such as the role has the following characteristics: (1) It is a well-dened, basic building block. (2) It can be integrated with other mechanisms (for example inheritance and polymorphism) in the language/notation. (3) It can be used in the creative thinking about a problem. (4) Abstractivity in terms of classication, aggregation and specialization is available. 4

5 Patterns. A design pattern (Gamma et al., 94) is a general idea of a design solution to a general basic problem. The structure of a design pattern can be illustrated by a graphical representation of the classes in the pattern. We exemplify design patterns by the Decorator pattern. Component Operation() ConcreteComponent Operation() Decorator Operation() component->operation() ConcreteDecoratorA Operation() AddedState ConcreteDecoratorB Operation() AddedBehavior() Decorator::Operation(); AddedBehavior(); Figure 5: The Decorator Pattern The intent of the Decorator pattern (its structure is reproduced in Figure 5) is to \attach additional responsibilities to an object dynamically. Decorators provide a exible alternative to subclassing for extending functionality". The Component class denes the interface for objects that can have responsibilities added to them dynamically. The ConcreteComponent class denes an object to which additional responsibilities can be attached. The Decorator class maintains a reference to a Component object and denes an interface that conforms to Component's interface. The ConcreteDecorator class adds responsibilities to the Component. Design patterns such as the Decorator pattern are abstract, general design solutions for general classes of problems. Some characteristics of design patterns are: (1) They are informally dened in terms of problem, solution and consequences. (2) They always require instantiation to be mapped into a concrete implementation. (3) They represent interacting parts, systematic structures and relationships. (4) They are not atomic, and their use in design is at a larger level of granularity than classes/objects. Evolution Process. The development process of object-oriented language mechanisms and architectural abstractions can be seen as an evolution process (Kristensen, 96). From notation/language mechanisms we form concrete architectures in diagrams/programs from which we form more general abstractions, architectural abstractions. Inspired from architectural abstractions and other sources as for example concept formation we invent language mechanisms, typically abstraction mechanisms. Two evolution processes are mutually inuencing each other as illustrated in Figure 6: Mechanism Invention: In this process we invent an abstraction mechanism from architectural abstractions, seen as general ideas and solutions to problems (including examples 5

6 Mechanism Invention: Language Mechanisms Abstraction Formation: Language Mechanisms Concrete Applications Concrete Architecture Architectural Abstractions Architectural Abstractions Figure 6: Evolution Processes of abstract pieces of programs). We apply architectural abstractions in actual concrete programs we identify the use of similar architectural abstractions to form similar fundamental and central parts of our programs. Over time we conceive a language mechanism to replace the use of architectural abstractions for the identied purpose. We invent the abstraction mechanism we dene it, we integrate it in our language, and we implement it. A mechanism is designed and dened, including its syntax and semantics as part of a language/notation. The mechanism is supposed to subsume one or more architectural abstractions, and intended to capture a natural element in the abstraction process. At the programming language level the mechanism has a general implementation, hidden by the language implementation. The success of a mechanism depends among others on weather it truly replaces a number of architectural abstractions, weather it is integrated with the rest of the language/notation (especially the other abstraction mechanisms), its naturalness and usefulness in the abstraction process, how comfortable the user is with its implementation, and the eciency of the implementation. Abstraction Formation: In this process, we rst form concrete architectures, next we form more abstract versions of these. By means of language mechanisms we design and construct formations and organizations as concrete architectures including both structure and behavior, at a higher level than what we can express directly by the given mechanisms. From experience with several of such concrete architectures we form more general and abstract formations and organizations architectural abstractions. The success of an architectural abstraction depends among others on how general an idea is captured by the abstraction, how simple and powerful the abstraction is (not cluttered by complicated structure and behavior), if there are many important applications of it, if it can be integrated with other abstractions (is basic and orthogonal with respect to these), and if it is still identiable in the code after it has been applied. The role concept is an example of a possible language mechanism and architectural abstraction that interplays in the evolution process. 6

7 3 Title: Roles in Analysis During the experiments with the role abstraction mechanism several ideas for new patterns have appeared. They are all very simple in nature, inspired from various application domains, and still very immature. A role based pattern, called Title, is presented (Olsson, 96). Title is described as an analysis pattern. Title can also be seen as a new design pattern then with a dierent intent etc. We use an extract from the format of the description of design patterns in (Gamma et al., 94) for our description of Title as an analysis pattern. Intent. To ensure the varying behavior and state, a role representing the behavior and state is handed from one object to another. Motivation. Title is motivated from an example that shows the modeling aspects of this pattern. A city always has a person playing the role as a mayor. When one person stops playing the role as mayor, it is handed over to another person as shown on Figure 7. Mayor Mayor Valdemar Valdemar Gorm Gorm Figure 7: Transfer of the Mayor Role The reference to the mayor is always the same, although the person behind the title changes. The static structure is shown on Figure 8. Mayor Person Figure 8: Illustration of the Mayor Role Applicability. Use the Title pattern in the following case: A title is transferred from one item to another. The varying behavior is separated into interchangeable objects. 7

8 Structure. In its general structure, the Title role may be attached to specializations of the Component class, see Figure 9. Title Component Concrete ComponentA Concrete ComponentB Figure 9: The Title Pattern Participants. Title { denes the varying behavior and state for the subject (intrinsic object and role). A references to the subject is a reference to the role instance. Component { the interchangeable part of the subject. { implements the behavior of the object. ConcreteComponent subclasses { each subclass implements the concrete behavior of the object. Collaborations. Title handles the static methods of the subject. Title is the interface for the client. A ConreteComponent handles the varying behavior of a subject. A clients request for methods not in the interface of the Title object is implicitly handed to the ConcreteComponent object. The Title role is forwarded to another object either by the client or the ConcreteComponent. Consequences. The varying behavior is separated and organized in a generalization hierarchy. Many Component objects may be created. An alternative to subclassing. 8

9 Implementation. The pattern is implemented as a role class and a specialization hierarchy of the Component class. One implementation concern is which object handles the transfer of the role from one object to another? If the change of object is handled by the delivering Component object, then it needs a reference to the role, and a reference to Title has to be given to the receiving object. When change of object is handled by the client, the object does not need a reference to its role. 4 Roles in Design Patterns As mentioned Title can also be dened as a new design pattern (with a dierent description than the one given in the previous section) but with an identical structure. However, in general we have not invented new design patterns based on the role mechanism. Instead, we have inspected some existing design patterns in order to construct alternative descriptions of these by utilizing the role mechanism (Olsson, 95) and (Olsson, 96). This is because the role mechanism is not yet a part of common programming languages. We have selected 3 design patterns, Strategy, State and Bridge, each of which gives alternative insight into the possibilities of the role mechanism. Finally, we compare the role mechanism with its closest counterpart among the design pattern, the Decorator. 4.1 Strategy This section contains a short description of the Strategy design pattern, followed by an examination of how a structure based on roles may simplify the structure of the Strategy pattern. 1. Intent: Dene a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it. 2. Applicability: (a) When many classes dier only in their behavior (dierent algorithms). An alternative to subclassing. (b) The algorithms can be changed dynamically. (c) The algorithm uses data that clients should not know about. (d) Behavior of classes separated into classes. statements. 3. Structure: See Figure Consequences: (a) Families of related algorithms. (b) Greater exibility and more reuse. (c) Choice of implementation. (d) Client must be aware of dierent strategies. (e) Creation overhead for Strategy objects. An alternative to large conditional (f) Communication overhead between Strategy and Context objects. 9

10 Client AlgorithmForward strategy Algorithm Strategy Context StrategyA StrategyB StrategyC Figure 10: The Structure of Strategy Application. The Strategy pattern is applied in an example with mathematical computation. An integral function takes rst order functions and an interval as arguments and compute the numerical value of the integral in the interval. The integral function has dierent strategies for the numerical computation. The choice of strategy is due to criteria such as precision and time constraints. Strategy is applied as follows: the Integral class takes as arguments a function and the interval for which to compute the integral. Integral has a method SetStrategy to set the strategy for an Integral instance. Invoking an Integral object implies an invocation of a default astrategy object to perform the actual computation of the integral value. Integral delegates the function and interval to its instance of a astrategy. The strategies for calculating the integral value are relatively simple and do not dier much in computation, so the criteria for choosing one or another are not important here. The purpose is to show the principles of Strategy. The structure of the Integral class and its computation strategies are shown on Figure 11. Client IntegralValue astrategy Value Strategy Integral SumLeftBar Sum CenterBar SumLeft RightBar Figure 11: Example of an Application of Strategy Restructuring. Figure 12 illustrates an alternative structure for Strategy with roles. The Integral class is implemented as a role bound to one of the Strategy classes. The Integral method Value is a method role of the method Value in the Strategy class (if Value in Integral is not a method role of a method in Strategy then Strategy needs at reference for the Integral role). In the following the structure is examined. 10

11 Client IntegralValue Value Integral Strategy SumLeftBar SumCenter Bar SumLeft RightBar Figure 12: Restructuring of Strategy 1. Intent: Algorithms are encapsulated and interchangeable independent on the client { unless at instantiation time where the client has to declare the initial strategy. 2. Applicability: (a) The varying behavior is separated into interchangeable objects. (b) Algorithms can be changed dynamically. (c) Data is hidden to the client. (d) Simple and exible structure. 3. Consequences: (a) Algorithms are related in a role generalization hierarchy. (b) The reuseability and exibility is the same as in the original structure. (c) An algorithm may have several implementations. (d) Clients can vary the strategy role. (e) Many strategy roles can be created. (f) The communication overhead is less than in the original structure. Change of strategy is a transfer of the Integral role to another Strategy object. The main problem with this structure is that the Integral role cannot have strategies for more than type of computation, because the role can only be a role of one type of strategy. 4.2 State This section gives a short description of the State pattern and examines an alternative structure for Strategy. 1. Intent: To allow an object to alter its behavior when its internal state changes. The object will appear to change its class. 2. Applicability: 11

12 (a) When an object's behavior depends on its altering state. (b) To avoid operations with large conditional statements that depend on the object's state. 3. Structure: See Figure 13. Handle Handle state State Context Concrete StateA Concrete StateB Figure 13: The Structure of State 4. Consequences: (a) State specic behavior is localized and delegated to separate objects. (b) State transitions are made explicit. (c) State objects can be shared. Deposit Withdraw Deposit Withdraw state State Account Observation State Normal State Credit State Figure 14: Illustrating Example of State Application. The illustrating example of the State pattern is a bank account example. An account class, Account, has a balance showing the amount of money on the account and methods for withdrawing and depositing money. Depending on the balance, the account has dierent states such as observation state if the balance is low or below zero, credit state if the owner of the account has a good repute, and normal state. Each state gives the WithDraw and Deposit methods of the Account class a certain behavior. For instance in the observation state, WithDraw limits the amount to withdraw. Each state and its specic behavior is separated from the Account class into some State classes, see Figure 14. WithDraw and Deposit requests are forwarded to the actual State class which handles the request and eventually change the state (the balance) of the account. 12

13 Restructuring. Figure 15 shows a structure where the states are represented as roles of the Account class. A client knows an account through one of the State roles. Client WithDraw Deposit State Account Observation State Normal State Credit State Figure 15: Restructuring of State 1. Intent: The object really changes its class, because its change of state is achieved by changing the role by which it is accessed. 2. Applicability: (a) The (intrinsic) object remains the same, when the role changes. (b) Delegation of state-specic behavior to individual classes is possible. 3. Consequences: (a) State specic behavior is localized and put into one object. (b) State transitions are made explicit by change of role. (c) State objects cannot be shared, because a State role can only be role of one object at a time. Communication overhead between State and Account is minimized, because the original explicit forwarding mechanism is avoided. The main problem with this structure is that the client is involved in the change of state. 4.3 Bridge This section gives a short presentation of the Bridge pattern, followed by an examination of an alternative structure for Bridge. 1. Intent: Decouple abstraction and implementation to let them vary independently. 2. Applicability: (a) Avoid permanent binding between abstraction and implementation by splitting these into two classes. 13

14 (b) Both abstraction and implementation should be extensible by subclassing. (c) Changes in the implementation of an abstraction should have no impact on clients. (d) Sharing of implementation by abstraction classes. 3. Structure: See Figure 16. Operation OperationImp Abstraction imp Implementor Refinded Abstraction ConcreteA Implementor ConcreteB Implementor ConcreteC Implementor Figure 16: The Structure of Bridge 4. Consequences: The consequences of the pattern are all implicitly described under the applicability. Application. Consider the implementation of a portable Window abstraction in a user interface toolkit. This abstraction should enable us to write applications that work on both the X Window System and IBM's Presentation Manager (PM). An abstract class Window may abstract over the platform-specic implementation subclasses XWindow and PMWIndow. Furthermore, the Window abstraction should cover dierent kinds of windows. However, it is inconvenient to let the Window abstraction cover both dierent kinds of windows and platforms. To support an IconWindow specialization of the Window class for both platforms, two classes have to be implemented: XWindowIcon and PMWindowIcon. Bridge solves this by putting windows abstractions and implementations into separate classes, and let them vary independently. A request to a window abstraction class forwards the request to its actual implementation class, see Figure 17. DrawText DrawRect DrawText DrawLine Abstraction imp WindowImp DrawBorder DrawCloseBox IconWindow Transient Window XWindow Imp PMWindow Imp Figure 17: Example of an Application of Bridge 14

15 Restructuring. The restructuring of Bridge is a generalization of the restructuring of State and Strategy. In Figure 18 this structure implies that abstraction-classes are implemented as roles, and implementation-classes as classes. DrawText of Abstraction is a method-role of the same in WindowImp. DrawRect applies DrawLine in WindowImp to draw a rectangle. DrawRect DrawText DrawText DrawLine Abstraction WindowImp DrawBorder Draw CloseBox XWindow Imp PMWindow Imp Icon Window Transient Window Figure 18: Restructuring of Bridge 1. Intent: Abstraction and implementation are decoupled, and they can vary independently. 2. Applicability: (a) No permanent binding between abstraction and implementation. (b) Both abstraction and implementation are extensible by subclassing. (c) Implementations are hidden to clients. (d) Abstractions may share an implementation. 4.4 Roles and the Decorator Pattern In this section the role mechanism is used to model the Decorator design pattern. This comparison is interesting because among the design patterns the Decorator is the one that best captures the properties of the role mechanism. 1. Intent: See description in section Applicability: (a) When extension by subclassing is impractical. (b) For responsibilities that can be withdrawn. 3. Structure: See Figure Consequences: 15

16 (a) Avoid subclass explosion. (b) Recursive nesting allows multiple responsibilities. (c) A component and its component are not identical. (d) Run-time overhead in space and time. Write VirtualPrint Print Decorator component BoxPrint Special Underline Print Underline Print Figure 19: Example of Use of Decorator Application. An example of using Decorator is a Windows system, where Print is a window class for leaving messages to the user like in the Console Window in the X Windows System. Print has one method Write sending a text-string to the window. The Print window might change style of its output formatting, for example, important message may be underlined or written in a text-box. This additional behavior of the Print class is controlled by attaching Decorators to Print and change the reference for the output-window to a Decorator object. Additional behavior of the Print window may be added successively by attaching more decorators in a chain structure. The class structure of this example is shown on Figure 19. Restructuring. Because the Decorator pattern has a another basic structure than the other patterns examined another restructuring is considered. Figure 20 shows a role based structure of Decorator. 1. Intent: Responsibilities can be attached dynamically to an object, however, only one additional responsibility can be attached. 2. Applicability: (a) The structure is an alternative to subclassing. (b) The responsibility can be withdrawn and another can be attached. 3. Consequences: 16

17 Write Write Print Decorator BoxPrint Special Underline Print Underline Print (a) Subclass explosion is avoided. Figure 20: Restructuring of Decorator (b) A component and its decorator have the same (intrinsic) identity. (c) Run-time overhead in space and time is limited. Because the structure allows only one additional responsibility it does not satisfy a very basic demand of the pattern. To summarize, design patterns such as State, Strategy, and Bridge can be restructured into role-based structures with various benets. This indicates that the role abstraction may introduce new design patterns. 5 Roles in Implementation In the previous section we have examined the use of the role mechanism for alternative structuring of design patterns. From the examples some common, basic structures have been identied. These common structures are potential general implementation structures. Meta patterns (Pree, 95) can be seen implementation patterns too dening some terminology and principles for the implementation of software in general, but for design patterns in particular. This section relates the common structures from the previous section to the composition techniques for meta patterns. The purpose is to investigate the potential of the role mechanism for implementation support (Olsson, 96). Strategy, State and Bridge can all be described by the 1:1 Connection meta pattern. This section elaborates on this by describing the common structures from the previous section by the 1:1 Connection pattern. All structures are based on one role bound to an object. The meta patterns are concerned with (terminology and principles of) single classes or groups of classes together with their interactions. A template method is a calling method and the hook methods are the methods called. A given method can be both a template method and hook method, depending on the other method considered. The concept of template and hook methods is independent of the distribution of the methods between classes. A class containing a template method is a template class and a class containing a hook method is a hook class. 17

18 Implementation Structure I. In its general version, Structure I is related to the 1:1 Connection meta pattern as shown on Figure 21. The varying behavior of a class is decoupled and arranged in a generalization hierarchy. The change of behavior is performed by the client. 1:1 Connection metapattern T href H T() H() Template Hook Figure 21: Structure I. 1:1 Connection Pattern This structure does not use delegation to handle the varying behavior, because the varying behavior is placed outside the object in a role. In the original design patterns, the template class delegates responsibility to the current hook class. Structure I's division into the role class as a template class and the intrinsic object as the hook class is less obvious, because the role does not necessarily use methods of the hook class. That depends on the specic application. In Section 4.3, it is shown that Bridge is a decoupling of the independently varying abstraction and implementation. Structure I can be related to Bridge in that respect that Structure I is varying its abstraction, while the implementation remains the same. Behavioral change of a subject applying Structure I is reected in a change of class of the subject. Structure I means less communication between the role and the object compared to the original structure. If the intrinsic object needs to the apply varying behavior, the object needs a reference to the role. A main problem with Structure I is that a change of behavior require the client to change a reference, because the varying behavior is located in the interchangeable roles. The consequence is that the change of role requires explicit handling of the change. Implementation Structure II. Described by a meta pattern, Structure II is shown on Figure 22. As it can be seen, the class is regarded as the template class, and the roles as 18

19 hook classes. In relation to delegation, the class is the receiver and the roles the delegates. The receiving object delegates explicitly the varying behavior to the delegates. 1:1 Connection metapattern T href H T() H() Hook Template Figure 22: Structure II. 1:1 Connection Pattern Structure II has little to oer when the template methods are in the object and the hook method in the roles, because the transparency to the object through roles is not used. Structure II might be preferable when delegates use methods and attributes in the receiving object. Change of role require the same explicit task as described in Structure I. Implementation Structure III. Structure III described by a meta pattern is shown in Figure 23. The role acts as the template class, and the classes as hook classes. Structure III satises the most demands for State and Strategy (and Bridge). Delegation is handled implicitly by the roleication mechanism. All methods of the hook class are visible through the role. As an special feature, template methods in the role can be method roles of hook methods in the varying hook classes. Less delegation means less complexity and more ecient development and execution processes. In general, delegation is an alternative to subclassing with the negative consequence that behavioral changes of an object do not imply that the object is regarded as belonging to another class. Structure III resolves this by letting change of behavior reect the change of class as well. Structure III has one main disadvantage. Only one delegate object is possible at the time, because the template role can only be role of one object. In addition, a template role cannot be instantiated without also being bound to a hook object, i.e. the initial delegate object has to be declared by the client. As the Bridge pattern illustrates, Structure I and Structure III can be generalized. In its general form, the structure is used for separating abstraction and implementation. 19

20 1:1 Connection metapattern T href H T() H() Template Hook Figure 23: Structure III. 1:1 Connection Pattern Both structures implies "real" change of class when the behavior of the object intensionally changes. Structure I is applicable for the change of class when the change is performed by the client, and Structure III is applicable when the change of object is an internal action to the object. 6 Summary The evolution process of abstraction mechanisms and architectural abstractions, for example design patterns, is based on mutual inuence. Based on the role mechanism as an example we summarize our results as follows: Patterns to be used in analysis, design and implementation have identical basic form a general idea to give a solution to a problem in a given context. Analysis patterns, design patterns and implementation patterns are dierent with respect to the level of abstractivity and the degree of domain specicity. The role mechanism introduces new analysis patterns. Analysis patterns are used to model an application domain. The role mechanism enables alternative organizations of design patterns. mechanism may introduce new design patterns. The role The role mechanism gives alternative implementations of software in general and the structure of the solution part of design patterns in particular. The role mechanism introduces additional implementation patterns. 20

21 The interplay between conceptual abstraction mechanisms and design patterns exemplied by the role mechanism contributes to the further development of object-oriented analysis, design and implementation. This paper contributes by presenting an understanding of the evolution of abstraction mechanisms and architectural abstractions. The understanding is illustrated by examples of new role-based analysis, design and implementation patterns. References G. Booch: Object Oriented Analysis and Design with Applications. Benjamin/Cummings, P. Coad, D. North, M. Mayeld: Object Models: Strategies, Patterns, & Applications. Prentice Hall, J. O. Coplien, D. C. Schmidt: Pattern Languages of Program Design. Addison-Wesley, E. Gamma, R. Helm, R. Johnson, J. Vlissides: Design Patterns: Elements of Reusable Object- Oriented Software. Addison-Wesley, B. B. Kristensen, K. sterbye. Conceptual Modeling and Programming Languages. SIGPLAN Notices Vol.29, No.9, B. B. Kristensen. Object-Oriented Modeling with Roles. Proceedings of the 2nd International Conference on Object-Oriented Information Systems, B. B. Kristensen, K. sterbye. Roles: Conceptual Abstraction Theory & Practical Language Issues. To appear in Theory and Practice of Object Systems (TAPOS), B. B. Kristensen. Architectural Abstractions and Language Mechanisms. To appear in: Proceedings of the Asia Pacic Software Engineering Conference '96, J. Olsson: Conceptual Programming with Design Patterns. Aalborg University, J. Olsson: Language Mechanisms and Design Patterns. Masters Thesis. Aalborg University, W. Pree: Design Patterns for Object-Oriented Software Development. Addison-Wesley, J. Rumbaugh, M. Blaha, W. Premerlani, F. Eddy, W. Lorensen: Object-Oriented Modeling and Design. Prentice Hall

Frameworks Representations & Perspectives Position Paper Workshop on Language Support for Design Patterns and Frameworks, ECOOP 97

Frameworks Representations & Perspectives Position Paper Workshop on Language Support for Design Patterns and Frameworks, ECOOP 97 Frameworks Representations & Perspectives Position Paper Workshop on Language Support for Design Patterns and Frameworks, ECOOP 97 Palle Nowack Department of Computer Science, Aalborg University Fredrik

More information

COSC 3351 Software Design. Design Patterns Structural Patterns (I)

COSC 3351 Software Design. Design Patterns Structural Patterns (I) COSC 3351 Software Design Design Patterns Structural Patterns (I) Spring 2008 Purpose Creational Structural Behavioral Scope Class Factory Method Adaptor(class) Interpreter Template Method Object Abstract

More information

Goals of Lecture. Lecture 27: OO Design Patterns. Pattern Resources. Design Patterns. Cover OO Design Patterns. Pattern Languages of Programming

Goals of Lecture. Lecture 27: OO Design Patterns. Pattern Resources. Design Patterns. Cover OO Design Patterns. Pattern Languages of Programming Goals of Lecture Lecture 27: OO Design Patterns Cover OO Design Patterns Background Examples Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2001 April 24, 2001 Kenneth

More information

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1 What is a Design Pattern? Each pattern Describes a problem which occurs over and over again in our environment,and then describes the core of the problem Novelists, playwrights and other writers rarely

More information

Design Patterns. Gunnar Gotshalks A4-1

Design Patterns. Gunnar Gotshalks A4-1 Design Patterns A4-1 On Design Patterns A design pattern systematically names, explains and evaluates an important and recurring design problem and its solution Good designers know not to solve every problem

More information

Coordination Patterns

Coordination Patterns Coordination Patterns 1. Coordination Patterns Design Patterns and their relevance for Coordination Oscar Nierstrasz Software Composition Group Institut für Informatik (IAM) Universität Bern oscar@iam.unibe.ch

More information

Topics in Object-Oriented Design Patterns

Topics in Object-Oriented Design Patterns Software design Topics in Object-Oriented Design Patterns Material mainly from the book Design Patterns by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides; slides originally by Spiros Mancoridis;

More information

Object-Oriented Design

Object-Oriented Design Object-Oriented Design Lecturer: Raman Ramsin Lecture 20: GoF Design Patterns Creational 1 Software Patterns Software Patterns support reuse of software architecture and design. Patterns capture the static

More information

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D.

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D. Software Design Patterns Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University J. Maletic 1 Background 1 Search for recurring successful designs emergent designs from practice

More information

Egon Borger (Pisa) Capturing Design Pattern Abstractions by ASMs

Egon Borger (Pisa) Capturing Design Pattern Abstractions by ASMs Egon Borger (Pisa) Capturing Design Pattern Abstractions by ASMs Universita di Pisa, Dipartimento di Informatica, I-56127 Pisa, Italy boerger@di.unipi.it visiting SAP Research, Karlsruhe, Germany egon.boerger@sap.com

More information

Design Patterns. An introduction

Design Patterns. An introduction Design Patterns An introduction Introduction Designing object-oriented software is hard, and designing reusable object-oriented software is even harder. Your design should be specific to the problem at

More information

NOTES ON OBJECT-ORIENTED MODELING AND DESIGN

NOTES ON OBJECT-ORIENTED MODELING AND DESIGN NOTES ON OBJECT-ORIENTED MODELING AND DESIGN Stephen W. Clyde Brigham Young University Provo, UT 86402 Abstract: A review of the Object Modeling Technique (OMT) is presented. OMT is an object-oriented

More information

Keywords: Abstract Factory, Singleton, Factory Method, Prototype, Builder, Composite, Flyweight, Decorator.

Keywords: Abstract Factory, Singleton, Factory Method, Prototype, Builder, Composite, Flyweight, Decorator. Comparative Study In Utilization Of Creational And Structural Design Patterns In Solving Design Problems K.Wseem Abrar M.Tech., Student, Dept. of CSE, Amina Institute of Technology, Shamirpet, Hyderabad

More information

SOFTWARE PATTERNS. Joseph Bonello

SOFTWARE PATTERNS. Joseph Bonello SOFTWARE PATTERNS Joseph Bonello MOTIVATION Building software using new frameworks is more complex And expensive There are many methodologies and frameworks to help developers build enterprise application

More information

Produced by. Design Patterns. MSc in Communications Software. Eamonn de Leastar

Produced by. Design Patterns. MSc in Communications Software. Eamonn de Leastar Design Patterns MSc in Communications Software Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie

More information

administrivia today UML start design patterns Tuesday, September 28, 2010

administrivia today UML start design patterns Tuesday, September 28, 2010 administrivia Assignment 2? promise to get past assignment 1 back soon exam on monday review slides are posted your responsibility to review covers through last week today UML start design patterns 1 Unified

More information

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011 Design Patterns Lecture 1 Manuel Mastrofini Systems Engineering and Web Services University of Rome Tor Vergata June 2011 Definition A pattern is a reusable solution to a commonly occurring problem within

More information

Design Patterns. Hausi A. Müller University of Victoria. Software Architecture Course Spring 2000

Design Patterns. Hausi A. Müller University of Victoria. Software Architecture Course Spring 2000 Design Patterns Hausi A. Müller University of Victoria Software Architecture Course Spring 2000 1 Motivation Vehicle for reasoning about design or architecture at a higher level of abstraction (design

More information

Chapter 12 (revised by JAS)

Chapter 12 (revised by JAS) Chapter 12 (revised by JAS) Pattern-Based Design Slide Set to accompany Software Engineering: A Practitionerʼs Approach, 7/e by Roger S. Pressman Slides copyright 1996, 2001, 2005, 2009 by Roger S. Pressman

More information

Information systems modelling UML and service description languages

Information systems modelling UML and service description languages Internet Engineering Tomasz Babczyński, Zofia Kruczkiewicz Tomasz Kubik Information systems modelling UML and service description languages Overview of design patterns for supporting information systems

More information

Object-Oriented Design

Object-Oriented Design Object-Oriented Design Lecture 20 GoF Design Patterns Behavioral Department of Computer Engineering Sharif University of Technology 1 GoF Behavioral Patterns Class Class Interpreter: Given a language,

More information

Chapter No. 2 Class modeling CO:-Sketch Class,object models using fundamental relationships Contents 2.1 Object and Class Concepts (12M) Objects,

Chapter No. 2 Class modeling CO:-Sketch Class,object models using fundamental relationships Contents 2.1 Object and Class Concepts (12M) Objects, Chapter No. 2 Class modeling CO:-Sketch Class,object models using fundamental relationships Contents 2.1 Object and Class Concepts (12M) Objects, Classes, Class Diagrams Values and Attributes Operations

More information

Idioms and Design Patterns. Martin Skogevall IDE, Mälardalen University

Idioms and Design Patterns. Martin Skogevall IDE, Mälardalen University Idioms and Design Patterns Martin Skogevall IDE, Mälardalen University 2005-04-07 Acronyms Object Oriented Analysis and Design (OOAD) Object Oriented Programming (OOD Software Design Patterns (SDP) Gang

More information

3 Product Management Anti-Patterns by Thomas Schranz

3 Product Management Anti-Patterns by Thomas Schranz 3 Product Management Anti-Patterns by Thomas Schranz News Read above article, it s good and short! October 30, 2014 2 / 3 News Read above article, it s good and short! Grading: Added explanation about

More information

What are the characteristics of Object Oriented programming language?

What are the characteristics of Object Oriented programming language? What are the various elements of OOP? Following are the various elements of OOP:- Class:- A class is a collection of data and the various operations that can be performed on that data. Object- This is

More information

Research Article A Design Pattern Approach to Improve the Structure and Implementation of the Decorator Design Pattern

Research Article A Design Pattern Approach to Improve the Structure and Implementation of the Decorator Design Pattern Research Journal of Applied Sciences, Engineering and Technology 13(5): 416-421, 2016 DOI:10.19026/rjaset.13.2961 ISSN: 2040-7459; e-issn: 2040-7467 2016 Maxwell Scientific Publication Corp. Submitted:

More information

Using Design Patterns in Java Application Development

Using Design Patterns in Java Application Development Using Design Patterns in Java Application Development ExxonMobil Research & Engineering Co. Clinton, New Jersey Michael P. Redlich (908) 730-3416 michael.p.redlich@exxonmobil.com About Myself Degree B.S.

More information

JOURNAL OF OBJECT TECHNOLOGY Online at Published by ETH Zurich, Chair of Software Engineering. JOT, 2002

JOURNAL OF OBJECT TECHNOLOGY Online at  Published by ETH Zurich, Chair of Software Engineering. JOT, 2002 JOURNAL OF OBJECT TECHNOLOGY Online at www.jot.fm. Published by ETH Zurich, Chair of Software Engineering. JOT, 2002 Vol. 1, No. 2, July-August 2002 Representing Design Patterns and Frameworks in UML Towards

More information

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich CSCD01 Engineering Large Software Systems Design Patterns Joe Bettridge Winter 2018 With thanks to Anya Tafliovich Design Patterns Design patterns take the problems consistently found in software, and

More information

REVIEW OF THE BASIC CHARACTERISTICS OF OBJECT ORIENTATION

REVIEW OF THE BASIC CHARACTERISTICS OF OBJECT ORIENTATION c08classandmethoddesign.indd Page 282 13/12/14 2:57 PM user 282 Chapter 8 Class and Method Design acceptance of UML as a standard object notation, standardized approaches based on work of many object methodologists

More information

LABORATORY 1 REVISION

LABORATORY 1 REVISION UTCN Computer Science Department Software Design 2012/2013 LABORATORY 1 REVISION ================================================================== I. UML Revision This section focuses on reviewing the

More information

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1 Ingegneria del Software Corso di Laurea in Informatica per il Management Design Patterns part 1 Davide Rossi Dipartimento di Informatica Università di Bologna Pattern Each pattern describes a problem which

More information

Reuse at Design Level: Design Patterns

Reuse at Design Level: Design Patterns Reuse at Design Level: Design Patterns CS 617- Lecture 17 Mon. 17 March 2008 3:30-5:00 pm Rushikesh K. Joshi Department of Computer Sc. & Engg. Indian Institute of Technology, Bombay Mumbai - 400 076 Reuse

More information

Foundations of Software Engineering Design Patterns -- Introduction

Foundations of Software Engineering Design Patterns -- Introduction Foundations of Software Engineering Design Patterns -- Introduction Fall 2016 Department of Computer Science Ben-Gurion university Based on slides of: Nurit Gal-oz, Department of Computer Science Ben-Gurion

More information

Chapter 11 Object and Object- Relational Databases

Chapter 11 Object and Object- Relational Databases Chapter 11 Object and Object- Relational Databases Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Outline Overview of Object Database Concepts Object-Relational

More information

An Introduction to Patterns

An Introduction to Patterns An Introduction to Patterns Robert B. France Colorado State University Robert B. France 1 What is a Pattern? - 1 Work on software development patterns stemmed from work on patterns from building architecture

More information

Last Lecture. Lecture 17: Design Patterns (part 2) Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 4448/ Spring Semester, 2005

Last Lecture. Lecture 17: Design Patterns (part 2) Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 4448/ Spring Semester, 2005 1 Lecture 17: Design Patterns (part 2) Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 4448/6448 - Spring Semester, 2005 2 Last Lecture Design Patterns Background and Core Concepts Examples

More information

Component ConcreateComponent Decorator ConcreateDecoratorA ConcreteDecoratorB

Component ConcreateComponent Decorator ConcreateDecoratorA ConcreteDecoratorB Comp435 Object-Oriented Design Week 12 Computer Science PSU HBG Attach additional responsibilities to an object dynamically Provide a flexible alternative to subclassing for extending functionality Attach

More information

Presenter: Dong hyun Park

Presenter: Dong hyun Park Presenter: 200412325 Dong hyun Park Design as a life cycle activity bonds the requirements to construction Process of breaking down the system into components, defining interfaces and defining components

More information

Facade and Adapter. Comp-303 : Programming Techniques Lecture 19. Alexandre Denault Computer Science McGill University Winter 2004

Facade and Adapter. Comp-303 : Programming Techniques Lecture 19. Alexandre Denault Computer Science McGill University Winter 2004 Facade and Adapter Comp-303 : Programming Techniques Lecture 19 Alexandre Denault Computer Science McGill University Winter 2004 March 23, 2004 Lecture 19 Comp 303 : Facade and Adapter Page 1 Last lecture...

More information

Software Engineering Prof. Rushikesh K.Joshi IIT Bombay Lecture-15 Design Patterns

Software Engineering Prof. Rushikesh K.Joshi IIT Bombay Lecture-15 Design Patterns Software Engineering Prof. Rushikesh K.Joshi IIT Bombay Lecture-15 Design Patterns Today we are going to talk about an important aspect of design that is reusability of design. How much our old design

More information

Last Lecture. Lecture 26: Design Patterns (part 2) State. Goals of Lecture. Design Patterns

Last Lecture. Lecture 26: Design Patterns (part 2) State. Goals of Lecture. Design Patterns Lecture 26: Design Patterns (part 2) Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2003 Last Lecture Design Patterns Background and Core Concepts Examples Singleton,

More information

In this Lecture you will Learn: Design Patterns. Patterns vs. Frameworks. Patterns vs. Frameworks

In this Lecture you will Learn: Design Patterns. Patterns vs. Frameworks. Patterns vs. Frameworks In this Lecture you will Learn: Design Patterns Chapter 15 What types of patterns have been identified in software development How to apply design patterns during software development The benefits and

More information

SAMOS: an Active Object{Oriented Database System. Stella Gatziu, Klaus R. Dittrich. Database Technology Research Group

SAMOS: an Active Object{Oriented Database System. Stella Gatziu, Klaus R. Dittrich. Database Technology Research Group SAMOS: an Active Object{Oriented Database System Stella Gatziu, Klaus R. Dittrich Database Technology Research Group Institut fur Informatik, Universitat Zurich fgatziu, dittrichg@ifi.unizh.ch to appear

More information

Universal Communication Component on Symbian Series60 Platform

Universal Communication Component on Symbian Series60 Platform Universal Communication Component on Symbian Series60 Platform Róbert Kereskényi, Bertalan Forstner, Hassan Charaf Department of Automation and Applied Informatics Budapest University of Technology and

More information

Modeling the Dialogue Aspects of an Information System

Modeling the Dialogue Aspects of an Information System Association for Information Systems AIS Electronic Library (AISeL) ECIS 2000 Proceedings European Conference on Information Systems (ECIS) 2000 Modeling the Dialogue Aspects of an Information System M.

More information

Software Development Methodologies

Software Development Methodologies Software Development Methodologies Lecturer: Raman Ramsin Lecture 3 Seminal Object-Oriented Methodologies: A Feature-Focused Review 1 Responsibility-Driven Design (RDD) Introduced in 1990; a UML-based

More information

The Music Notation Toolkit: A Study in Object- Oriented Development

The Music Notation Toolkit: A Study in Object- Oriented Development Proceedings of the NACCQ 2000 Wellington NZ www.naccq.ac.nz ABSTRACT The Music Notation Toolkit: A Study in Object- Oriented Development Central Institute of Technology Upper Hutt New Zealand andrew.eales@cit.ac.nz

More information

OO Analysis and Design with UML 2 and UP

OO Analysis and Design with UML 2 and UP OO Analysis and Design with UML 2 and UP Dr. Jim Arlow, Zuhlke Engineering Limited Clear View Training 2008 v2.5 1 UML principles Clear View Training 2008 v2.5 2 1.2 What is UML? Unified Modelling Language

More information

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico Modellistica Medica Maria Grazia Pia INFN Genova Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico 2002-2003 Lezione 8 OO modeling Design Patterns Introduction Creational Patterns Software

More information

Product line annotations with UML-F

Product line annotations with UML-F Product line annotations with UML-F Wolfgang Pree 1), Marcus Fontoura 2), Bernhard Rumpe 3) 1) Department of Computer Sciences, University of California, Berkeley 2) IBM Almaden Research Center, San Jose,

More information

Domain Engineering And Variability In The Reuse-Driven Software Engineering Business.

Domain Engineering And Variability In The Reuse-Driven Software Engineering Business. OBM 7 -draft 09/02/00 1 Domain Engineering And Variability In The Reuse-Driven Software Engineering Business. Martin L. Griss, Laboratory Scientist, Hewlett-Packard Laboratories, Palo Alto, CA. Effective

More information

Automatic Code Generation for Non-Functional Aspects in the CORBALC Component Model

Automatic Code Generation for Non-Functional Aspects in the CORBALC Component Model Automatic Code Generation for Non-Functional Aspects in the CORBALC Component Model Diego Sevilla 1, José M. García 1, Antonio Gómez 2 1 Department of Computer Engineering 2 Department of Information and

More information

2.1 Design Patterns and Architecture (continued)

2.1 Design Patterns and Architecture (continued) MBSE - 2.1 Design Patterns and Architecture 1 2.1 Design Patterns and Architecture (continued) 1. Introduction 2. Model Construction 2.1 Design Patterns and Architecture 2.2 State Machines 2.3 Timed Automata

More information

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions) By the end of this course, students should CIS 1.5 Course Objectives a. Understand the concept of a program (i.e., a computer following a series of instructions) b. Understand the concept of a variable

More information

Idioms for Building Software Frameworks in AspectJ

Idioms for Building Software Frameworks in AspectJ Idioms for Building Software Frameworks in AspectJ Stefan Hanenberg 1 and Arno Schmidmeier 2 1 Institute for Computer Science University of Essen, 45117 Essen, Germany shanenbe@cs.uni-essen.de 2 AspectSoft,

More information

Object-Oriented Design

Object-Oriented Design Object-Oriented Design Lecture 14: Design Workflow Department of Computer Engineering Sharif University of Technology 1 UP iterations and workflow Workflows Requirements Analysis Phases Inception Elaboration

More information

Software Component Relationships. Stephen H. Edwards. Department of Computer Science. Virginia Polytechnic Institute and State University

Software Component Relationships. Stephen H. Edwards. Department of Computer Science. Virginia Polytechnic Institute and State University Software Component Relationships Stephen H. Edwards Department of Computer Science Virginia Polytechnic Institute and State University 660 McBryde Hall Blacksburg, VA 24061-0106 Tel: (540)-231-7537 Email:

More information

Product Line Annotations with UML-F

Product Line Annotations with UML-F Product Line Annotations with UML-F Wolfgang Pree 1, Marcus Fontoura 2, and Bernhard Rumpe 3 1 Department of Computer Sciences (guest), Univ. of California, Berkeley, pree@eecs.berkeley.edu 2 IBM Almaden

More information

Object Oriented Paradigm

Object Oriented Paradigm Object Oriented Paradigm Ming-Hwa Wang, Ph.D. Department of Computer Engineering Santa Clara University Object Oriented Paradigm/Programming (OOP) similar to Lego, which kids build new toys from assembling

More information

CHAPTER 9 DESIGN ENGINEERING. Overview

CHAPTER 9 DESIGN ENGINEERING. Overview CHAPTER 9 DESIGN ENGINEERING Overview A software design is a meaningful engineering representation of some software product that is to be built. Designers must strive to acquire a repertoire of alternative

More information

2 Data Reduction Techniques The granularity of reducible information is one of the main criteria for classifying the reduction techniques. While the t

2 Data Reduction Techniques The granularity of reducible information is one of the main criteria for classifying the reduction techniques. While the t Data Reduction - an Adaptation Technique for Mobile Environments A. Heuer, A. Lubinski Computer Science Dept., University of Rostock, Germany Keywords. Reduction. Mobile Database Systems, Data Abstract.

More information

Tuesday, October 4. Announcements

Tuesday, October 4. Announcements Tuesday, October 4 Announcements www.singularsource.net Donate to my short story contest UCI Delta Sigma Pi Accepts business and ICS students See Facebook page for details Slide 2 1 Design Patterns Design

More information

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich CSCD01 Engineering Large Software Systems Design Patterns Joe Bettridge Winter 2018 With thanks to Anya Tafliovich Design Patterns Design patterns take the problems consistently found in software, and

More information

Design Patterns. Comp2110 Software Design. Department of Computer Science Australian National University. Second Semester

Design Patterns. Comp2110 Software Design. Department of Computer Science Australian National University. Second Semester Design Patterns Comp2110 Software Design Department of Computer Science Australian National University Second Semester 2005 1 Design Pattern Space Creational patterns Deal with initializing and configuring

More information

Design Patterns. Observations. Electrical Engineering Patterns. Mechanical Engineering Patterns

Design Patterns. Observations. Electrical Engineering Patterns. Mechanical Engineering Patterns Introduction o to Patterns and Design Patterns Dept. of Computer Science Baylor University Some slides adapted from slides by R. France and B. Tekinerdogan Observations Engineering=Problem Solving Many

More information

Martin P. Robillard and Gail C. Murphy. University of British Columbia. November, 1999

Martin P. Robillard and Gail C. Murphy. University of British Columbia. November, 1999 Migrating a Static Analysis Tool to AspectJ TM Martin P. Robillard and Gail C. Murphy Department of Computer Science University of British Columbia 201-2366 Main Mall Vancouver BC Canada V6T 1Z4 fmrobilla,murphyg@cs.ubc.ca

More information

extrinsic members RoleB RoleA

extrinsic members RoleB RoleA ASPECT- ORIENTED PROGRAMMING FOR ROLE MODELS Elizabeth A. Kendall Department of Computer Science, Royal Melbourne Institute of Technology GPO Box 2476V, Melbourne, VIC 3001, AUSTRALIA email: kendall@rmit.edu.au

More information

Sustainable software design with design patterns

Sustainable software design with design patterns 18 Sustainable software design with design patterns Adelino R. F. da Silva Departamento de Engenharia Electrotecnica Universidade Nova de Lisboa 2825 Monte de Caparica, Portugal T: +351.1.2948338; Fax:

More information

2.1 Design Patterns and Architecture (continued)

2.1 Design Patterns and Architecture (continued) MBSE - 2.1 Design Patterns and Architecture 1 2.1 Design Patterns and Architecture (continued) 1. Introduction 2. Model Construction 2.1 Design Patterns and Architecture 2.2 State Machines 2.3 Abstract

More information

On UML2.0 s Abandonment of the Actors-Call-Use-Cases Conjecture

On UML2.0 s Abandonment of the Actors-Call-Use-Cases Conjecture On UML2.0 s Abandonment of the Actors-Call-Use-Cases Conjecture Sadahiro Isoda Toyohashi University of Technology Toyohashi 441-8580, Japan isoda@tutkie.tut.ac.jp Abstract. UML2.0 recently made a correction

More information

An Expert System for Design Patterns Recognition

An Expert System for Design Patterns Recognition IJCSNS International Journal of Computer Science and Network Security, VOL.17 No.1, January 2017 93 An Expert System for Design Patterns Recognition Omar AlSheikSalem 1 and Hazem Qattous 2 1 Department

More information

Lecture Notes on Programming Languages

Lecture Notes on Programming Languages Lecture Notes on Programming Languages 85 Lecture 09: Support for Object-Oriented Programming This lecture discusses how programming languages support object-oriented programming. Topics to be covered

More information

Design Patterns IV Structural Design Patterns, 1

Design Patterns IV Structural Design Patterns, 1 Structural Design Patterns, 1 COMP2110/2510 Software Design Software Design for SE September 17, 2008 Class Object Department of Computer Science The Australian National University 18.1 1 2 Class Object

More information

Summary of the course lectures

Summary of the course lectures Summary of the course lectures 1 Components and Interfaces Components: Compile-time: Packages, Classes, Methods, Run-time: Objects, Invocations, Interfaces: What the client needs to know: Syntactic and

More information

Outline. Computer Science 331. Information Hiding. What This Lecture is About. Data Structures, Abstract Data Types, and Their Implementations

Outline. Computer Science 331. Information Hiding. What This Lecture is About. Data Structures, Abstract Data Types, and Their Implementations Outline Computer Science 331 Data Structures, Abstract Data Types, and Their Implementations Mike Jacobson 1 Overview 2 ADTs as Interfaces Department of Computer Science University of Calgary Lecture #8

More information

Software Engineering - I An Introduction to Software Construction Techniques for Industrial Strength Software

Software Engineering - I An Introduction to Software Construction Techniques for Industrial Strength Software Software Engineering - I An Introduction to Software Construction Techniques for Industrial Strength Software Chapter 9 Introduction to Design Patterns Copy Rights Virtual University of Pakistan 1 Design

More information

OODP Session 4. Web Page: Visiting Hours: Tuesday 17:00 to 19:00

OODP Session 4.   Web Page:   Visiting Hours: Tuesday 17:00 to 19:00 OODP Session 4 Session times PT group 1 Monday 18:00 21:00 room: Malet 403 PT group 2 Thursday 18:00 21:00 room: Malet 407 FT Tuesday 13:30 17:00 room: Malet 404 Email: oded@dcs.bbk.ac.uk Web Page: http://www.dcs.bbk.ac.uk/~oded

More information

Software Engineering from a

Software Engineering from a Software Engineering from a modeling perspective Robert B. France Dept. of Computer Science Colorado State University USA france@cs.colostate.edu Softwaredevelopment problems Little or no prior planning

More information

Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns

Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns Software Engineering ITCS 3155 Fall 2008 Dr. Jamie Payton Department of Computer Science University of North Carolina at Charlotte

More information

Crash course on design patterns

Crash course on design patterns Crash course on design patterns Yann-Gaël Guéhéneuc guehene@emn.fr From Olivier Motelet s course (2001/10/17) École des Mines de Nantes, France Object Technology International, Inc., Canada Design patterns

More information

Lecture 13: Design Patterns

Lecture 13: Design Patterns 1 Lecture 13: Design Patterns Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2005 2 Pattern Resources Pattern Languages of Programming Technical conference on Patterns

More information

CISC 322 Software Architecture

CISC 322 Software Architecture CISC 322 Software Architecture Lecture 14: Design Patterns Emad Shihab Material drawn from [Gamma95, Coplien95] Slides adapted from Spiros Mancoridis and Ahmed E. Hassan Motivation Good designers know

More information

For 100% Result Oriented IGNOU Coaching and Project Training Call CPD TM : ,

For 100% Result Oriented IGNOU Coaching and Project Training Call CPD TM : , Course Code : MCS-032 Course Title : Object Oriented Analysis and Design Assignment Number : MCA (3)/032/Assign/2014-15 Assignment Marks : 100 Weightage : 25% Last Dates for Submission : 15th October,

More information

Pattern-Oriented Development with Rational Rose

Pattern-Oriented Development with Rational Rose Pattern-Oriented Development with Rational Rose Professor Peter Forbrig, Department of Computer Science, University of Rostock, Germany; Dr. Ralf Laemmel, Department of Information Management and Software

More information

Trusted Components. Reuse, Contracts and Patterns. Prof. Dr. Bertrand Meyer Dr. Karine Arnout

Trusted Components. Reuse, Contracts and Patterns. Prof. Dr. Bertrand Meyer Dr. Karine Arnout 1 Last update: 2 November 2004 Trusted Components Reuse, Contracts and Patterns Prof. Dr. Bertrand Meyer Dr. Karine Arnout 2 Lecture 5: Design patterns Agenda for today 3 Overview Benefits of patterns

More information

Pattern Resources. Lecture 25: Design Patterns. What are Patterns? Design Patterns. Pattern Languages of Programming. The Portland Pattern Repository

Pattern Resources. Lecture 25: Design Patterns. What are Patterns? Design Patterns. Pattern Languages of Programming. The Portland Pattern Repository Pattern Resources Lecture 25: Design Patterns Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2003 Pattern Languages of Programming Technical conference on Patterns

More information

Design Pattern. CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.)

Design Pattern. CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.) Design Pattern CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.) A. Design Pattern Design patterns represent the best practices used by experienced

More information

Behavioral Design Patterns Used in Data Structures Implementation

Behavioral Design Patterns Used in Data Structures Implementation Behavioral Design Patterns Used in Data Structures Implementation Niculescu Virginia Department of Computer Science Babeş-Bolyai University, Cluj-Napoca email address: vniculescu@cs.ubbcluj.ro November,

More information

Design Patterns V Structural Design Patterns, 2

Design Patterns V Structural Design Patterns, 2 Structural Design Patterns, 2 COMP2110/2510 Software Design Software Design for SE September 17, 2008 Department of Computer Science The Australian National University 19.1 1 2 Formal 3 Formal 4 Formal

More information

Slides copyright 1996, 2001, 2005, 2009, 2014 by Roger S. Pressman. For non-profit educational use only

Slides copyright 1996, 2001, 2005, 2009, 2014 by Roger S. Pressman. For non-profit educational use only Chapter 16 Pattern-Based Design Slide Set to accompany Software Engineering: A Practitioner s Approach, 8/e by Roger S. Pressman and Bruce R. Maxim Slides copyright 1996, 2001, 2005, 2009, 2014 by Roger

More information

Design Patterns IV. Alexei Khorev. 1 Structural Patterns. Structural Patterns. 2 Adapter Design Patterns IV. Alexei Khorev. Structural Patterns

Design Patterns IV. Alexei Khorev. 1 Structural Patterns. Structural Patterns. 2 Adapter Design Patterns IV. Alexei Khorev. Structural Patterns Structural Design Patterns, 1 1 COMP2110/2510 Software Design Software Design for SE September 17, 2008 2 3 Department of Computer Science The Australian National University 4 18.1 18.2 GoF Structural

More information

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT. Object Oriented Programming

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT. Object Oriented Programming BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT Object Oriented Programming Examiner s Report March 2017 A1. a) Explain what is meant by the following terms:

More information

HyperFrame - A Framework for Hypermedia Authoring

HyperFrame - A Framework for Hypermedia Authoring HyperFrame - A Framework for Hypermedia Authoring S. Crespo, M. F. Fontoura, C. J. P. Lucena, D. Schwabe Pontificia Universidade Católica do Rio de Janeiro - Departamento de Informática Universidade do

More information

Modeling Cooperative Behavior Using Cooperation Contracts. Peter Lang. Abstract

Modeling Cooperative Behavior Using Cooperation Contracts. Peter Lang. Abstract Modeling Cooperative Behavior Using Cooperation Contracts Michael Schre Department of Data & Knowledge Engineering University of Linz Altenbergerstr. 69, A-4040 Linz, Austria schre@dke.uni-linz.ac.at Gerti

More information

Solution: Reuse Design Patterns Design patterns support reuse of software architecture Patterns embody successful solutions to problems that arise whe

Solution: Reuse Design Patterns Design patterns support reuse of software architecture Patterns embody successful solutions to problems that arise whe Introduction Experience Using Design Patterns to Evolve Communication Software Across Diverse Platforms Developing portable, reuseable, and ecient communication software is hard OS platforms are often

More information

On UML2.0 s Abandonment of the Actors- Call-Use-Cases Conjecture

On UML2.0 s Abandonment of the Actors- Call-Use-Cases Conjecture Vol. 4, No. 6 Special issue: Use Case Modeling at UML-2004 On UML2.0 s Abandonment of the Actors- Call-Use-Cases Conjecture Sadahiro Isoda, Toyohashi University of Technology, Toyohashi 441-8580, Japan

More information

The Object Recursion Pattern

The Object Recursion Pattern SilverMark, Inc. woolf@acm.org OBJECT RECURSION Object Behavioral Intent Distribute processing of a request over a structure by delegating polymorphically. Object Recursion transparently enables a request

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database Extensions to SQL ODMG Object Model and the Object Definition Language ODL Object Database Conceptual

More information

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011 Design Patterns Lecture 2 Manuel Mastrofini Systems Engineering and Web Services University of Rome Tor Vergata June 2011 Structural patterns Part 2 Decorator Intent: It attaches additional responsibilities

More information