Software PatternsSlide 2Slide 3The concept of extracting patterns using software stability conceptsStable Design Patterns’ PropertiesStable Design Patterns AdvantagesStable Design Patterns’ ChallengesAnyAccount Pattern (1)AnyAccount Pattern (2)AnyAccount Pattern (3)AnyAccount Pattern (4)AnyAccount Pattern (5)Forces (1)Forces (2)Pattern structureParticipantsCRC Cards (1)CRC Cards (2)CRC Cards (3)Applicability with Illustrated Examples (1)Applicability with Illustrated Examples (2)Applicability with Illustrated Examples (3)Applicability with Illustrated Examples (4)Applicability with Illustrated Examples (5)Applicability with Illustrated Examples (6)Applicability with Illustrated Examples (7)Discussion QuestionsQuestions for the Next Lecture2003SJSU -- CmpE L04-S1 Stable Design PatternsSoftware Patterns Dr. M.E. Fayad, ProfessorComputer Engineering Department, Room #283I College of EngineeringSan José State UniversityOne Washington SquareSan José, CA 95192-0180 http://www.engr.sjsu.edu/~fayad2003SJSU – CmpE --- M.E. Fayad L04-S2 Stable Design Patterns2Lesson 4:Stable Design Patterns2003SJSU – CmpE --- M.E. Fayad L04-S3 Stable Design Patterns Lesson ObjectivesObjecti ves3Explore Stable Design Patterns Examine Stable Design Patterns Discuss the following Stable Design Patterns: Account Entry Party Trust2003SJSU – CmpE --- M.E. Fayad L04-S4 Stable Design PatternsProblemFIRST ABSTRACTION:Apply SSM conceptsDefine EBTs, BOs, and IOsCreate SSM for the problemSECOND ABSTRACTION:Model each EBT using SSM conceptsBuild natural domain Stable Design Pattern4The concept of extracting patterns using software stability concepts2003SJSU – CmpE --- M.E. Fayad L04-S5 Stable Design PatternsTimeless Notion PatternWorking Horse of the system PatternsAdaptability PatternsTrue Presentation of The Solution Space PatternsManagement Workflow Metaphor PatternsDomain-Independent Patterns5Stable Design Patterns’ Properties2003SJSU – CmpE --- M.E. Fayad L04-S6 Stable Design PatternsContribute to Stable ArchitecturesCan be Used to Model a Better Solution SpaceProvide True Solution ModelingSpecifies Hooks for ExtensionsEnhance Team Dynamic6Stable Design Patterns Advantages2003SJSU – CmpE --- M.E. Fayad L04-S7 Stable Design PatternsAbstractionsAdaptationExtensionsCustomizationIntegration7Stable Design Patterns’ Challenges2003SJSU – CmpE --- M.E. Fayad L04-S8 Stable Design PatternsIt was not too long ago when the word “account” was merely used to indicate banking and financial accounts.Today, the word “account” alone becomes a vague concept if it is not allied with a word related to a certain context. For instance, besides all of the traditional well-known business and banking accounts, today we have e-mail accounts, on-line shopping accounts, on-line learning accounts, subscription accounts, and many others kinds of accounts. 8AnyAccount Pattern (1)2003SJSU – CmpE --- M.E. Fayad L04-S9 Stable Design PatternsIn the last decade, there were many patterns that have been developed to model the account problems. However, even though they are all aimed to model the same problem “the account problem”, and they are all developed based on the long experience of their developers; however, each pattern has its own structure, with noticeable differences from the others. 9AnyAccount Pattern (2)2003SJSU – CmpE --- M.E. Fayad L04-S10 Stable Design PatternsWhat might be surprising is that most of these different models are developed for the similar applications, which are usually monetary applications, and all are claimed to be working just fine in the project they where originally developed for. Examples of different patterns that model the account problem can be found in the following Ref: [1] M. Fowler, “Analysis Patterns: Reusable Object Models”, Addison-Wesley, 1997.[2] E. Fernandez, “ The Account Analysis Pattern” , PLoP 2000[3] D. Hay, “Data model patterns”, Conventions of thought, Dorset House Publ., 1996 10AnyAccount Pattern (3)2003SJSU – CmpE --- M.E. Fayad L04-S11 Stable Design PatternsThere are some fundamental questions still to answer: –Why do we have MANY different patterns that model single problem? –Can we develop a pattern that capture the atomic account notion, and thus can serve as a base for modeling any kind of accounts?The objective of this lecture is to provide an answer to these questions by discussing and documenting the atomic pattern AnyAccount. This pattern models the core knowledge of any account, making it easy to reuse this pattern and build on the top of it to model any kind of accounts rather than thinking of the same problem each time from scratch. 11AnyAccount Pattern (4)2003SJSU – CmpE --- M.E. Fayad L04-S12 Stable Design PatternsPattern Name: AnyAccountThis pattern is required to model the core knowledge of any account without tied the pattern to a specific application or domain; hence the name AnyAccount is chosen.ProblemHow to build an account model that can capture the core knowledge of the account problem, and can be reused to model the account problem in any application? 12AnyAccount Pattern (5)2003SJSU – CmpE --- M.E. Fayad L04-S13 Stable Design PatternsAccount problem spans a fairly wide range of applications and domains, which makes the task of capturing the core concept of the account problem more challenging than it might appears. Even after extracting the common feature of different accounts types, the difficulty still resides in how these common features can be abstracted in such away that makes them still valid for all these wide applications.13Forces (1)2003SJSU – CmpE --- M.E. Fayad L04-S14 Stable Design Patterns 14Forces (2)Different accounts have some features that are not applies to other accounts types. The challenge arises when such uncommon features are associated with classes that should exist in the atomic pattern (For instance: in credit card accounts, it is acceptable to have many authorized holders who share the same credit card account. While, student account in a university, for example, is solely belongs to him, and cannot be shared. On the other hand, the account holder is an essential part in
View Full Document