Share E-Book

Software Modeling and Design UML, Use Cases, Patterns, and Software Architectures (Hassan Gomaa) (z-library.sk, 1lib.sk, z-lib.sk)

Author

Rating 4.0 AI initial rating

Log in to rate

Software
Language English

This book covers all you need to know to model and design software applications from use cases to software architectures in UML and shows how to apply the COMET UML-based modeling and design method to real-world problems. The author describes architectural patterns for various architectures, such as broker, discovery, and transaction patterns for service-oriented architectures, and addresses software quality attributes including maintainability, modifiability, testability, traceability, scalability, reusability, performance, availability, and security. Complete case studies illustrate design issues for different software architectures: a banking system for client/server architecture, an online shopping system for service-oriented architecture, an emergency monitoring system for component-based software architecture, and an automated guided vehicle for real-time software architecture. Organized as an introduction followed by several short, self-contained chapters, the book is perfect for senior undergraduate or graduate courses in software engineering and design, and for experienced software engineers wanting a quick reference at each stage of the analysis, design, and development of large-scale software systems.

Format PDF
Size 3.0 MB
(First 20 pages)

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Page 1
(This page has no text content)
Page 2
This page intentionally left blank
Page 3
Software Modeling and Design This book provides all you need to know for modeling and design of soft- ware applications, from use cases to software architectures in UML. It shows you how to apply the COMET UML-based modeling and design method to real-world problems. The author describes architectural pat- terns for various architectures, such as broker, discovery, and transaction patterns for service-oriented architectures, and layered patterns for soft- ware product line architectures, and addresses software quality attributes, including maintainability, modifiability, testability, traceability, scalabil- ity, reusability, performance, availability, and security. Complete case studies illustrate design issues for different software architectures: a banking system for client/server architectures, an online shopping system for service-oriented architectures, an emergency moni- toring system for component-based software architectures, and an auto- mated guided vehicle system for real-time software architectures. Organized as an introduction followed by several self-contained chap- ters, the book is perfect for senior undergraduate or graduate courses in software engineering and for experienced software engineers who want a quick reference at each stage of the analysis, design, and development of large-scale software systems. Hassan Gomaa is Professor of Computer Science and Software Engi- neering at George Mason University. Gomaa has more than thirty years’ experience in software engineering, in both industry and academia. He has published more than 170 technical papers and is the author of three books: Designing Software Product Lines with UML; Designing Concur- rent, Distributed, and Real-Time Applications with UML; and Software Design Methods for Concurrent and Real-Time Systems.
Page 4
(This page has no text content)
Page 5
SOFTWARE MODELING AND DESIGN UML, Use Cases, Patterns, and Software Architectures Hassan Gomaa George Mason University, Fairfax, Virginia
Page 6
cambridge university press Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, São Paulo, Delhi, Tokyo, Mexico City Cambridge University Press 32 Avenue of the Americas, New York, NY 10013-2473, USA www.cambridge.org Information on this title: www.cambridge.org/9780521764148 C© Hassan Gomaa 2011 This publication is in copyright. Subject to statutory exception and to the provisions of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press. First published 2011 Printed in the United States of America A catalog record for this publication is available from the British Library. Library of Congress Cataloging in Publication data Gomaa, Hassan. Software modeling and design : UML, use cases, patterns, and software architectures / Hassan Gomaa. p. cm. Includes bibliographical references and index. ISBN 978-0-521-76414-8 (hardback) 1. Computer software – Development. 2. Software architecture. 3. Computer simulation. I. Title. QA76.76.D47G6522 2011 003′.3–dc22 2010049584 ISBN 978-0-521-76414-8 Hardback Cambridge University Press has no responsibility for the persistence or accuracy of URLs for external or third-party internet websites referred to in this publication and does not guarantee that any content on such websites is, or will remain, accurate or appropriate.
Page 7
To Gill, William and Neela, Alex, Amanda and Neil, and Edward
Page 8
(This page has no text content)
Page 9
Contents Preface page xv Annotated Table of Contents xix Acknowledgments xxv PART I Overview 1 Introduction 3 1.1 Software Modeling 3 1.2 Object-Oriented Methods and the Unified Modeling Language 3 1.3 Software Architectural Design 5 1.4 Method and Notation 5 1.5 COMET: A UML-Based Software Modeling and Design Method for Software Applications 6 1.6 UML as a Standard 6 1.7 Multiple Views of Software Architecture 7 1.8 Evolution of Software Modeling and Design Methods 8 1.9 Evolution of Object-Oriented Analysis and Design Methods 9 1.10 Survey of Concurrent, Distributed, and Real-Time Design Methods 11 1.11 Summary 12 Exercises 12 2 Overview of the UML Notation 14 2.1 UML Diagrams 14 2.2 Use Case Diagrams 15 2.3 Classes and Objects 15 2.4 Class Diagrams 16 2.5 Interaction Diagrams 18 2.6 State Machine Diagrams 19 2.7 Packages 21 vii
Page 10
viii Contents 2.8 Concurrent Communication Diagrams 21 2.9 Deployment Diagrams 23 2.10 UML Extension Mechanisms 23 2.11 Conventions Used in This Book 25 2.12 Summary 27 Exercises 28 3 Software Life Cycle Models and Processes 29 3.1 Software Life Cycle Models 29 3.2 Design Verification and Validation 40 3.3 Software Life Cycle Activities 41 3.4 Software Testing 42 3.5 Summary 43 Exercises 43 4 Software Design and Architecture Concepts 45 4.1 Object-Oriented Concepts 45 4.2 Information Hiding 48 4.3 Inheritance and Generalization/Specialization 51 4.4 Concurrent Processing 53 4.5 Design Patterns 57 4.6 Software Architecture and Components 58 4.7 Software Quality Attributes 59 4.8 Summary 59 Exercises 60 5 Overview of Software Modeling and Design Method 61 5.1 COMET Use Case–Based Software Life Cycle 61 5.2 Comparison of the COMET Life Cycle with Other Software Processes 64 5.3 Requirements, Analysis, and Design Modeling 65 5.4 Designing Software Architectures 67 5.5 Summary 68 Exercises 68 PART II Software Modeling 6 Use Case Modeling 71 6.1 Requirements Modeling 72 6.2 Use Cases 74 6.3 Actors 76 6.4 Identifying Use Cases 78 6.5 Documenting Use Cases in the Use Case Model 80 6.6 Example of Use Case Description 80 6.7 Use Case Relationships 82 6.8 The Include Relationship 82 6.9 The Extend Relationship 85 6.10 Use Case Structuring Guidelines 88
Page 11
Contents ix 6.11 Specifying Nonfunctional Requirements 89 6.12 Use Case Packages 89 6.13 Activity Diagrams 89 6.14 Summary 92 Exercises 92 7 Static Modeling 94 7.1 Associations between Classes 95 7.2 Composition and Aggregation Hierarchies 100 7.3 Generalization/Specialization Hierarchy 102 7.4 Constraints 103 7.5 Static Modeling and the UML 103 7.6 Static Modeling of the System Context 104 7.7 Categorization of Classes Using UML Stereotypes 106 7.8 Modeling External Classes 107 7.9 Static Modeling of Entity Classes 111 7.10 Summary 113 Exercises 114 8 Object and Class Structuring 115 8.1 Object and Class Structuring Criteria 116 8.2 Modeling Application Classes and Objects 116 8.3 Object and Class Structuring Categories 117 8.4 External Classes and Software Boundary Classes 118 8.5 Boundary Classes and Objects 119 8.6 Entity Classes and Objects 123 8.7 Control Classes and Objects 124 8.8 Application Logic Classes and Objects 127 8.9 Summary 130 Exercises 130 9 Dynamic Interaction Modeling 132 9.1 Object Interaction Modeling 133 9.2 Message Sequence Numbering on Interaction Diagrams 136 9.3 Dynamic Interaction Modeling 139 9.4 Stateless Dynamic Interaction Modeling 139 9.5 Examples of Stateless Dynamic Interaction Modeling 140 9.6 Summary 148 Exercises 148 10 Finite State Machines 151 10.1 Finite State Machines and State Transitions 151 10.2 Examples of Statecharts 153 10.3 Events and Guard Conditions 157 10.4 Actions 158 10.5 Hierarchical Statecharts 163 10.6 Guidelines for Developing Statecharts 167
Page 12
x Contents 10.7 Developing Statecharts from Use Cases 168 10.8 Example of Developing a Statechart from a Use Case 169 10.9 Summary 175 Exercises 175 11 State-Dependent Dynamic Interaction Modeling 177 11.1 Steps in State-Dependent Dynamic Interaction Modeling 177 11.2 Modeling Interaction Scenarios Using Interaction Diagrams and Statecharts 178 11.3 Example of State-Dependent Dynamic Interaction Modeling: Banking System 179 11.4 Summary 187 Exercises 188 PART III Architectural Design 12 Overview of Software Architecture 193 12.1 Software Architecture and Component-Based Software Architecture 193 12.2 Multiple Views of a Software Architecture 194 12.3 Software Architectural Patterns 198 12.4 Documenting Software Architectural Patterns 205 12.5 Interface Design 206 12.6 Designing Software Architectures 207 12.7 Summary 209 Exercises 210 13 Software Subsystem Architectural Design 212 13.1 Issues in Software Architectural Design 212 13.2 Integrated Communication Diagrams 213 13.3 Separation of Concerns in Subsystem Design 216 13.4 Subsystem Structuring Criteria 220 13.5 Decisions about Message Communication between Subsystems 226 13.6 Summary 228 Exercises 228 14 Designing Object-Oriented Software Architectures 230 14.1 Concepts, Architectures, and Patterns 231 14.2 Designing Information Hiding Classes 231 14.3 Designing Class Interface and Operations 232 14.4 Data Abstraction Classes 234 14.5 State-Machine Classes 236 14.6 Graphical User Interaction Classes 237 14.7 Business Logic Classes 239 14.8 Inheritance in Design 239 14.9 Class Interface Specifications 245 14.10 Detailed Design of Information Hiding Classes 246
Page 13
Contents xi 14.11 Polymorphism and Dynamic Binding 248 14.12 Implementation of Classes in Java 249 14.13 Summary 250 Exercises 251 15 Designing Client/Server Software Architectures 253 15.1 Concepts, Architectures, and Patterns for Client/Server Architectures 254 15.2 Client/Service Software Architectural Structure Patterns 254 15.3 Architectural Communication Patterns for Client/Server Architectures 258 15.4 Middleware in Client/Server Systems 260 15.5 Design of Service Subsystems 261 15.6 Design of Wrapper Classes 266 15.7 From Static Models to Relational Database Design 268 15.8 Summary 275 Exercises 276 16 Designing Service-Oriented Architectures 278 16.1 Concepts, Architectures, and Patterns for Service-Oriented Architecture 279 16.2 Software Architectural Broker Patterns 280 16.3 Technology Support for Service-Oriented Architecture 283 16.4 Software Architectural Transaction Patterns 285 16.5 Negotiation Pattern 289 16.6 Service Interface Design in Service-Oriented Architecture 292 16.7 Service Coordination in Service-Oriented Architecture 294 16.8 Designing Service-Oriented Architectures 295 16.9 Service Reuse 297 16.10 Summary 298 Exercises 298 17 Designing Component-Based Software Architectures 300 17.1 Concepts, Architectures, and Patterns for Component-Based Software Architectures 300 17.2 Designing Distributed Component-Based Software Architectures 301 17.3 Composite Subsystems and Components 302 17.4 Modeling Components with UML 303 17.5 Component Structuring Criteria 307 17.6 Group Message Communication Patterns 310 17.7 Application Deployment 314 17.8 Summary 316 Exercises 316 18 Designing Concurrent and Real-Time Software Architectures 318 18.1 Concepts, Architectures, and Patterns for Concurrent and Real-Time Software Architectures 318
Page 14
xii Contents 18.2 Characteristics of Real-Time Systems 319 18.3 Control Patterns for Real-Time Software Architectures 320 18.4 Concurrent Task Structuring 322 18.5 I/O Task Structuring Criteria 323 18.6 Internal Task Structuring Criteria 327 18.7 Developing the Concurrent Task Architecture 331 18.8 Task Communication and Synchronization 332 18.9 Task Interface and Task Behavior Specifications 338 18.10 Implementation of Concurrent Tasks in Java 342 18.11 Summary 342 Exercises 343 19 Designing Software Product Line Architectures 344 19.1 Evolutionary Software Product Line Engineering 344 19.2 Requirements Modeling for Software Product Lines 345 19.3 Analysis Modeling for Software Product Lines 349 19.4 Dynamic State Machine Modeling for Software Product Lines 352 19.5 Design Modeling for Software Product Lines 353 19.6 Summary 355 Exercises 355 20 Software Quality Attributes 357 20.1 Maintainability 357 20.2 Modifiability 358 20.3 Testability 360 20.4 Traceability 360 20.5 Scalability 361 20.6 Reusability 363 20.7 Performance 364 20.8 Security 365 20.9 Availability 366 20.10 Summary 367 Exercises 367 PART IV Case Studies 21 Client/Server Software Architecture Case Study 371 21.1 Problem Description 371 21.2 Use Case Model 372 21.3 Static Modeling 376 21.4 Object Structuring 381 21.5 Dynamic Modeling 384 21.6 ATM Statechart 396 21.7 Design of Banking System 401 21.8 Integrating the Communication Model 401 21.9 Structuring the System into Subsystems 403 21.10 Design of ATM Client Subsystem 404
Page 15
Contents xiii 21.11 Design of Banking Service Subsystem 410 21.12 Relational Database Design 415 21.13 Deployment of Banking System 417 21.14 Alternative Design Considerations 419 21.15 Detailed Design 419 22 Service-Oriented Architecture Case Study 424 22.1 Problem Description 424 22.2 Use Case Modeling 425 22.3 Static Modeling 430 22.4 Object and Class Structuring 433 22.5 Dynamic Modeling 434 22.6 Broker and Wrapper Technology Support for Service-Oriented Architecture 440 22.7 Design Modeling 440 22.8 Service Reuse 451 23 Component-Based Software Architecture Case Study 453 23.1 Problem Description 453 23.2 Use Case Modeling 453 23.3 Static Modeling 456 23.4 Dynamic Modeling 457 23.5 Design Modeling 462 23.6 Software Component Deployment 471 24 Real-Time Software Architecture Case Study 472 24.1 Problem Description 472 24.2 Use Case Modeling 473 24.3 Static Modeling 474 24.4 Object and Class Structuring 476 24.5 Dynamic State Machine Modeling 476 24.6 Dynamic Interaction Modeling 478 24.7 Design Modeling 482 Appendix A: Catalog of Software Architectural Patterns 495 Appendix B: Teaching Considerations 521 Glossary 523 Answers to Exercises 537 Bibliography 539 Index 547
Page 16
(This page has no text content)
Page 17
Preface OVERVIEW This book describes a use case–driven UML-based method for the modeling and design of software architectures, including object-oriented software architectures, client/server software architectures, service-oriented architectures, component- based software architectures, concurrent and real-time software architectures, and software product line architectures. The book provides a unified approach to design- ing software architectures and describes the special considerations for each cate- gory of software architecture. In addition, there are four case studies, a client/server banking system, a service-oriented architecture for an online shopping system, a distributed component-based emergency monitoring system, and a real-time auto- mated guided vehicle system. This book describes a UML-based software modeling and design method called COMET (Collaborative Object Modeling and Architectural Design Method). COMET is a highly iterative object-oriented software development method that addresses the requirements, analysis, and design modeling phases of the object- oriented development life cycle. The book is intended to appeal to readers who wish to design software architec- tures using a systematic UML-based method that starts from requirements modeling with use cases, through static and dynamic modeling, to software design based on architectural design patterns. WHAT THIS BOOK PROVIDES Various textbooks on the market describe object-oriented analysis and design con- cepts and methods. This book addresses the specific needs of designing software architectures. It addresses UML-based design of software architectures, starting with use cases for requirements modeling, static modeling with class diagrams, and dynamic modeling with object interaction analysis and state machine model- ing, through software design with architectural design patterns. All examples are xv
Page 18
xvi Preface described using the UML 2 notation, the latest version of the standard. In particu- lar, this book: ■ Provides a comprehensive treatment of the application of the UML-based object-oriented concepts to requirements modeling, analysis modeling, and design modeling. Requirements modeling addresses use case modeling to des- cribe functional requirements with extensions to describe nonfunctional require- ments. Analysis modeling addresses static modeling and dynamic modeling (both interaction and state machine modeling). Design modeling addresses important architectural issues, including a systematic approach for integrating use case–based interaction diagrams into an initial software architecture and applying architectural and design patterns for designing software architectures. ■ Provides a common approach for requirements and analysis modeling and then addresses specific design issues (in a separate chapter for each category of soft- ware architecture) for designing the software architecture for object-oriented software systems, client/server systems, service-oriented systems, component- based systems, real-time systems, and software product lines. ■ Describes how software architectures are designed by first considering software architectural patterns relevant for that category of software architecture, such as client/service patterns for client/server and component-based software architec- ture; brokering, discovery, and transaction patterns for service-oriented architec- tures; real-time control patterns for real-time software architecture; and layered patterns for software product line architectures. ■ Describes software quality attributes, which can have a profound effect on the quality of a software product. Many of these attributes can be addressed and evaluated at the time the software architecture is developed. The software qual- ity attributes covered include maintainability, modifiability, testability, traceabil- ity, scalability, reusability, performance, availability, and security. ■ Presents four detailed case studies. Case studies are presented by software architecture area, including a banking system for client/server architectures, an online shopping system for service-oriented architecture, an emergency mon- itoring system for component-based software architecture, and an automated guided vehicle system for the real-time software architecture. ■ Appendices include a glossary, a bibliography, and a catalog of architectural design patterns. There is also be an appendix on teaching considerations for teaching academic and industrial courses based on this book. Exercises follow most chapters. INTENDED AUDIENCE This book is intended for both academic and professional audiences. The academic audience includes senior undergraduate- and graduate-level students in computer science and software engineering, as well as researchers in the field. The profes- sional audience includes analysts, software architects, software designers, program- mers, project leaders, technical managers, program managers, and quality-assurance specialists who are involved in the analysis, design, and development of large-scale software systems in industry and government.
Page 19
Preface xvii WAYS TO READ THIS BOOK This book may be read in various ways. It can be read in the order in which it is pre- sented, in which case Chapters 1 through 4 provide introductory concepts; Chapter 5 provides an overview of the COMET/UML software modeling and design method; Chapters 6 through 20 provide an in-depth treatment of software modeling and design; and Chapters 21 through 24 provide detailed case studies. Alternatively, some readers may wish to skip some chapters, depending on their level of familiarity with the topics discussed. Chapters 1 through 4 are introductory and may be skipped by experienced readers. Readers familiar with software design concepts may skip Chapter 4. Readers particularly interested in software modeling and design can proceed directly to the description of COMET/UML, starting in Chapter 5. Readers who are not familiar with UML, or who are interested in finding out about the changes introduced by UML 2, can read Chapter 2 in conjunction with Chapters 5 through 20. Experienced software designers may also use this book as a reference, referring to various chapters as their projects reach a particular stage of the requirements, analysis, or design process. Each chapter is relatively self-contained. For example, at different times one might refer to Chapter 6 for a description of use cases, to Chapter 7 for a discussion of static modeling, and to Chapter 9 for a description of dynamic interaction modeling. Chapter 10 can be referenced for designing state machines; Chapter 12 and Appendix A for software architectural patterns; Chapter 14 for object-oriented software architectures; and Chapter 15 for designing a relational database from a static model. Chapter 16 can be consulted for service-oriented architectures; Chapter 17 for distributed component-based software design; Chap- ter 18 for real-time design; and Chapter 19 for software product line design. One can also improve one’s understanding of how to use the COMET/UML method by reading the case studies, because each case study explains the decisions made at each step of the requirements, analysis, and design modeling processes in the design of a real-world application. Hassan Gomaa George Mason University December 2010 Email: hgomaa@gmu.edu Web: http://mason.gmu.edu/∼hgomaa
Page 20
(This page has no text content)
The above is a preview of the first 20 pages. Register to read the complete e-book.

Recommended for You

Loading recommended books...
Failed to load, please try again later

Tip the Site

Scan the WeChat Pay or Alipay code to tip. No login required.

WeChat Pay
Alipay

Every 10 yuan is 1 year of VIP; the remainder counts as months (5 yuan is 5 months, 100 yuan is 10 years). Signed-in users are enabled immediately and both you and the admin get an email. Guests receive an ID and are sent to register.

← Back to List