New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... ·...

30
U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 1 ΗΥ351: Ανάλυση και Σχεδίαση Πληροφοριακών Συστημάτων Information Systems Analysis and Design Γιάννης Τζίτζικας ∆ιάλεξη : 12b Ημερομηνία : Από την Ανάλυση στη Σχεδίαση (Moving on Design) Στρατηγικές Σχεδίασης (Design Strategies) ∆ιαστρωμάτωση και Πακετοποίηση (Layering and Packaging) HY351 - Ανάλυση και Σχεδίαση Πληροφοριακών Συστημάτων CS351 - Information Systems Analysis and Design U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 2 ∆ιάρθρωση Φάση Σχεδίασης (Design Phase) Στρατηγικές Σχεδίασης (Design Strategies) Custom Development, Packaged Software, Outsourcing Επιλέγοντας στρατηγική σχεδίασης (Selecting a Design Strategy) Από την Ανάλυση στη Σχεδίαση Από τα Μοντέλα Ανάλυσης στα Μοντέλα Σχεδίασης Διαμερίζοντας το Πρόβλημα Διαστρωμάτωση (Layering) Πακέτα και Διαγράμματα Πακέτων (Packages and Package Diagrams) Πακετοποίηση και Ομαδοποίηση (Packaging and Clustering)

Transcript of New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... ·...

Page 1: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 1

ΗΥ351:Ανάλυση και Σχεδίαση Πληροφοριακών ΣυστημάτωνInformation Systems Analysis and Design

Γιάννης Τζίτζικας

∆ιάλεξη : 12b Ημερομηνία :

Από την Ανάλυση στη Σχεδίαση(Moving on Design)

Στρατηγικές Σχεδίασης (Design Strategies)∆ιαστρωμάτωση και Πακετοποίηση (Layering and Packaging)

HY351 - Ανάλυση και Σχεδίαση Πληροφοριακών ΣυστημάτωνCS351 - Information Systems Analysis and Design

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 2

∆ιάρθρωση

• Φάση Σχεδίασης (Design Phase)

• Στρατηγικές Σχεδίασης (Design Strategies)– Custom Development, Packaged Software, Outsourcing

– Επιλέγοντας στρατηγική σχεδίασης (Selecting a Design Strategy)

• Από την Ανάλυση στη Σχεδίαση– Από τα Μοντέλα Ανάλυσης στα Μοντέλα Σχεδίασης

– Διαμερίζοντας το Πρόβλημα – Διαστρωμάτωση (Layering)

– Πακέτα και Διαγράμματα Πακέτων (Packages and Package Diagrams)

– Πακετοποίηση και Ομαδοποίηση (Packaging and Clustering)

Page 2: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 3

Υπενθυμιστικό: Η Φάση της Σχεδίασης (Design)

Βήματα:1. Στρατηγική Σχεδίασης (Design Strategy). Ανάπτυξη από τον ίδιοτον οργανισμό, ή εξωτερική ανάθεση (outsourcing) σε μιαάλλη εταιρεία, ή αγορά ενός υπάρχοντος πακέτου λογισμικού;

2. Αρχιτεκτονική Σχεδίαση (Architecture Design): υλικό, λογισμικό, δικτυακή υποδομή, διεπαφή χρήστη, φόρμες, αναφορές, βάσειςδεδομένων, κλπ.

3. Περιγραφή Αρχείων και Βάσεων Δεδομένων : ποια ακριβώςδεδομένα θα αποθηκεύονται και πού;

4. Σχεδίαση των Προγραμμάτων : ποια προγράμματα πρέπει ναγραφτούν και τι θα κάνει το κάθε ένα;

Αποτέλεσμα/Παραδοτέα: Προδιαγραφή Συστήματος (System Specification) η οποία δίδεταιστην ομάδα των προγραμματιστών προς υλοποίηση

Planning

Analysis

Design

Implementation

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 4

Υπενθυμιστικό: Η Φάση Σχεδίασης στις ΜεθοδολογίεςΑνάπτυξης

Planning

Analysis

Design

Implementation

System

Planning

Analysis

Design

Implementation

System

Design

Implementation

Design

Implementation

Design

Integration

Planning

Analysis

Implementation

Design

Analysis

system v1

Implementation

Design

Analysis

system v2

Implementation

Design

Analysis

system v3

Planning

Implementation

Design

Analysis

System

prototype

Implementation

system

Planning

Implementation

Design

Analysis

design

prototype

Implementation

system

Analysis

Design

Page 3: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 5

Υπενθυμιστικό: Η Φάση της Σχεδίασης (Design)

Βήματα:1. Στρατηγική Σχεδίασης (Design Strategy). Ανάπτυξη από τον ίδιοτον οργανισμό, ή εξωτερική ανάθεση (outsourcing) σε μιαάλλη εταιρεία, ή αγορά ενός υπάρχοντος πακέτου λογισμικού;

2. Αρχιτεκτονική Σχεδίαση (Architecture Design): υλικό, λογισμικό, δικτυακή υποδομή, διεπαφή χρήστη, φόρμες, αναφορές, βάσειςδεδομένων, κλπ.

3. Περιγραφή Αρχείων και Βάσεων Δεδομένων : ποια ακριβώςδεδομένα θα αποθηκεύονται και πού;

4. Σχεδίαση των Προγραμμάτων : ποια προγράμματα πρέπει ναγραφτούν και τι θα κάνει το κάθε ένα;

Αποτέλεσμα/Παραδοτέα: Προδιαγραφή Συστήματος (System Specification) η οποία δίδεταιστην ομάδα των προγραμματιστών προς υλοποίηση

Planning

Analysis

Design

Implementation

Στρατηγικές ΣχεδίασηςDesign Strategies

Page 4: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 7

Οι κυριότερες στρατηγικές σχεδίασης(Three Main Design Strategies)

• Custom Development

Ανάπτυξη κατά παραγγελία

Πακέτο Λογισμικού

Εξωτερική ανάθεση

Building the system from scratch

Buying a packaged software and customizing it

Hiring an external person/company to build the system

• Packaged Software

• Outsourcing

Εξωτερική ανάθεση

Έτοιμο Πακέτο Λογισμικού

Ανάπτυξη από τον ίδιο τον οργανισμό

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 8

Design StrategiesCustom Development

Custom development means building the system from scratch

Advantages

• Complete control (and freedom) over the functionality of the system

• Extensibility of the system (future needs may be taken into account)

• The skills of the staff improve (beneficial for future projects)

Weaknesses

• Takes time, requires hard work (the staff may be already overcommitted)

• Appropriately skilled staff is needed

• High risk

Page 5: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 9

Design StrategiesPackaged Software

Buying a packaged system and customizing it(commercial off-the-shelf (COTS) software product)

• many business needs are common to a large number of organizations

• there are thousands of commercially available programs– that support basic and ubiquitous needs (e.g. payrolls, orders, inventory, sales, etc)

• these programs range from small components to complete ERP (enterprise resource planning) systems

– complete ERP systems have taken years and have cost millions of Euros to develop (SAP, PeopleSoft, Oracle, Baan)

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 10

Design StrategiesPackaged Software (II)

This decision strategy introduces an additional phase, the “procurement phase” which is a special decision analysis phase comprising the following steps:

1) Identify products that could fit the needs of the project– sources: special magazines, journals, Web sites, other organizations with similar

needs

2) solicit, evaluate and rank vendor proposals

3) select and recommend the best of them

4) contract with the awarded vendor to obtain the product

Procurement phase: φάση προμήθειας

Page 6: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 11

Design StrategiesPackaged Software (IΙΙ)

2) solicit, evaluate and rank vendor proposals

Commonly, this step involves preparing an RFQ or an RFP document:

RFQ (Request for Quotations) (αίτηση προσφοράς)

used when you have selected the product but the product is available from various distributions. Objective: negotiate configuration, prices, maintenance contract.

RFP (Request for Proposals) (αίτηση προτάσεων)

used when there are several different vendors and products that are candidate. RFP is a superset of RFQ because the former describes in detail the requirements of the project (it is like the Requirements Specification Document)

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 12

Design StrategiesPackaged Software (IV)

Advantages

• It takes a short time to buy and install it (no extra staff is needed)

• Low risk (packaged software has already been written, tested and proved to be effective)

Weaknesses

• Not full control over the functionality of the system (we cannot customize everything)– sometimes the business processes of the organization have to adapt to the software!

• Extensibility of the system for the future needs of the organization is not ensured

• The skills of your staff do not improve

• The price of the packages software is sometimes high

• The organization depends on the vendor – maintenance (plus cost of maintenance)

– Risk if the vendor bankrupts

Page 7: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 13

Design StrategiesOutsourcing

Hiring an external person/company to build the system

Types of contracts:

• time and arrangements– payment based on the time and the expenses

– [-] the bill may climb high

• fixed-price contract– requirements should be very clear

– [-] usually outsourcers are not willing to accept changes in the requirements

• value-added contract– the outsourcer will have some share of the benefits from the system

– becomes more and more popular

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 14

Design StrategiesOutsourcing (II)

Advantages

• You have the full control over the requirements

• The external party may be more skilled than you

Weaknesses

• No full control over the internal architecture of the system

• The skills of your staff do not improve

• You may have to share confidential information

• You need a person to manage the outsourcing

• Risk if you haven’t specified well the requirements

– never outsource something you don’t understand

• Risk if the external party fails

Page 8: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

Επιλέγοντας Στρατηγική Σχεδίασης(Selecting a Design Strategy)

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 16

Επιλέγοντας Στρατηγική Σχεδίασης

Custom Development

Unique business need

Your staff has technical skills and you want to enhance them

Loose and flexible deadline

Packaged System

Very common business need

Technical skills are lacking and it is not strategically important to build them

Short timeframe with strict deadline

You want to avoid risk

Outsourcing

The business need is not crucial for the organization

Technical skills are lacking and it is not strategically important to build them

A “good” outsourcer is available

What about your project?

Page 9: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 17

Επιλέγοντας Στρατηγική ΣχεδίασηςΠίνακας Εναλλακτικών (Matrix of Alternatives)

Description

Operational feasibility

Technical feasibility

Economic feasibility

Cost

Payback period

ROI

Schedule feasibility

Custom

Development

Packaged

Software

Outsourcing

Plus whatever other

criteria are appropriate

We can use a matrix of alternatives (like the one we used in feasibility analysis)

for organizing the pros and cons of each alternative. We could also employ a weighting scheme or any other decision theoretic method for selecting the best strategy for the project at hand

Hereafter we assume that we have selected the custom development design strategy

Page 10: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

Από τα Μοντέλα Ανάλυσης στα Μοντέλα Σχεδίασης(From Analysis Models to Design Models)

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 20

Από τα Μοντέλα Ανάλυσης στα Μοντέλα Σχεδίασης

Σκοπός• Τα μοντέλα ανάλυσης που έχουμε δημιουργήσει μέχρι τώρα έχουν κυρίως

εστιάσει στις Λειτουργικές Απαιτήσεις (ΛΑ)

• Τώρα πρέπει να λάβουμε υπόψη και τις Μη Λειουργικές Απαιτήσεις (ΜΛΑ)

• Στην Αντικειμενοστρεφή Ανάλυση και Σχεδίαση: πρέπει να αναθεωρήσουμε καιεκλεπτύνουμε τα μοντέλα που έχουμε δημιουργήσει μέχρι τώρα– Προσθέτοντας λεπτομέρειες που αφορούν το περιβάλλον του συστήματος

Μη-Λειτουργικές Απαιτήσεις (ΜΛΑ)

• Περιγράφουν ιδιότητες του συστήματος που συνήθως εκφράζονται βάσειχαρακτηριστικών της μορφής: Απόδοση (performance), Χρηστικότητα (usability), Ασφάλεια (security), Νομιμότητα (legislative), Ιδιωτικότητα (privacy)

• Με άλλα λόγια: περιγράφουν το πώς (ή το πόσο καλά) το σύστημα θα υποστηρίξει τιςλειτουργικές απαιτήσεις. Μπορούμε να τις θεωρήσουμε ως «περιορισμούς» πουπεριορίζουν τους τρόπους με τους οποίους θα μπορούσαμε να πραγματώσουμε τιςλειτουργικές απαιτήσεις.

Page 11: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 21

Από τα Μοντέλα Ανάλυσης στα Μοντέλα Σχεδίασης

Υψηλού επιπέδου

επιχειρηματικές ανάγκες

καταγεγραμμένες στην

Πρόταση Συστήματος

Αναλυτική Καταγραφή

Συγκεκριμένων απαιτήσεων

Καθορισμός

Απαιτήσεων

Μοντελοποίηση

Μοντελοποίηση

Λειτουργική /Δομική/Συμπεριφοράς

(Functional/Structural/Behavioral)

Μοντέλα Σχεδίασης

Αναθεώρηση

Εκλέπτυνση

Μη Λειτ/κές Ααπαιτήσεις

Ανάλυση

Σχεδίαση

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 22

Από τα Μοντέλα Ανάλυσης στα Μοντέλα ΣχεδίασηςΤεχνικά, η φάση Σχεδίασης περιλαμβάνει:

Υψηλού επιπέδου

επιχειρηματικές ανάγκες

καταγεγραμμένες στην

Πρόταση Συστήματος

Αναλυτική Καταγραφή

Συγκεκριμένων απαιτήσεων

Καθορισμός

Απαιτήσεων

Μοντελοποίηση

Μοντελοποίηση

Λειτουργική /Δομική/Συμπεριφοράς

(Functional/Structural/Behavioral)

Μοντέλα Σχεδίασης

Αναθεώρηση, Εκλέπτυνση

Μη Λειτ/κές Ααπαιτήσεις

Ανάλυση

Σχεδίαση• Σχεδίαση Κλάσεων και Μεθόδων

• Σχεδίαση Επιπέδου ΔιαχείρισηςΔεδομένων

• Σχεδίαση Επικοινωνίας με Χρήστη

• Σχεδίαση Φυσικής Αρχιτεκτονικής

Page 12: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 23

Από την Ανάλυση στη ΣχεδίασηΤεχνικά, η φάση Σχεδίασης περιλαμβάνει:

• Class and Method Design

• Data Management Layer Design

• Human Computer Interaction Design

• Physical Architecture Layer Design

Each of the above topics will be covered in the subsequent lectures

• class specifications (detailed Class Diagrams)

• Contracts, Method Specifications

• file structure, database

• Use Scenarios, Windows Navigation Diagrams, Interface Standards, User Interface Templates

• Deployment Diagrams, Hardware/Software Specifications

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 24

Ένα από παλαιότερα ερωτήματα(One of the oldest questions in software methods)

Πώς να σπάσουμε ένα μεγάλο σύστημα;Λόγος: Αν είναι μεγάλο τότε έχουμε δυσκολίες κατανόησης, επέκτασης,

αλλαγής

Φάση Ανάλυσης:Για να σπάσουμε ένα μεγάλο σύστημα στο παρελθόν κάναμε ΛειτουργικήΑποσύνθεση (Functional Decomposition). Χρησιμοποιούνταν τις μέρες πουοι διαδικασίες (processes) και τα δεδομένα ήταν διαχωρισμένα

Σήμερα: Περιπτώσεις Χρήσης (Use Cases)

Φάση Σχεδίασης:

Εντοπισμός στρωμάτων (layers) και πακέτων (packages)– (packages are sometimes called subsystems)

Τα πακέτα είναι ζωτικής σημασίας εργαλεία για τα μεγάλα έργα

Τα πακέτα είναι επίσης καλά για δοκιμές (testing in package basis)

Page 13: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 25

Εντοπισμός ΣτρωμάτωνIdentification of Layers

Foundation Layer

Physical Architecture

Human Computer Interaction

Data Management

Problem Domain Η εννοιολογική προοπτική

Αφορά τα αντικείμενα που απαιτούν μόνιμη αποθήκευση

Κλάσεις Διεπαφής Χρήστη

Επικοινωνία, Αρχιτεκτονική Λογισμικού

Π.χ. θεμελιώδεις τύποι δεδομένων (συνήθωςπεριλαμβάνονται στο αντικειμενοστρεφές περιβάλλον ανάπτυξης)

layers can be represented using the higher level (UML) concept of PACKAGE

Παράδειγμα διαστρωμάτωσης:

• Έως τώρα έχουμε κυρίως εστιάσει στην «εννοιολογική προοπτική» (ή αλλιώς μοντέλοπροβλήματος, μοντέλο πεδίου εφαρμογής, problem domain layer)

• Τώρα πρέπει να προσθέσουμε λεπτομέρειες που αφορούν στο περιβάλλον τουσυστήματος

• Ένας τρόπος για να αποφύγουμε την υπερφόρτωση του σχεδιαστή είναι ναχρησιμοποιήσουμε πολλά layers (στρώματα)

Πακέτα και ∆ιαγράμματα ΠακέτωνPackages and Package Diagrams

Divida et impera (divide and rule)

Page 14: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 27

Πακέτa της UMLUML Packages

Τα Πακέτα είναι ένας γενικός μηχανισμός ομαδοποίησης ο οποίοςεπιτρέπει να ομαδοποιήσουμε οποιαδήποτε στοιχεία της UML σευψηλότερου επιπέδου μονάδες– Συνήθως χρησιμοποιείται για την ομαδοποίηση κλάσεων

Ένα πακέτο μπορεί να ομαδοποιήσει

• κλάσεις

• άλλα μοντέλα σχεδίασης

• …….

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 28

∆ιαγράμματα ΠακέτωνPackage Diagrams

Εξαρτήσεις (Dependencies):

• Οι εξαρτήσεις δεν είναι μεταβατικές

• Μια καλή πρακτική είναι η απαλοιφή των κυκλικών εξαρτήσεων (τουλάχιστον ημείωση τους)

• Η τέχνη της σχεδίασης μεγάλης κλίμακας: ελαχιστοποίηση εξαρτήσεων

P2 P1

To P2 εξαρτάται από το P1

Σημαίνει ότι μια αλλαγή στο P1 μπορεί να απαιτήσει αλλαγή του P2

Απεικονίζουν τα πακέτα και τις μεταξύ τους εξαρτήσεις (dependencies)

Page 15: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 29

Ένα διάγραμμα πακέτων (που ομαδοποιούν κλάσεις)

Order CaptureUI

Order CaptureApplication

AWT

Mailing ListUI

Orders Customers

Mailing ListApplication

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 30

Τρόποι ∆ιαγραμματικής Απεικόνισης Πακέτων

java::util::Date

util

package name

Date

util util

Date

package name + contents

java::util

Date

fully qualified package name

util

Date

java

nested packages

Page 16: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 31

Πακέτα, Ορατότητα, και ΕισαγωγήPackages, Visibility and Importing

• We can define the visibility of the elements owned by a package as we defined the visibility of the attributes and operations of a class.

• +: public

• -: private: seen only the elements of the same package

• #: protected: seen only by the elements of the same package and its children

• To refer to the class of another package you need to use the qualified name of the class (package name::class name)

• import allows using direct names (not qualified ones)

• importing adds the public elements from the target package to the public namespace of the importing package. Notation in UML: <<import>>

“Import” vs “Access”: “Access” is like “import” but you cannot reexport. So it is not transitive (import is transitive)

util

+Date

+Tree

- XYZ

P2 P1<<import>>

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 32

Παραδείγματα

presentation<<subsystem>>

control<<subsystem>>

entity<<subsystem>>

mediator<<subsystem>>

foundation<<subsystem>>

Cinterface

Minterface

Einterface

Finterface

java

applet

awt

lang

Page 17: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

Στρώματα ως ΠακέταLayers as Packages

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 34

Μοντελοποιώντας Στρώματα ως ΠακέταModeling Layers using Packages

HCI

Data Management

Problem Domain

Foundation

Physical ArchitectureFoundation Layer

Physical Architecture

Human Computer Interaction

Data Management

Problem Domain

Page 18: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 35

Πακέτα για Μοντελοποίηση διάφορων Αρχιτεκτονικών ΌψεωνPackages for Modeling the various Architectural Views

Μπορούμε να χρησιμοποιήσουμε πακέτα για να μοντελοποιήσουμε τιςδιαφορετικές όψεις ενός συστήματος

Design ViewImplementation

View

Use Case View

Deployment View

Interaction View

Data Storage

Data Access Logic

Application Logic

Presentation Logic

Layer N

Layer N-1

Layer 3

Layer 2

Layer 1

Πακετοποίηση ΚλάσεωνPackaging Classes

Page 19: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 37

Πακετοποίηση Κλάσεων: ΚίνητροPackaging classes: Motivation

• Οι κλάσεις αποτελούν το βασικό μέσο δόμησης ενός αντικειμενοστρεφούςσυστήματος

• Είναι όμως αυτή η δόμηση αρκετή αν έχουμε εκατοντάδες κλάσεων;?

Συμβουλή: Χρησιμοποίηστε Πακέτα όταν ένα διάγραμμα κλάσεων δεν χωράεισε μια σελίδα A4

NOTE: The relationsh ips in b lue are generic relationsh ips that are detailed by specific relationsh ips.

0-1

0-N

WorkersCompensationClaim-Po licyHolder

1-1

0-NW orkersCompensationClaim-Notifier

1-1

0-N

WaterVeh icle-SeatingCapacity

1-1

0-NWaterVeh icle-LoadCapacity

1-1

0-NWaterVeh icle-Eng ine

1-1

0-N

Victim-ProfessionSeniority

1-1

0-1

Victim-MutualHealth Insurer

1-1

0-N

Victim-JobCategorySen io rity

1-1

0-N

Victim-CompanySen io rity1-1

0-N

Victim-BranchSen io rity

1-1

0-N

Victim-BonusReceptionDeclarati

0-N

1-1

Victim-AIKReceptionDeclaration

1-10-1

Victim-ActualInsu rer

1-1

0-N

Victim-ActivityExecu tionAddres

1-1

0-1VERIDASSRegistration -Requester

0-1

0-N

Veh icle-Transpo rtedGoods

0-1

0-N

Vehicle-SecuritySystem

1-1 0-1Veh icle-RegistrationPlateHo lde

1-1

0-1

Veh icle-Moto rTPL

1-1

0-1

Veh icle-Moto rTheft

1-1 0-1Vehicle-Moto rPartialComprehensive

1-1

0-1

Vehicle-MotorFullComprehensive

1-1

0-1

Veh icle-MotorFire

1-1 0-1Veh icle-LeasingCompany

1-1

0-N

TotalLoss-RequestFo rBid

0-1

0-N

Subguaran tee-Cover

1-1

0-N

SpecialCond ition-Clause

0-1

0-NSettlemen t-Party

0-1

0-N

Settlement-Guaran tee

0-1

0-N

Settlement-Cover

0-1

1-1 RiskObject-PreviousInsurer

1-1

0-N

RequestFo rBid -Bid/Offer

0-1

0-NRelatedParty -Rate

1-10-1 RelatedParty -OfficialAddress

1-1

0-N

RelatedParty-OfficeTelephone

1-1

0-N

RelatedParty-MobileTelephone

1-1

0-N

RelatedParty-HomeTelephone

1-1

0-N

RelatedParty-Fax

1-1

0-N RelatedParty-ExternalRo le

1-1

0-N

RelatedParty-eMail

1-1

0-N RegLegPerson-PartyRole

1-1

0-1

RegLegPers-SocialSecu rityBurea1-1

0-1

RegLegPers-ParityCommittee

1-1

0-1

RegLegPers-Ho lidayPayBureau

1-1

0-1

RegLegPers-FamilyAllowanceBureau

1-1

0-1Property-RiskAddress

0-1

1-1

Profession -Activ ityExectu tionAddress

1-1 0-NPrivateVeh icle/Truck-Driver

1-1

0-N

PreNot-RenewalPremiumPeriod

1-1

0-N

PreNot-Pro rationPremiumPeriod

0-N

0-1

0-N

PremiumNotification -PIRelatedA

1-1

0-1

PremiumLine-PolicyHolder

1-1

0-1

Premium-Tax

1-1

0-1

Premium-Subscrip tionIndex

1-1

0-1

Premium-Sp litPaymentLoad ing

1-1

0-1

Premium-PreviousIndex

1-1

0-1Premium-OtherInsuranceReductio

1-1

0-1

Premium-FidelityBonus

1-1

0-1

Premium-CommercialDiscount

1-1

0-1

Premium-ActualIndex

1-1

0-N

Po licyHolder-RSRReg istration

0-N

0-1

0-N

PolicyHolder-PreviousPolicy

0-N

0-1

PolicyHolder-PreviousClaim

0-1

0-N

PolicyHolder-PrevInsRefusal

0-N

1-1

Po licyHolder-PreventionMeasure

0-1

0-N

Po licyHolder-OffencePend ing

0-1

0-N

Po licyHolder-NCBLevel

0-1

0-N

PolicyHolder-Conv iction

0-1

0-1

Po licyHolder-BillingAddress

0-1

0-N

PolicyHolder-Acciden tsSinceAdjustment

1-1

0-N

PhysicalPerson -PartyRole

1-1

0-N

PhysicalIn ju ry-TreatingMed ical

1-1

0-N

PhysicalIn ju ry -Hospital

1-1

0-N

PhysicalInjury-FirstAidSupp lie

1-1

0-N

PhysicalIn ju ry-Disability

1-1

0-N

PhysicalInjury -CertifyingMedic

1-1

0-1

Party-PreviousAddress

1-1

0-1

Party-OfficialAddress

1-1

0-N

Party-OfficeTelephone

1-1

0-N

Party-MobileTelephone

1-1

0-1

Party-MailPrimaryAddress

1-1

0-N

Party-HomeTelephone

1-1

0-N

Party -Fax

1-1

0-N

Party-eMail

1-10-N OpponentTh irdParty-CircumstanceColumn

1-1

0-N NonRegLegPerson -PartyRole

1-1

0-1

Moto risedRoadVeh icle-VehiclePassenger

1-1

0-N

MotorisedRoadVehicle-TechnicarData

1-1

0-1

Moto risedRoadVeh icle-SeatingCapacity

1-1

0-1

MotorisedRoadVehicle-LoadCapacity

1-1

0-N

MotorisedRoadVehicle-Hau lageTrailer

1-1

0-1

Moto risedRoadVeh icle-Engine

1-1

0-N

MotorisedRoadVehicle-Caravan

1-1

0-N

MotorInsuranceCon tract-VERIDAS

1-1 MaterialOb ject-Owner

1-1 MaterialObject-FinanceCompany

1-1

0-1MaterialDamage-Repairer

1-1

0-1

MaterialDamage-DamagedObject

1-1

0-NMaterialDamage-Assesso r

1-1

0-N

LifeInsContract-ReferencePremium

1-1

0-N

LifeInsCon tract-LifeProfitSharing

1-1

0-N

LifeInsCon tract-LastPremium

1-1

0-N

LifeInsContract-FirstPremium

1-1

0-N

LifeInsContract-DeceaseProfitSharing

1-1

0-1

LegalPerson-HeadOfficeAddress

1-1

0-1 LegalPerson-BranchOfficeAddres

1-1

1-1

KfkOperation -SendingCompany

1-1

1-1

KfkOperation-Receiv ingCompany

1-1

0-N

InsuredPerson -PrimaryOccupation0-1

0-1

Insu redPerson-PermanentDisabil

1-1

0-1

Insu redPerson-GeneralLife

1-1

0-N

InsuredPerson -Add itionalOccupation1-1

0-N

InsuredPerson -Add itionalActiv ities

1-1

0-N

Insured -CircumstanceCo lumn

1-1

0-N

InsuranceProv ider-FileAdmin ist

1-1

Incident-W itness

1-1

Incident-OpponentThirdParty

1-1

Incident-In terveningAuthority

1-1 Inciden t-EventAddress

1-1

0-N

Hunting-Hun tingLicence

1-10-N Guarantee-Subguarantee

1-1

0-N

Guarantee-SpecialCondition

1-1

0-1

Guarantee-ProportionalPremium

1-1

0-1

Guaran tee-OldPremium

1-1

0-1

Guaran tee-NetPremiumNonIndexed

1-1

0-1

Guarantee-NetPremiumIndexed

1-1

0-N

Guaran tee-In sValBasedDeductib le

1-1

0-1

Guarantee-GrossPremium

1-10-N

Guarantee-GeneralCondition

1-1

0-N

Guarantee-Extension

1-1

0-1

Guarantee-DamAmBasedDeductible

1-1

0-N

Guaran tee-DailyAllowance

0-1

0-N

Guarantee-Cover

1-1

0-N

Guaran tee-Cost/Charge

1-1

0-N

Guarantee-Commission

1-1

0-N

Guarantee-Cap ital

1-1

0-1

Guaran tee-BasePremium

1-1

0-1

Guarantee-AnnualPremiumNonInde

1-1

0-1

Guaran tee-AnnualPremiumIndexed

1-1

0-NGuarantee-AnnualIndemnification

1-1

0-NGeneralLife-Beneficiary

1-1

0-N

GeneralCondition-Clause

0-1

1-N

Fleet-Vehicle

1-1

0-N

FactualGroup-PartyRo le

1-1

1-2

EANForm-CircumstanceCo lumn

0-10-N Driver-PreviousClaim

0-1

0-N

Driver-NCBLevel

1-1

0-N

Driver-Driv ingLicenceW ithdrawa

1-1

0-1

Driver-DrivingLicence

0-1

0-N

Driver-Acciden tsSinceAdjustment

1-1

0-N

Documen t-DocumentExchangeDetails

1-10-N Declaration-Response

0-1

0-NDamagedObject-Valuation

0-1

1-1

Damage-Guarantee

1-1

0-N

CurAcc-PremiumReturnLine

1-1

0-N

CurAcc-PremiumReimbursementLine

1-1

0-N

CurAcc-PremiumInvoiceLine

1-1

0-N

CurAcc-PremiumCancellationLine

1-1

0-NCurAcc-MiscellTransLine

1-1

0-N

CurAcc-FinTransLine

1-1

0-N

CurAcc-CommissionLine

1-1

0-N

CurAcc-ClaimLine

1-10-N CurAcc-BordereauTo talLine

1-1

0-1

CoverLimit-Subscrip tionIndex

1-1

0-1

CoverLimit-PreviousIndex

1-1

0-1

CoverLimit-ActualIndex

1-1

0-N

Couple-PartyRole

1-1

0-1

Con tract-Transfer

1-1

0-1

Contract-Suspension

1-1

0-N

Con tract-SpecialCond ition

0-1

0-N

Con tract-RelatedPolicy

1-1

0-1

Contract-ProportionalPremium0-1

1-N

Contract-PremiumNotification

0-1

1-N

Con tract-PolicyHo lder

1-1

0-1

Contract-Po licyChange

1-1

0-1

Contract-NetPremiumNonIndexed

1-1

0-1

Contract-NetPremiumIndexed

1-N

0-N

Con tract-In termed iary

1-N

0-N

Con tract-In surer

1-N Contract-In suranceObject

1-1

0-1

Con tract-GrossPremium

1-1

0-N

Contract-GeneralCondition

1-1

0-N

Contract-Cost/Charge

0-N

1-1

Contract-CoPo licyHolder

1-1

0-N

Con tract-Con tractDocumen t

1-1

0-N

Contract-Commission

1-1

0-N

Contract-Coinsu rer

0-1

0-N

Con tract-Claim

1-1

0-1

Contract-Cancellation

1-1

0-1

Contract-Annulmen t

1-10-1 Contract-AnnualPremiumNonIndex

1-1

0-1Con tract-AnnualPremiumIndexed

1-1

0-1

Contract-Amendment

0-1

0-N

Contents-SecuritySystem

0-1

0-1

Contents-GeneralFire

0-1

0-1

Contents-Burglary/Theft

1-1

0-1

ClaimLine-PolicyHo lder

0-1

0-N

Claiman t-Settlement

0-N

Claimant-Profession

0-10-N Claimant-Damage

0-N

0-1

Claim-ManagementAct

1-1

0-N

Claim-KfkOperation

1-1

0-N

Claim-Intermediary

1-1

0-1

1-N

Claim-Claiman t

1-1

1-6

CircumstanceCo lumn-Circumstance

0-1 0-NBuilding -TakeOverPolicy

0-1

0-1

Building -Sto rmHailAndHeavySnow

0-1

0-N

Build ing-SecuritySystem

0-1

1-1

Build ing-PolicyHolder

0-1

0-1 Build ing-GeneralFire

1-1

1-N

Bordereau -BordereauLine

1-1

0-N

BonusReceptionDeclaration -Bonus

0-1 Assessment-Settlemen t

1-1

Assessmen t-DamagedObject

1-1

0-N

AirVehicle-SeatingCapacity

1-1

0-N

AirVehicle-LoadCapacity

1-1 0-NAirVehicle-Engine

1-1

0-N

AIKReceptionDeclaration-AIK

0-1

0-1

AccountingDocumen t-Intermed iar

0-1

0-1Accoun tingDocument-In surer

P

WorkersCompensationContract

WorkersCompensationClaim

W orkersCompensation

Witness

W aterVehicle

Victim

VERIDASSReg istration

VehicleReg istrationPlateHolder

VehicleReg istrationCard

Veh iclePassengers

Vehicle

Valuation

TreatingMed icalDocto r

TravelIn suranceCon tract

TransportInsu ranceContract

TransportedGoods

Transfer

To talTemporaryDisability

To talLoss

ThirdCommission

TemporaryDisab ility

Telephone

TechnicarData

Tax

TariffPremium

TakeOverPolicy

Suspension

Subscription Index

Subguarantee

Sto rmHailAndHeavySnow

StartIndex

SplitPremiumPaymentLoad ing

SpecialCond ition

SpaceVehicle

SocialSecu rityBureau

Settlement

Seniority

SendingCompany

Secu ritySystemCertificate

SecuritySystem

SecondResidencyAddress

SecondCommission

SeatingCapacity

RSRRegistration

RoadVeh icle

RiskObject

RiskAddress

Response

ResidentialCaravan

RequestForBid

Requester

Representative

ReplacedPolicy

Repairer

Renewal

RelatedPolicy

RelatedParty

RegisteredLegalPerson

ReferencePremium

Receiv ingCompany

RealEstate

Rate

RailVehicle

Pro ration

ProportionalPremium

Property

ProfitSharing

Pro fessionSeniority

PrivateMotorisedRoadVeh icle

PrivateBu ilding

PrimaryOccupation

PreviousPolicy

Prev iousInsurer

Prev iousInsu ranceRefusal

Prev iousIndex

PreviousClaim

Prev iousAddress

PreventionMeasure

PremiumRetu rnLine

PremiumReimbursemen tLine

PremiumPeriod

PremiumNotification

PremiumLoad ing

PremiumLine

PremiumInvoiceRelatedAction

PremiumInvoiceLine

PremiumInvoice

PremiumDiscoun tOrLoading

PremiumDiscount

PremiumCancellationLine

PremiumAndCommissionReversiblePremiumLine

Premium

PolicyHolder

Po licy

PhysicalPerson

PhysicalInjury

PersonalLiab ility Insu ranceCon tract

Permanen tDisabilityCover

PermanentDisab ility

PartyRo le

Party

PartialTemporaryDisability

ParityCommittee

Owner

OtherPrivateBuildingOtherPo licy

OtherInsuranceReduction

OpponentTh irdParty

OldPremium

OfficialAddress

OfficeTelephone

OffencePend ing

Notifier

NonRegisteredLegalPerson

NonMotorisedRoadVehicle

NetPremiumNonindexed

NetPremiumIndexed

NetPremium

NCBYearMinus3

NCBYearMinus2

NCBReference

NCBPreviousNCBLevel

NCBAtUnderwriting

NCBAtPreviousInsu rer

NCBActual

MutualHealthInsu rer

MotorTh irdPartyLiab ility

MotorTheft

Moto rPartialComprehensive

Moto risedRoadVehicle

MotorInsuranceContract

MotorFu llComprehensive

Moto rFire

Moto rCycleCertificate

MotorComprehensive

MortgageLoanFile

MoralDamage

MobileTelephone

MiscellaneousTransactionLine

MedicalDocto r

MaterialDamage

ManagementAct

MailSecondaryAddress

MailPrimaryAddress

Machinery/Appliances

LoadCapacity

LifeProfitSharing

LifeInsuranceContract

LegalPerson

LegalExpensesInsuranceContract

LeasingCompany

LastPremium

LastCommission

Land

KfkRequestForRefund

KfkOperation

KfkDebitOrCreditStatemen t

JobCategorySeniority

In terven ingAuthority

Intermediary

Insurer

InsuredValueBasedDeductible

InsuredPerson

Insured

InsuranceProv ider

Ind iv idualInsu ranceCon tract

Index

Indemnification

IdentityCard

HuntingLicence

Hunting

Hospital

HomeTelephone

HolidayPayBureau

HeadOfficeAddress

Hau lageTrailer

Guaran tee

GroupInsuranceCon tract

Group

GrossPremium

GreenCard

GeneralLife

GeneralFire

GeneralConditionsWording

GeneralCond ition

GeneralCivilLiability

Garage

FutureAddress

Fleet

FirstPremium

FirstCommission

FirstAidSupplier

FireInsuranceCon tract

FinancialTransactionLine

FinancialDamage

FinanceCompany

FileAdmin istrato r

FidelityBonus

Fee

Fax

FamilyAllowanceBureau

FactualGroup

ExternalRo le

Extension

Expense

Even tAddress

EuropeanAcciden tNotificationForm

Engine

EndIndex

EmployeeBenefitsContract

eMail

Dwelling

DrivingLicenceWithd rawal

Driv ingLicence

Driver

DocumentExchangeDetails

Document

Disab ility

DirectPayment

Deductib le

Declaration

DeceaseProfitSharing

DataEn tryOperator

DamagedObject

DamageAmoun tBasedDeductible

Damage

DailyAllowance

CurrentAccoun tLine

Curren tAccount

Cred ito r

CoverNote

CoverLimit

Cover

Coup le

Cost/Charge

CoPolicyHolder

Conviction

Con tractDocumen t

ContractChange

Con tract

Conten ts

Condition

CompanySeniority

CommunicationChannel

CommonLaw

CommissionLine

Commission

CommercialMotorisedRoadVehicle

CommercialLoss

CommercialInsu ranceCon tract

CommercialDiscount

CommercialBu ild ing

Collection

Coinsu rer

Clause

ClaimLine

Claiman t

Claim

Civ ilLiabilityHorsesAndCarriages

CircumstanceColumn

Circumstance

CertifyingMed icalDoctor

Caravan

Cap ital

Cancellation

Calculation

Burglary/Theft

Building

BranchSeniority

BranchOfficeAddress

BordereauTotalLine

BordereauLine

Bordereau

BonusRecep tionDeclaration

Bonus

BillingAddress

Bid/Offer

Bicycle

Beneficiary

BasePremium

Assesso r

Annulmen t

AnnualPremiumNonIndexed

AnnualPremiumIndexed

AnnualPremium

AnnualIndemnification

Amendment

AirVehicle

Advan tageInKindRecep tionDeclaration

AdvantageInKind

Address

AddOnInsu rer

AdditionalOccupation

AdditionalActivity

ActualInsurerOf

ActualIndex

Activ ityExecutionAddress

Action

Acqu isitionCommission

AccountingDocumen tLine

AccountingDocumen t

AccidentsSinceAdjustmen t

Overview/Concep tual

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 38

Πακετοποίηση Κλάσεων: ΙδιότητεςPackaging classes: Properties

Ιδιότητες• Μια κλάση μπορεί να ανήκει σε ένα μόνο πακέτο• Μια κλάση πρέπει να έχει μοναδικό όνομα μέσα στο πακέτο• Ένα πακέτο μπορεί να περιέχει κλάσεις και άλλα πακέτα

Άρα μπορούμε να ορίσουμε μια ιεραρχική δομή

Σημείωση:• Τα UML packages αντιστοιχούν στα packages της Java

Page 20: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 39

Πακετοποίηση Κλάσεων: Κριτήρια

Η πακετοποίηση των κλάσεων μπορεί να γίνει βάσει διαφόρωνκριτηρίων, π.χ.:

• βάσει συγγραφέα (who wrote what)

• βάσει λειτουργίας (e.g. Storage Manager, UI, MVC, …)

• βάσει αρχιτεκτονικού στρώματος (architectural tier), π.χ. θαμπορούσαμε να διακρίνουμε τις εξής κατηγορίες κλάσεων:

Data Storage

Data Access Logic

Application Logic

Presentation Logic

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 40

Πακετοποίηση Κλάσεων: Κριτήρια

Ένας άλλος τρόπος διαμέρισης των κλάσεων:

• persistent database classes– Οι κλάσεις που απαιτούν μόνιμη αποθήκευση

• entity classes: those that will reside in the main memory– Οι κλάσεις που θα βρίσκονται στην κύρια μνήμη

• boundary classes (interfaces)– Οι διεπαφές

• control classes: specify business logic function– Επιχειρηματική λειτουργίες

Page 21: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 41

Παράδειγμα: ∆ιάγραμμα Κλάσεων Συστήματος ΚράτησηςΡαντεβού (εννοιολογικό επίπεδο)

Taken from Dennis et al. 2005

PERSON

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 42

Παράδειγμα: ∆ιάγραμμα Πακέτων του Συστήματος ΚράτησηςΡαντεβού

Data Storage

Data Access Logic

Application Logic

Presentation Logic

Page 22: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 43

Ποιες κλάσεις να βάλουμε σε ένα πακέτο;Which classes to put in which packages ?

Δυο γενικές αρχές:

• Common Closure Principle– the classes in a package should need changing for similar reasons

• Common Reuse Principle– the classes in a package should all be reused together (semantically close)

These principles drive us to the notion of cohesion

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 44

Πακετοποίηση Κλάσεων: Συμβουλές

A well structured package

• is cohesive (providing a crispy boundary around a set of related elements)

• is loosely coupled (exporting only those elements other packages really need to see and importing only those elements necessary and sufficient for the elements in the package)

• is not deeply nested (human understanding is limited)

Cohesion =συνεκτικότητα/συνοχή, Cohesive = συνεκτικό

coupling = σύζευξη, loosely coupled = χαλαρά ζευγμένα

Packaging relates to clustering

Page 23: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 45

ΟμαδοποίησηClustering

• Clustering is the process of grouping similar objects into naturally associated subclasses.

• This process results in a set of “clusters” which somehow describe the underlying objects at a more abstract or approximate level.

• The process of clustering is typically based on a “similarity measure” which allows the objects to be classified into separate natural groupings.

• A cluster is then simply a collection of objects that are grouped togetherbecause they collectively have a strong internal similarity based on such a measure.

• A similarity measure (or dissimilarity measure) quantifies the conceptual distance between two objects, that is, how alike or disalike a pair of objects are. – Determining exactly what type of similarity measure to use is typically a domain

dependent problem.

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 46

ΟμαδοποίησηClustering

• Clustering is used in areas such as: – medicine, anthropology, economics, soil analysis, data mining

– software engineering (reverse engineering, program comprehension, software maintenance)

– information retrieval

• In general, any field of endeavor that necessitates the analysis and comprehension of large amounts of data may use clustering.

A clustering of a set N is a partition of N, i.e. a set C1,…, Ck of subsets of N, such that:

C1 ∪… ∪ Ck = N and Ci ∩ Cj =∅, for all i≠j.

Packaging relates to graph clustering

Page 24: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 47

Ομαδοποίηση ΓράφουGraph Clustering

• Graph clustering deals with the problem of clustering a graph– grouping similar nodes of a graph into a set of subgraphs

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 48

Ποιοτικά κριτήρια μεθόδων ομαδοποίησης γράφωνQuality criteria for graph clustering methods

Graph clustering methods should produce clusters with

high cohesion and low coupling• high cohesion:

– there should be many internal edges

• low “cut size”: – The cut size (else called external cost) of a clustering measures how many edges are

external to all sub-graphs, that is, how many edges cross cluster boundaries.

• Uniformity of cluster size is also often desirable. – A uniform graph clustering is where |Ci| is close to |Cj| for all i,j in {1..k}

Page 25: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 49

Παράδειγμα

1

2

3

4

5

6

7

89

1

2

3

4

5

6

7

89

A B

C

Cut size =2

1

2

3

4

5 6 7

89

Cut size =4 AB

C

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 50

Μέτρα Ποιότητας για ομαδοποίηση γράφωνQuality Measures for Graph Clustering

• There are several. One well known is the CC measure (Coupling-Cohesion measure)

||||||

EEE

CCexin −

=

• Ein: the “internal” edges: those that connect nodes of the same cluster

• Eex: the “external” edges: those that cross cluster boundaries

• maximum value of CC: 1 – when all edges are internal

• minimum value of CC: -1– when all edges are external

Page 26: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 51

Παράδειγμα

1

2

3

4

5

6

7

89

A B

C

Cut size =2

1

2

3

4

5 6 7

89

Cut size =4 AB

C 2.010

46=

−=CC

6.010

28=

−=CC

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 52

Ιεραρχική Ομαδοποίηση ΓράφωνHierarchical Graph Clustering

• The clusters of the graph can be clustered themselves to form a higher level clustering, and so on.

• A hierarchical clustering is a collection of clusters where any two clusters are either disjoint or nested.

B

1

2

3

4

5

6

7

89

A

C

DE

1

2

3

4

5

6

7

89

A B

C

Page 27: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 53

Ιεραρχικά Ομαδοποιημένος ΓράφοςHierarchical Clustered Graph

A Hierarchical Clustered Graph (HCG) is a pair (G,T) where

G is the underlying graph, and

T is a rooted tree such that the leaves of T are the nodes of G.

(the tree T represents an inclusion relation: the leaves of T are nodes of G, the internal nodes of T represent a set of graph nodes, i.e. a cluster)

1

2

3

4

5

6

7

89

A B

C

DE

1

23

4

5 6 7

89

A B C

D

EHCG

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 54

Συνεπαγόμενες ΑκμέςImplied Edges

Implied edges: edges between the internal nodes.

Two clusters are connected iff the nodes that they contain are related.

Multiple implied edges (between the same pair of clusters) can be ignored or summed up to form weighted implied edges. Thresholding can applied in order to filter out some implied edges

1

23

4

5 6 7

89

A B C

D

E

A Hierarchical Compound Graph is a triad (G,T, I) where (G,T) is a hierarchical clustered graph (HCG), and I the set of implied edges set.

Page 28: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 55

Πακέτα και Ομαδοποίηση ΓράφωνPackages and Graph Clustering

Ποιος είναι ο γράφος G=(N,E) στην περίπτωση μας?

• N: Κλάσεις

• E: οι διάφορες σχέσεις εξάρτησης– δομικές, π.χ. συσχετίσεις κλάσεων και οι σχέσεις γενίκευσης/εξειδίκευσης

– συμπεριφορικές, π.χ. τα βέλη στα διαγράμματα επικοινωνίας

– Οι απλές εξαρτήσεις (π.χ. λόγω παραμέτρων)

– “semantical” (similarity of use/purpose: hard to infer automatically]

Ποιος είναι ο ιεραρχικά ομαδοποιημένος γράφος (G,T, I) στην περίπτωση μας?

• G (όπως πριν)

• T– Φύλλα του Τ: οι κόμβοι του N (δηλαδή οι κλάσεις)

– Εσωτερικοί κόμβοι αμέσως πάνω από τα φύλλα: πακέτα

– Εσωτερικοί κόμβοι υψηλότερου επιπέδου: πακέτα πακέτων

• I : οι συνεπαγόμενες ακμές εδώ είναι εξαρτήσεις μεταξύ των πακέτων

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 56

Packaging and Clustering: Homework

• Assume we have an implemented system whose classes are not packaged.

• How could you partition them to packages?

Page 29: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 57

Example: Package diagrams in EA

A «merge» connector between twopackages defines an implicitgeneralization between elements in thesource package, and elements with thesame name in the target package. Thesource element definitions areexpanded to include the elementdefinitions contained in the target. Thetarget element definitions areunaffected, as are the definitions ofsource package elements that don'tmatch names with any element in thetarget package.

«import» connector: indicatesthat the elements withinthe target package, whichin this example is a singleclass, use unqualifiednames when beingreferred to from the sourcepackage. The sourcepackage's namespacegains access to the targetclasses; the target'snamespace is not affected.

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 58

Page 30: New IS 12 Moving to Design Packages - University of Cretehy351/2007/downloads/Lectures/IS_12... · 2007. 11. 28. · Custom Development Packaged Software Outsourcing Plus whatever

U. of Crete, Information Systems Analysis and Design Yannis Tzitzikas 59

ΠερίληψηSummary

• Alternative strategies to design and create the new system: Custom building, packaged software, outsourcing

• The object-oriented approach to analysis and design is based on use-case modeling, is architecture centric, and supports functional, static and dynamic views of the system.

• When evolving analysis into design models, it is important to review the analysis models then add system environment information.

• Packages and package diagrams help provide structure and less complex views of the new system.

– Set the context

– Cluster classes together based on shared relationships

– Model clustered classes as a package

– Identify dependency relationships among packages

– Place dependency relationships between packages