Software System Engineering - Chapter 11

  • Published on
    27-Jun-2015

  • View
    59

  • Download
    1

DESCRIPTION

Software System Engineering

Transcript

  • 1. CHAPTER 11Refining the RequirementsModelSoftware SystemEngineering (260CT)

2. In This Lecture You Will Learn:2 What is meant by a component How generalization and aggregation help todevelop reusable components How to identify generalization and composition How to model generalization and composition What is meant by the term pattern What types of patterns can be used in softwaredevelopment 3. Component-based Development Component-based development meanseither: Assembling software from pre-existingcomponents, or Building components for others to use Why are components hard? The NIH (Not-Invented-Here) syndrome Model organization 4. Component-based Development The contribution of object-orientation: Encapsulation of internal details makes iteasier to use components in systems forwhich they were not designed Generalization hierarchies make it easier tocreate new specialized classes when they areneeded Composition and aggregation structures canbe used to encapsulate components 5. Composition and Aggregation Special types of association, bothsometimes called wholepart A campaign is made up of adverts:Campaign Advert1 0..*Unfilled diamondsignifies aggregation 6. Composition and Aggregation Aggregation is essentially any wholepart relationship Semantics can be very imprecise Composition is stronger: Each part may belong to only one whole at atime When the whole is destroyed, so are all itsparts 7. Composition and Aggregation An everyday exampleClass Student Clearly not composition Students could be in several classes If class is cancelled, students are notdestroyed!1..* 0..* 8. Composition and Aggregation Another everyday exampleMeal Ingredient1 1..*Filled diamond signifies composition This is (probably) composition Ingredient is in only one meal at a time If you drop your dinner on the floor, you probablylose the ingredients too 9. Adding Structure Add generalization structures when Two classes are similar in most details,but differ in some respects May differ In behaviour (operations or methods) In data (attributes) In associations with other classes 10. Adding Structure Two types of staff:Have qualifications recordedCan be client contact for campaignBonus based on campaigns theyhave worked onCreativeAdminQualifications are not recordedNot associated with campaignsBonus not based on campaign profits 11. AddingStructurecalculateBonus( )StaffMember{abstract}staffNamestaffNostaffStartDatecalculate Bonus( )assignNewStaffGrade( )getStaffDetails( )CreativeStaffqualificationassignStaffContact( )AdminStaffcalculateBonus( ) 12. Software Development PatternsA pattern describes a problem which occurs over andover again in our environment, and thendescribes the core of a solution to thatproblem, in such a way that you can use thissolution a million times over, without ever doingit the same way twice.Alexander et al. (1977) 13. Software Development Patterns A pattern has A contexta set of circumstances orpreconditions for the problem to occur Forcesthe issues that must be addressed A software configurationthat resolves theforces 14. Software Development Patterns Patterns are found at many points in thesystems development lifecycle Analysis patterns are groups of conceptsuseful in modelling requirements Architectural patterns describe the structure ofmajor components of a software system Design patterns describe the structure andinteraction of smaller software components 15. Software Development Patterns Patterns have been applied widely insoftware development Organization patterns describe structures,roles and interactions in the softwaredevelopment organization itself Antipatterns document bad practice Mushroom Management is an organizationantipattern 16. SummaryIn this lecture you have learned about: Components, and how generalizationand aggregation help to model them How to identify and to modelgeneralization and composition What is meant by pattern, and the typesof pattern that can be used in softwaredevelopment

Recommended

View more >