UML Components John Daniels Syntropy Limited [email protected] © Syntropy Limited 2001 All rights reserved Agenda • Aspects of a component • A process for component specification • Implications for the UML email:[email protected] Syntropy Limited Aspects of a component email:[email protected] Syntropy Limited UML Unified Modeling Language • The UML is a standardised language for describing the structure and behaviour of things • UML emerged from the world of object- oriented programming • UML has a set of notations, mostly graphical • There are tools that support some parts of the UML email:[email protected] Syntropy Limited Aspects of an Object ! Specification unit 1..* Interface ! Implementation unit * realization Class 0..1 Class Implementation source 1 1 instance * Object ! Execution unit email:[email protected] Syntropy Limited Components in context ObjectObject Evolving PrinciplesPrinciples developed within adopted by adopted by 1989- 1967- RMI 1995- Smalltalk EJB DistributedDistributed Object-orientedObject-oriented ObjectObject ComponentsComponents Programming DCOM Programming TechnologyTechnology C++ Java CORBA COM+/.NET Only interoperable Typically language neutral. A way of packaging within the language. Multiple address spaces. object implementations Single address space Non-integrated services to ease their use. Integrated services email:[email protected] Syntropy Limited Component standard features • Component Model: – defined set of services that support the software – set of rules that must be obeyed in order to take advantage of the services • Simple programming model, no need to design/know about the infrastructure • Services include: – remote access, transactions, persistent storage, security – typically use services by configuring not programming email:[email protected] Syntropy Limited Aspects of a component ! It has a specification spec ! It has an implementation for (int i=0; i<limit; i++) { list[i] = … ? ! It can be }; …… deployed ! It conforms to a standard Enterprise Component ! It can be Standard packaged into modules email:[email protected] Syntropy Limited Component forms 1..* Interface * realization 0..1 Class Class Implementation source 1 ! Specification unit 1 instance * Component 1..* Object Interface Specification * spec 1 ! Implementation unit * realization Component 0..1 Component Implementation source 1 1..* 1 1..* file Component Module instance * Component ! Packaging unit Object ! Execution unit email:[email protected] Syntropy Limited Two distinct contracts Usage contract: a contract between a component object’s interface and a client Interface Client Component <<use>> Spec <<realize>> Realization contract: a contract between a component specification and a Component component Interface email:[email protected] Syntropy Limited Interface specification We could specify placeOrder( ) IOrderMgt like this: placeOrder(custNum, prodNum, quan) “The number of orders for the numOfOrders(custNum): Integer customer is increased by one and a reserveStock message is sent to the component IProductMgt supporting the IProductMgt reserveStock(prodNum, quan) availableStock(prodNum): Integer interface” email:[email protected] Syntropy Limited Separation of specification concerns The client cares about this - it affects the subsequent result of numOfOrders( ). Therefore it is part of the usage contract “The number of orders for the customer is increased by one and a reserveStock message is sent to the component The IOrderMgt client does not care about supporting the IProductMgt this - but the implementer does. Therefore it is part of the realization interface” contract email:[email protected] Syntropy Limited Interfaces versus Component Specs Component Component Interface Specification • Represents the usage contract • Represents the realization • Provides a list of operations contract • Defines an underlying logical • Provides a list of supported information model specific to interfaces the interface • Defines the run-time unit • Specifies how operations • Defines the relationships affect or rely on the between the information models information model of different interfaces • Describes local effects only • Specifies how operations should be implemented in terms of usage of other interfaces email:[email protected] Syntropy Limited Contracts and roles Specifier (Architect) A person who produces the technical specification for a system or components within a system The Usage Contract The Realization Contract Client Realizer A person who writes A person who builds a software that uses a component that meets a component component specification email:[email protected] Syntropy Limited Component deployment Component 1..* 1..* Component 1 file Module 1 installed as copy * * Installed server Installed Component 1..* 1..* Module ! Registration unit ! Installation unit email:[email protected] Syntropy Limited Example - Microsoft Word wordDocument: Component wordApplication: Component file file winword.exe: installed as ComponentModule wordDocument: installed as InstalledComponent server copy wordApplication: C:/../winword.exe: InstalledComponent server InstalledModule instance instance applicationObject: docObject: ComponentObject File / New ComponentObject email:[email protected] Syntropy Limited Example - Enterprise Java Beans invoice: c:/../invoice.java: ComponentSpec realization ComponentImplementation invoiceBean: Component file invoice.jar: ComponentModule installed as copy invoiceBean: server c:/../invoice.jar: InstalledComponent InstalledModule instance invoiceABC: ComponentObject email:[email protected] Syntropy Limited A process for component specification email:[email protected] Syntropy Limited Application Architecture Layers Presentation Web Client HTTP Client Web Server RMI / IIOP / DCOM RMI / IIOP / DCOM Service Application Server Existing Any System (server) JDBC / ODBC / SQL Data Database Server email:[email protected] Syntropy Limited Application Blueprint Web Server A/JSP Application Server Component Object Component Object Component Object Component Object Component Object Existing Database System email:[email protected] Syntropy Limited Finer-Grain Application Layers Presentation UI Logic What the user sees User Interface Dialog Logic (UseCases) User Dialog Supports multiple UIs Transient Dialog State Service Business transactions System Services Allows multiple Dialogs (including Batch) Business Integrity State Business Services Sub-transactions Business Instance State Data email:[email protected] Syntropy Limited Management and Development Processes • Management Processes – Schedule work and plan deliveries – Allocate resources 0%% complete 100% Concept model – Monitor progress Use Case model Component specs – Control risk Components • Development Processes – Create working software from requirements – Focus on software development artifacts – Described independently of the management process – Defines ordering constraints and dependencies – Organized into Workflows Use Case models Specification Component specs & architectures Business Concept Workflow models email:[email protected] Syntropy Limited Workflows in the development process Business requirements Existing Artefact assets Requirements Business Concept User models interface Technical Components constraints Use Case Specification Provisioning Assembly models Component specs Assemblies & architectures Test Tested Workflow (c.f. RUP) assemblies Deployment email:[email protected] Syntropy Limited The Requirements Workflow Problem domain Business knowledge requirements Requirements Workflow Develop Business Develop business Concept Model processes Software boundary Identify Use Cases decisions Business Use Cases Concept Model email:[email protected] Syntropy Limited Business process We want to provide some automated support for managing hotel reservations Take up reservation customer arrives/ Wait for event enquiry/ [else] cancel request/ Check amendment availability request/ Cancel [suitable reservation room] Make Amend no show/ reservation reservation Confirm Process no Notify billing reservation show system email:[email protected] Syntropy Limited Business Concept Model 1 Hotel Chain 1..* Clerk 1..* 1 Hotel * contactedHotel 1 1 * * 1..* allocation Customer Reservation Room 1 * * 0..1 1 1 * * contactAddress 0..1 1 Address RoomType 1 0..1 1 Bill Payment 0..1 email:[email protected] Syntropy Limited Identify Use Cases A use case describes the interaction that follows from a single business event. Where an event triggers a number of process Take up reservation steps, all the steps form a single use case. customer arrives/ Wait for event enquiry/ [else] cancel request/ Check amendment availability request/ Cancel [suitable reservation room] Make Amend no show/ reservation reservation Confirm Process no Notify billing reservation show system email:[email protected] Syntropy Limited Reservation system Cancel a reservation ReservationMaker Use Case Make a diagram reservation Update a Guest reservation Take up a reservation BillingSystem Process no shows Add, amend, remove hotel, room, ReservationAdministrator customer, etc. email:[email protected] Syntropy Limited Name Make a Reservation Initiator Reservation Maker Goal Reserve a room at a hotel Steps Main success scenario or 1. Reservation Maker asks to make a reservation Extension 2. Reservation Maker selects hotel, dates and room type Points 3. System provides availability and price 4. Reservation Maker agrees to proceed 5. Reservation
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages66 Page
-
File Size-