How To Understand And Understand Universtitie Mls 2.2.2



Similar documents
Examen Software Engineering /09/2011

Software Development Process

Software Requirement Specification

IT-waardeketen management op basis van eeuwenoude supply chain kennis

Requirement engineering Exercise the POS System solution

Principles of Software Construction: Objects, Design, and Concurrency. Domain Modeling and Specifying System Behavior. toad

Use Cases. Reference: Craig Larman, Applying UML and Patterns, Ch. 6

Case Study: Inception Phase. L. ch. 3-5

Domain Modeling. Domain Modeling

Citrix Access Gateway: Implementing Enterprise Edition Feature 9.0

Relationele Databases 2002/2003

Chapter 3 Chapter 3 Service-Oriented Computing and SOA Lecture Note

Corporate Universities Aanjagers van de lerende organisatie

Verticale tuin maken van een pallet

How to Make a Domain Model. Tutorial

Xtreme RUP. Ne t BJECTIVES. Lightening Up the Rational Unified Process. 2/9/2001 Copyright 2001 Net Objectives 1. Agenda

DORI in de praktijk Paul van Dooren Sales District Manager

Met wie moet je als erasmusstudent het eerst contact opnemen als je aankomt?

Object-Oriented Design Guidelines

CMMI version 1.3. How agile is CMMI?

QAFE. Oracle Gebruikersclub Holland Rokesh Jankie Qualogy. Friday, April 16, 2010

Sample test Secretaries/administrative. Secretarial Staff Administrative Staff

~ We are all goddesses, the only problem is that we forget that when we grow up ~

Inhoudsopgave. Vak: Web Analysis 1 Vak: Web Information 1 Vak: Web Science 2 Vak: Web Society 3 Vak: Web Technology 4

A methodology for secure software design

101 Inspirerende Quotes - Eelco de boer - winst.nl/ebooks/ Inleiding

Research Report. Ingelien Poutsma Marnienke van der Maal Sabina Idler

Virtualisatie. voor desktop en beginners. Gert Schepens Slides & Notities op gertschepens.be

HR Transformation and Future of HR Brussel, 25 april 2013 Material part 1/2

COOLS COOLS. Cools is nominated for the Brains Award! Coen Danckmer Voordouw

Information technology specialist (systems integration) Informatietechnologie specialist (systeemintegratie) Professional activities/tasks

Use Cases. Massimo Felici. Massimo Felici Use Cases c

How To Test A Website On A Web Browser

How to deliver Self Service IT Automation

Scenario-based Requirements Engineering and User-Interface Design

IP-NBM. Copyright Capgemini All Rights Reserved

Composing Concerns with a Framework Approach

OutSystems on Oracle

UvA college Governance and Portfolio Management

CS 389 Software Engineering. Lecture 2 Chapter 2 Software Processes. Adapted from: Chap 1. Sommerville 9 th ed. Chap 1. Pressman 6 th ed.

employager 1.0 design challenge

The state of DIY. Mix Express DIY event Maarssen 14 mei 2014

Experiences with ALM tools in Software Engineering course

Requirements engineering

Software product management. Inge van de Weerd

IES - Introduction to Software Engineering

Agile Modeling: A Brief Overview

Introduction to Software Engineering (ESE : Einführung in SE)

6 USE CASES. Introduction. Chapter 6. Objectives. The indispensable first step to getting the things you want out of life: decide what you want.

Citrix XenApp and XenDesktop Fast Track

Requirements engineering and quality attributes

A Meeting Room Scheduling Problem

Private Equity Survey 2011

Oversight Management: een zinvolle aanvulling!

Load Balancing Lync Jaap Wesselius

Logging en Monitoring - privacy, beveiliging en compliance Enkele praktijkvoorbeelden

Applying 4+1 View Architecture with UML 2. White Paper

Organization. Introduction to Software Engineering

THE EMOTIONAL VALUE OF PAID FOR MAGAZINES. Intomart GfK 2013 Emotionele Waarde Betaald vs. Gratis Tijdschrift April

RUP. Development Process. Iterative Process (spiral) Waterfall Development Process. Agile Development Process. Well-known development processes

How To Design A 3D Model In A Computer Program

Non-Functional Requirements

Assuring the Cloud. Hans Bootsma Deloitte Risk Services +31 (0)

Questions? Assignment. Techniques for Gathering Requirements. Gathering and Analysing Requirements

How to manage Business Apps - Case for a Mobile Access Strategy -

GMP-Z Annex 15: Kwalificatie en validatie

Software VOC netwerkbijeenkomst De kansen van OEM. Hans Schut OEM Partner Manager Nederland 9 juli 2014

ATM Case Study OBJECTIVES Pearson Education, Inc. All rights reserved Pearson Education, Inc. All rights reserved.

Data Driven Strategy. BlinkLane Consul.ng Amsterdam, 10 december Ralph Hofman Arent van t Spijker

Lecture Overview. Object-Oriented Software Engineering: Using UML, Patterns, Java, and Software Development Processes. Prof. Dr.

* Over de uitslag kan niet worden gecorrespondeerd, prijzen zijn voorbeelden All results are final, prices are examples

Laboratório de Desenvolvimento de Software

The information in this report is confidential. So keep this report in a safe place!

Using Use Cases for requirements capture. Pete McBreen McBreen.Consulting

Specification by Example (methoden, technieken en tools) Remco Snelders Product owner & Business analyst

Shopper Marketing Model: case Chocomel Hot. Eric van Blanken 20th October 2009

Technical Specification ideal

Name of pattern types 1 Process control patterns 2 Logic architectural patterns 3 Organizational patterns 4 Analytic patterns 5 Design patterns 6

I219 Software Design Methodology

100 Series Keyboard Tray Pivot

1.1 The Nature of Software... Object-Oriented Software Engineering Practical Software Development using UML and Java. The Nature of Software...

Information Security Governance

User experience storyboards: Building better UIs with RUP, UML, and use cases

From Systems to Services

High-level Design. What is software architecture?

Computer Programming I

Anton Wilsens. The LIRIS Academy Keys to a successful mobile channel in the Financial Services Sector and beyond

Applying Agile Methods in Rapidly Changing Environments

Transcription:

Ontwerp van SoftwareSystemen 1 Introduction Roel Wuyts OSS 2011-2012

People Roel Wuyts URL: http://roelwuyts.be/ Dries Vanoverberghe Dries.Vanoverberghe@cs.kuleuven.be Mario Henrique Cruz Torres mariohenrique.cruztorres@cs.kuleuven.be 2

Doelstellingen In deze cursus komt het ontwerpen van software systemen aan bod. De nadruk ligt op objectgerichte methodes. Een belangrijke doelstelling is het leren nemen van ontwerpbeslissingen op een gefundeerde manier, met het afwegen van voor- en nadelen van verschillende oplossingen met betrekking tot de analyse en vereisten, het ontwerp, de implementatie, en de organisatie. Dit alles wordt toegepast in een groepsproject dat uitbreidingen maakt op een niettriviale, en voor de studenten nieuwe, applicatie. 3

Begintermen Grondige kennis van een objectgerichte programmeertaal en objectgeoriënteerde concepten. Praktische vaardigheden bij het ontwikkelen van programma's, i.c. het gebruik van een IDE (integrated development environment) zoals Eclipse en versiebeheer software zoals svn. 4

Inhoud Hoorcollege Overzicht van software ontwikkelingsprocessen. Objectgerichte analyse en ontwerp gebruikmakend van de modeleertaal UML. Studie, evaluatie en gebruik van GRASP patronen en van ontwerp patronen. Technieken voor het realiseren van kwalitatieve objectgerichte ontwerpen en implementaties. Technieken voor het inschatten van de kwaliteit van het ontwerp en de implementatie van software systemen. 5

Course Material Slides and links on the website of the course Material http://roelwuyts.be/oss-1112/ Applying UML and Patterns (3rd ed.), Craig Larman. Design Patterns: Elements of Reusable Object-Oriented Software, E. Gamma, R. Helm, R. Johnson, J. Vlissides. Refactoring: Improving the Design of Existing Code, M. Fowler, K. Beck, J. Brant, W. Opdyke, D. Roberts. "No Silver Bullet: Essence and Accident in Software Engineering ", F.P. Brooks. 6

Project: applying the theory in practice Group Project Number of persons in a group not yet known! Three iterations: 1. Investigate and evaluate an existing implementation Analysis of an existing system 2. Extend it (Trade-offs!) Decide what to modify to realize the extension 3. Refactor it Clean up and realize a smaller extension 7

Project Effort Effort of 90 hours / student. It is possible that you spend more or less! notify me in time of possible discrepancies 8

Escalation Policy Groups do not always function smoothly But dealing with this is part of your education In case of problems: discuss within group. if it cannot be resolved: mail to your assistant (with me in cc) to describe the problem. assistant may decide to involve me if necessary. In case of problems with assistant: contact me. In case of problems with me: contact MA1 responsible. 9

Course grading: First session Project defense after iterations (grades P1,P2,P3) Individual defense after final iteration (grade I) Grading Algorithm: If Pi <= 5, 1<=i<=3 : final grade = min(p1, P2, P3) elif I <= 8: final grade = I else final grade = ( avg (P1, P2, P3) + I) / 2 If we find large work discrepancies within a group, specific grades for that group/person can be given 0 is possible when not collaborating! 10

Course grading: Second session Second session Continuing project individually Grade on project (P4) and project defense (I ) Grading algorithm from first session: lowest score replaced by P4 I replaced with I 11

Project Defense 5 minutes demonstration Each of you gets questions and answers. Then other group members can provide more information. Questions originate from your report, design and implementation. You get two kinds of feedback: during the defense:our questions and comments right after the defense: ok take care not ok 12

Grades 1st session: Final grade 10 : done! Final grade < 10 : redo in second session 2nd session: Final grade 10 : done! Final grade < 10 : credit not obtained 13

Questions? 14

About You Let s do an interactive quiz there is no right or wrong for most of the questions here; goal is for me to learn your reflexes when faced with questions related to programming language, design, or implementation. 15

Is the following correct: A message sent to super is sent to the parent of the object 16

What is the result of the following expression? } class A { public void m(a a) { System.out.println("1"); } class B extends A { public void m(b b) { System.out.println("2"); } public void m(a a) { System.out.println("3"); } } B b = new B(); A a = b; a.m(b); 17

What do you think of the following implementation? // Return null to signify end of file protected IToken fetchtoken() throws EndOfFileException { ++count; while (bufferstackpos >= 0) { // Tokens don't span buffers, stick to our current one char[] buffer = bufferstack[bufferstackpos]; int limit = bufferlimit[bufferstackpos]; int pos = bufferpos[bufferstackpos]; switch (buffer[pos]) { case '_': t = scanidentifier(); if (t instanceof MacroExpansionToken) continue; return t; case '#': if (pos + 1 < limit && buffer[pos + 1] == '#') { ++bufferpos[bufferstackpos]; return newtoken(itoken.tpoundpound); } // Should really check to make sure this is the first // non whitespace character on the line handleppdirective(pos); continue; (390 lines of code in total) 18

Reuse versus hack Suppose you are responsible to add a new feature to an existing piece of software. The design of the existing software makes this hard. How do you decide whether to rewrite the existing software or whether to hack in the new feature? 19

Object-Oriented Software Design Question A restaurant menu consists of dishes, e.g. Flemish stew, Blood sausage with apples and Chicken Royale with Champaign. Each dish consists of a number of ingredients and is either a starter, a main course or a dessert. The menu shows for each dish an authenticity score (1, 2 or 3), a calory score, as well as the price. Menus need to be printed in a variety of languages (dutch, french, english, japanese, arabic; some left-to-right and some rightto-left) and needs to be available on an interactive website (where a picture is shown of the dish). The menus change frequently with the seasons. 20

Why Software Engineering? Problem Specification Final Program But... Where did the specification come from? How do you know the specification corresponds to the user s needs? How did you decide how to structure your program? How do you know the program actually meets the specification? How do you know your program will always work correctly? What do you do if the users needs change? How do you divide tasks up if you have more than a oneperson team? 21

What is Software Engineering? (I) Some Definitions and Issues state of the art of developing quality software on time and within budget Trade-off between perfection and physical constraints Software engineering deals with real-world issues State of the art! Community decides on best practice + life-long education 22

What is Software Engineering? (II) multi-person construction of multi-version software Team-work Scale issue ( program well is not enough) + Communication Issue Parnas Successful software systems must evolve or perish Change is the norm, not the exception 23

Communication and Modeling Team-effort requires communication Results have to be communicated externally 24

UML Unified Modeling Language De-facto standard that I expect everybody to know and follow working knowledge of at least the use case, class, sequence and communication diagrams use throughout course (theory, practice, project) Self-study I give a short overview You do the study There will be a practice session 25

General Goals of UML Model systems using OO concepts Establish an explicit coupling to conceptual as well as executable artifacts To create a modeling language usable by both humans and machines Models different types of systems (information systems, technical systems, embedded systems, real-time systems, distributed systems, system software, business systems, UML itself,...) 26

11 diagrams in UML 2 Class diagram Internal Structure Diagram Collaboration diagram Component diagram Use case diagram State machine diagram Activity Diagram Sequence diagram Communication Diagram Deployment diagram Package diagram Structural Dynamic Physical Model Management 27

Requirements Engineering and Use Cases Requirements: documented need for what a system or project should do 37% of problems with software projects have to do with requirements 25% of the requirements change during the project (and 35-50% in large projects) Therefore: embrace change! 28

Types of Requirements: FURPS+ categorization Functional features, capabilities Use Cases Usability human factors, help, documentation Reliability frequency of failure, recoverability Performance Response times, throughput, accuracy, resource usage Supportability Adaptability, maintainability, configurability + implementation, interface, operations, packaging, legal Non-functional 29

Use Cases Stories that describe usage of the system describe sequence of actions with an observable result for a specific actor used by all kinds of stakeholders It does not describe the internal working of the system What, not How Responsibilities of the system are described 30

Use Case Diagram actor Cash register use case Process Sale Cashier association Refund Purchased Items system border 31

Fully Dressed Use Case Description Use case: Process Sale Primary Actor: Cashier Cashier: wants accurate, fast entry, and no payment errors, as cash drawers shortages are deduced from his/her salary Stakeholders and interests: Customer: wants purchase and fast service with minimal effort. Wants easily visible display of entered items and prices. Wants proof of purchase to support returns. Manager, Government, Payment Company,... Precondition: Success Guarantee (postcondition) Sale is saved. Tax is correctly calculated. Receipt is generated. Accounting and inventory are updated. Payment info is recorded. 32

Domain Modeling A domain model describes meaningful concepts in the problem domain again about the what, not the how does not model design artifacts (how), but models conceptual artifacts, real-world things 33

Domain model for the Cash Register example Records-sale-of concept attribute 1 Payment amount 0..1 Sales LineItem quantity Contained-in 1.. * Paid-by date time Sale 1 1 * * Captured-on 1 1 * Initiated-by 1 Customer 1 Logscompleted 6 Described-by Product Catalog 1 Store address name Register 1 Used-by * 1 1 1 Houses 1.. * Contains 1.. * Stocks * Started-by 1 1 3 Records-sales-on 1 Cashier 1 Product description price UPC Item Manager Describes * 1..* association 34

Class Diagrams Domain model is the analysis class diagram Don t show methods Domain Model conceptual perspective... Register 1 Captures 1 Sale time iscomplete : Boolean /total Register Sale Design Model DCD; software perspective... endsale() enteritem(...) makepayment(...) 1 currentsale time iscomplete : Boolean /total makelineitem(...) Avoid showing no-argument constructors & getters/setters Design model class diagrams shows methods and visibility (arrowhead on association) Register has reference to Sale; Sale does not have reference to Register 35

Class Diagrams 36

Interaction diagrams UML Interaction diagrams model message-exchange between objects 2 kinds: Communication Diagrams focus on interactions Sequence Diagrams focus on time 1: message2() message1() a:classa 2: message3() b:classb

Interaction diagramma s UML Interaction diagrams model message-exchange between objects 2 kinds: Communication Diagrams focus on interactions Sequence Diagrams focus on time a:classa b:classb message1() message2() message3()

Communication Diagram Example start message parameter direction makepayment(cashtendered) :Register 1: makepayment(cashtendered) :Sale 1.1: create(cashtendered) :Payment instance association follow-up message 39

Sequence Diagram Example time instance : User : Register : Sale msg1() msg2() activation msg3() msg4() msg5() lifeline assocation 40

Conclusion This course is about (OO) software design Understand quality design and implementation Make reasoned design decisions Make trade-offs that balance quality, effort, design, and implementation Be able to communicate your decision http://roelwuyts.be/oss-1112/ 41

Sample Questions Individual Oral Examination Waarom heb je een visitor patroon nodig als je een taal hebt die open classes/class extensies ondersteunt? Wanneer heeft het zin om het Iterator en het Composite patroon samen te gebruiken? Kan je kort zeggen wat de Decorator en Strategy Patronen zijn, en aangeven wanneer je welke zou gebruiken? Wat is een software development methodologie, en geef 2 voorbeelden. Wanneer zou je welke aanpak gebruiken? Wat is refactoring? Geef een voorbeeld van een refactoring. Wanneer refactor je in een XP project? Wat is de bedoeling van de Overview Pyramid? Hoe kan je weten of de controller in de GRASP Controller Pattern goed ontworpen is? Wat is overriding en overlading? Pas ze beiden toe op een visitor design patroon en weeg de voor- en nadelen af. Welke design patronen kunnen nuttig zijn in een Unit Testing Framework ontwerp? Bespreek de Law of Demeter. Wanneer is een verzameling unit tests goed te noemen? Wat is double dispatch. Geef een voorbeeld. Bespreek een design patroon waar double dispatch gebruikt wordt. 42