Systeemontwikkeling 2 (SO2) College 4 Jozef Hooman (A6006) http://www.cs.kun.nl/~hooman/so2/ Design 22 maart 2004 Jozef Hooman 1
College overzicht 4. 22 maart 2004 A0002 5. 5 april 2004 A0013 Project presentaties 6. 19 april 2004 A0013 Architectuur 7. 10 mei 2004 A0002 Marcel Verhoef 8. 24 mei 2004 A0002 Project presentaties 22 maart 2004 Jozef Hooman 2
College Vandaag Bespreking punten vorige college Gebruikte software ontwikkelprocessen Plan volgende college Kwaliteitsattributen Analysis & Design: OO ontwerp in UML Kort: design patterns 22 maart 2004 Jozef Hooman 3
Volgende College 5 april 2004 Alle 4 GiP projecten geven presentatie over: Wat zijn de belangrijkste kwaliteitsattributen en wat zijn mogelijke spanningen/trade-offs Ontwerp: structuur, architectuur, Motivatie waarom dit zo ontworpen is; levert het bv de gewenste kwaliteitsattributen Tijd: ca 10 minuten per project 22 maart 2004 Jozef Hooman 4
Kwaliteitsattributen van software-producten Bruikbaarheid Efficiëntie Correctheid Robuustheid Portabiliteit Interoperabiliteit Onderhoudbaarheid Herbruikbaarheid 22 maart 2004 Jozef Hooman 5
Software Quality: de attributen Software Quality Factors (McCall): 22 maart 2004 Jozef Hooman 6
Functionality: FURPS Feature set and capability of the system Generality of the functions Security of the overall system Usability: human factors (aesthetics, consistency and documentation) Reliability: Frequency and severity of failure Accuracy of output MTTF Failure recovery and predictability Performance: speed, response time, resource consumption, throughput and efficiency Supportability: extensibility maintainability configurability 22 maart 2004 Jozef Hooman 7
ISO 22 maart 2004 Jozef Hooman 8
Functionality ISO9126 Suitability: The capability of the software product to provide an appropriate set of functions for specified tasks and user objectives Accuracy: provide the right or agreed results or effects. NOTE: includes the degree of precision of calculated values Interoperability: interact with one or more specified systems Security: protect information and data so that unauthorized persons or systems cannot read or modify them and authorized persons or systems are not denied access to them. NOTE: also applies to data in transmission Compliance: adhere to standards, conventions or regulations in laws and similar prescriptions 22 maart 2004 Jozef Hooman 9
Reliability ISO9126 Maturity: avoid failure as a result of faults in the software Fault tolerance: maintain a specified level of performance in cases of software faults or of infringement of its specified interface Recoverability: re-establish a specified level of level of performance and recover the data directly affected in the case of a failure NOTE: Availability (the proportion of total time during which the software product is in an up state) is a combination of maturity (which governs the frequency of failure), fault tolerance and recoverability (which governs the length of down time following each failure) Compliance: adhere to standards, conventions or regulations relating to reliability 22 maart 2004 Jozef Hooman 10
Usability ISO9126 Understandability: enable the user to understand whether the software is suitable, and how it can be used for particular tasks and conditions of use NOTE: This will depend on the documentation and initial impressions given by the software Learnability: enable the user to learn its application Operability: enable the user to operate and control it NOTE: For a system which is operated by a user, the combination of functionality, reliability, usability and efficiency can be measured externally by quality in use Attractiveness: be attractive to the user Compliance: adhere to standards, conventions, style guides or regulations relating to usability 22 maart 2004 Jozef Hooman 11
Efficiency ISO9126 Time behavior: provide appropriate response and processing times and throughput rates when performing its function, under stated conditions Resource utilization: use appropriate amounts and types of resources when the software performs its function under stated conditions Compliance: adhere to standards or conventions relating to efficiency 22 maart 2004 Jozef Hooman 12
Maintainability ISO9126 Analyzability: be diagnosed for deficiencies or causes of failures in the software, or for the parts to be modified to be identified Changeability: enable a specified modification to be implemented (which includes coding, designing and documenting changes) NOTE: If the software is to be modified by the end user, changeability may affect operability Stability: avoid unexpected effects from modifications of the software Testability: enable modified software to be validated Compliance: adhere to standards or conventions relating to maintainability 22 maart 2004 Jozef Hooman 13
Portability ISO9126 Adaptability: be adapted for different specified environments without applying actions or means other than those provided for this purpose for the software considered NOTE: Includes the scalability of internal capacity (e.g. screen fields, tables, transaction volumes, report formats,..) Installability: be installed in a specified environment Co-existence: co-exist with other independent software in a common environment sharing common resources Replaceability: be used in place of another specified software product for the same purpose in the same environment Compliance: adhere to standards or conventions relating to portability 22 maart 2004 Jozef Hooman 14
OO Design globale stappen 1. Identificeer essentiele objecten, abstraheer om klassen te identificeren 2. Maak sequence diagrammen voor typische interacties, dit levert operaties van klassen en associaties 3. Verfijn klasse diagram met attributen, associaties, rollen, multipliciteiten, aggregaties, zoek ook naar generalisaties of specialisaties (inheritance) 4. Zoek naar patterns (bv voor strong coherence, weak coupling) 5. Maak nog wat sequence diagrammen 6. Maak toestandsdiagrammen bij reactieve klassen 22 maart 2004 Jozef Hooman 15
Example Steam Boiler Control System 22 maart 2004 Jozef Hooman 16
Patterns Pattern: benoemde, instructieve, informatie over inzicht in en essentiele structuur van succesvolle oplossing voor herhaald voorkomend probleem Dus: lost probleem op en is bewezen concept NB: pattern is geen ontwerp, je moet het nog instantieren, aanpassen, combineren met andere patterns, etc. Boek: "Design Patterns: Elements of Reusable Object-Oriented Software" Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides 22 maart 2004 Jozef Hooman 17
Observer Pattern Subject Attach(observer : Observer) Detach(observer : Observer) Notify() Observer Update() Notify: for all observers o { o -> Update()} ConcreteSubj ect subjectstate GetState() ConcreteObser ver observerstate Update() return subjectstate observerstate = subject -> GetState() 22 maart 2004 Jozef Hooman 18