Patterns in Java™, Volume 1 a Catalog of Reusable Design Patterns Illustrated with UML Second Edition

Total Page:16

File Type:pdf, Size:1020Kb

Patterns in Java™, Volume 1 a Catalog of Reusable Design Patterns Illustrated with UML Second Edition 9525_Grand_fm_v.qxd 8/26/02 9:23 AM Page iii Patterns in Java™, Volume 1 A Catalog of Reusable Design Patterns Illustrated with UML Second Edition MARK GRAND Wiley Publishing, Inc. 9525_Grand_fm_v.qxd 8/26/02 9:23 AM Page ii 9525_Grand_fm_v.qxd 8/26/02 9:23 AM Page i Patterns in Java™, Volume 1 Second Edition 9525_Grand_fm_v.qxd 8/26/02 9:23 AM Page ii 9525_Grand_fm_v.qxd 8/26/02 9:23 AM Page iii Patterns in Java™, Volume 1 A Catalog of Reusable Design Patterns Illustrated with UML Second Edition MARK GRAND Wiley Publishing, Inc. 9525_Grand_fm_v.qxd 8/26/02 9:23 AM Page iv Publisher: Robert Ipsen Editor: Theresa Hudson Developmental Editor: Kathryn Malin Managing Editor: Angela Smith New Media Editor: Brian Snapp Text Design & Composition: North Market Street Graphics Designations used by companies to distinguish their products are often claimed as trademarks. In all instances where Wiley Publishing, Inc. is aware of a claim, the product names appear in initial capital or all capital letters. Readers, however, should contact the appropriate companies for more complete information regarding trademarks and registration. This book is printed on acid-free paper. ●∞ Copyright © 2002 by Mark Grand. All rights reserved. Published by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4744. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspointe Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4447, E-mail: [email protected] This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold with the understanding that the publisher is not engaged in professional services. If professional advice or other expert assistance is required, the services of a competent professional person should be sought. Library of Congress Cataloging-in-Publication Data: ISBN: 0-471-22729-3 Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic versions. For more information about Wiley products, visit our web site at www.wiley.com. Printed in the United States of America. 10 9 8 7 6 5 4 3 2 1 9525_Grand_fm_v.qxd 8/26/02 9:23 AM Page v CONTENTS Acknowledgments ix About the Author xi Chapter 1 Introduction to Software Patterns 1 Patterns Description 2 A Brief History of Patterns 4 Organization of This Book 5 Chapter 2 Overview of UML 7 Class Diagram 8 Collaboration Diagram 18 Statechart Diagram 27 Deployment Diagram 29 vvv 9525_Grand_fm_v.qxd 8/26/02 9:23 AM Page vi vi ■ Contents Chapter 3 The Software Life Cycle 31 Case Study 34 Business Case 34 Define Requirements Specification 35 Develop High-Level Essential Use Cases 37 Object-Oriented Analysis 39 Object-Oriented Design 40 Chapter 4 Fundamental Design Patterns 51 Delegation (When Not to Use Inheritance) 53 Interface 61 Abstract Superclass 67 Interface and Abstract Class 73 Immutable 79 Marker Interface 85 Proxy 91 Chapter 5 Creational Patterns 101 Factory Method 103 Abstract Factory 119 Builder 129 Prototype 139 Singleton 149 Object Pool 159 Chapter 6 Partitioning Patterns 175 Filter 177 Composite 187 Read-Only Interface 199 Chapter 7 Structural Patterns 207 Adapter 209 Iterator 217 Bridge 223 Façade 235 Flyweight 243 Dynamic Linkage 255 Virtual Proxy 265 Decorator 275 Cache Management 283 9525_Grand_fm_v.qxd 8/26/02 9:23 AM Page vii Contents ■ vii Chapter 8 Behavioral Patterns 303 Chain of Responsibility 305 Command 317 Little Language 329 Mediator 355 Snapshot 369 Observer 387 State 397 Null Object 407 Strategy 413 Template Method 419 Visitor 427 Chapter 9 Concurrency Patterns 439 Single Threaded Execution 443 Lock Object 453 Guarded Suspension 461 Balking 469 Scheduler 475 Read/Write Lock 485 Producer-Consumer 495 Two-Phase Termination 501 Double Buffering 507 Asynchronous Processing 523 Future 535 Appendix Overview of Patterns in Java, Volumes 1 through 3 547 Bibliography 567 Index 569 9525_Grand_fm_v.qxd 8/26/02 9:23 AM Page viii 9525_Grand_fm_v.qxd 8/26/02 9:23 AM Page ix ACKNOWLEDGMENTS I would first like to acknowledge the patience of my wife, Nicole. Without her support, this second edition of Patterns in Java, Volume 1 would not have been possible. I would also like to acknowledge the feedback that I have received from many readers whose emails to me suggested improvements and cor- rections that have gone into this second edition. I would like to single out Ed Remmell, who organized a discussion group around my book and took the time to send me summaries of the discussions. Other readers who took the time and trouble to send me useful questions and comments are (in alphabetical order): Nader Afshar, Derrick Ampy, Barry W. Anderson, Paul E. Andrighetti, Kaushik Barot, Ted Beckett, Pablo Bellver, Davide De Benedictis, Dave Busse, Mike Carlin, Max Chandler, John Clarke, Charlie Crook, Christian Cryder, Carlos Devoto, Cyrus Doomasia, Rodrigo Figueiredo, Jeff French, Brent Fry, Srinivas Ganti, Daniel L. Gleneck, Satish Gupta, Barton W. Hammond, Shannon Harvey, Judy Housman, Hong Hsu, Rob Hulsebos, Gary Janes, Brian Krahmer, Erik Bak Kristensen, Robert Laganière, Laurene O. Laidlaw, Allen Lee, Roger Lee, Tim Lethbridge, Charles Magid, Kurt Matthys, Phil McGlauchlin, Barry ixixix 9525_Grand_fm_v.qxd 8/26/02 9:23 AM Page x x ■ Acknowledgments Middlebrook, Sadiq Mohammed, Thomas Moore, Raymond Naseef, Jaime Nino, Jeff Oakes, Sudesh Palekar, Greg Pearman, Jim Phipps, John Pinto, Jon Poploskie, Raj Prathinidhi, Andy Pryke, Tulsi Rai, Damith C. Rajapakse, Steven Ranieri, John Sargeant, Robert Allan Schwartz, Greg Scott, Joe Sharp, Mike Shivas, Eduardo Silva, Daniel Stainhauser, Steve Stephens, Christian Svenstrup, Oyvind Teig, Alan Thompson, Richard Tomlinson, Bruce Wallace, Dieter Wankmueller, Mark Waschkowski, Richard Williams, Joe Wissmann, Robert Wragg, Wayne Wylupski, and Hong Yan. Acknowledgments from the First Edition I want to thank Craig Larman, my most conscientious reviewer. He con- vinced me of the importance of patterns. Craig also provided me with much invaluable feedback on the use of UML and the presentation of pat- terns. His valuable suggestions greatly improved the way that I present the patterns in this book. Jack Harich was another manuscript reviewer who made many useful suggestions about the organization of this book. He convinced me to expand my coverage of fundamental patterns. He also supplied the example that I use for the State pattern. Brad Appleton provided me with the most voluminous and detailed comments. The UIUC patterns group provided some insightful discussions for the patterns in this book. The participants in those discussions included Brian Foote, Ed Peters, Dragos Malonescu, Peter Hatch, Don Roberts, Joseph W. Yoder, Ralph Johnson, John Brant, James Overturf, Jean Pierre Briot, Eiji Nabika, Hiro Nakamura, and Ian Chai. I also want to acknowledge some of my other reviewers, in particular Micheal Wheaton and Micheal Pair. 9525_Grand_fm_v.qxd 8/26/02 9:23 AM Page xi ABOUT THE AUTHOR Mark Grand is an Atlanta-based consultant with over 23 years of experi- ence specializing in distributed systems, object-oriented design, and Java. He was the architect for the first commercial business-to-business (B2B) e-commerce product for the Internet. He is currently working on an open source framework for gluing components and programs into an application. Mark Grand is most widely known for his best-selling Patterns in Java books. In addition to teaching Java for Sun and other training organizations, Mark has been involved in several large-scale commercial Java projects. Prior to his involvement with Java, Mark spent over 11 years as a designer and implementer of fourth-generation languages (4GLs). His most recent role in that vein was as the architect and project manager for an electronic data interchange product. Mark has worked with a number of information technology (IT) organizations in capacities such as soft- ware architect, database architect, network designer and administrator, and Sun System administrator. He has been involved with object-oriented programming and design since 1982. 9525_Grand_fm_v.qxd 8/26/02 9:23 AM Page xii 9525_Grand_01_v.qxd 8/26/02 9:07 AM Page 1 1 CHAPTER Introduction to Software Patterns Software patterns are reusable solutions to recurring problems that we encounter during software development. Because this book is all about software patterns, they are simply referred to as patterns throughout. What makes a bright, experienced programmer much more produc- tive than a bright, but inexperienced programmer? Experience. Experience gives programmers a wealth of wisdom. As programmers gain experience, they recognize the similarity of new problems to those they have solved in the past. With even more experience, they recognize that solutions to simi- lar problems follow recurring patterns. With knowledge of these patterns, experienced programmers can recognize a problem to which specific pat- terns apply and immediately determine the solution without having to stop to analyze the problem first. When a programmer discovers a pattern, it’s just an insight. In most cases, to go from an unverbalized insight to a well-thought-out idea that the programmer can clearly articulate is surprisingly difficult. It’s also an extremely valuable step. When we understand a pattern well enough to put it into words, we are able to intelligently combine it with other patterns.
Recommended publications
  • Concurrency Patterns for Easier Robotic Coordination
    Concurrency Patterns for Easier Robotic Coordination Andrey Rusakov∗ Jiwon Shin∗ Bertrand Meyer∗† ∗Chair of Software Engineering, Department of Computer Science, ETH Zurich,¨ Switzerland †Software Engineering Lab, Innopolis University, Kazan, Russia fandrey.rusakov, jiwon.shin, [email protected] Abstract— Software design patterns are reusable solutions to Guarded suspension – are chosen for their concurrent nature, commonly occurring problems in software development. Grow- applicability to robotic coordination, and evidence of use ing complexity of robotics software increases the importance of in existing robotics frameworks. The paper aims to help applying proper software engineering principles and methods such as design patterns to robotics. Concurrency design patterns programmers who are not yet experts in concurrency to are particularly interesting to robotics because robots often have identify and then to apply one of the common concurrency- many components that can operate in parallel. However, there based solutions for their applications on robotic coordination. has not yet been any established set of reusable concurrency The rest of the paper is organized as follows: After design patterns for robotics. For this purpose, we choose six presenting related work in Section II, it proceeds with a known concurrency patterns – Future, Periodic timer, Invoke later, Active object, Cooperative cancellation, and Guarded sus- general description of concurrency approach for robotics pension. We demonstrate how these patterns could be used for in Section III. Then the paper presents and describes in solving common robotic coordination tasks. We also discuss detail a number of concurrency patterns related to robotic advantages and disadvantages of the patterns and how existing coordination in Section IV.
    [Show full text]
  • The Evolution of Control Architectures Towards Next Generation
    Department of Electronic and Electrical Engineering University College London University of London T h e Ev o l u t io n o f C o n t r o l A rchitectures T o w a r d s N ext G e n e r a t io n N e t w o r k s By Christos Solomonides BEng(Hons), MRes(Distinction) 7 September 2001 A thesis submitted to the University o f London for the Ph.D. in Electronic and Electrical Engineering ProQuest Number: U643054 All rights reserved INFORMATION TO ALL USERS The quality of this reproduction is dependent upon the quality of the copy submitted. In the unlikely event that the author did not send a complete manuscript and there are missing pages, these will be noted. Also, if material had to be removed, a note will indicate the deletion. uest. ProQuest U643054 Published by ProQuest LLC(2016). Copyright of the Dissertation is held by the Author. All rights reserved. This work is protected against unauthorized copying under Title 17, United States Code. Microform Edition © ProQuest LLC. ProQuest LLC 789 East Eisenhower Parkway P.O. Box 1346 Ann Arbor, Ml 48106-1346 A b s t r a c t This thesis describes the evolution of control architectures and network intelligence towards next generation telecommunications networks. Network intelligence is a term given to the group of architectures that provide enhanced control services. Network intelligence is provided through the control plane, which is responsible for the establishment, operation and termination of calls and connections. The work focuses on examining the way in which network intelligence has been provided in the traditional telecommunications environment and in a converging environment.
    [Show full text]
  • ESWP3 - Embedded Software Principles, Patterns and Procedures Release 1.0
    ESWP3 - Embedded Software Principles, Patterns and Procedures Release 1.0 ESWP3 contributors September 24, 2015 Contents 1 Human Relation Patterns 3 1.1 Categorization of human relation patterns................................3 2 Principles 5 2.1 Categorization of principles.......................................5 2.2 All principles in alphabetic order....................................5 3 Build Patterns 7 3.1 Categorization of build patterns.....................................7 3.2 All build patterns in alphabetic order..................................8 4 Release Antipatterns 11 5 Requirement Patterns 13 5.1 Standardized Textual Specification Pattern............................... 13 5.2 Perform Manual Review Pattern..................................... 13 6 Design Patterns 15 6.1 Categorization of “design” patterns................................... 15 6.2 Pattern Selection Procedure....................................... 21 6.3 Legend to the design pattern sections.................................. 21 6.4 All design patterns in alphabetic order.................................. 21 7 Idioms in C 29 7.1 Classification of idioms......................................... 29 7.2 Add the name space........................................... 29 7.3 Constants to the left........................................... 29 7.4 Magic numbers as variables....................................... 30 7.5 Namend parameters........................................... 30 7.6 Sizeof to variables............................................ 30 8 Unit Test Patterns
    [Show full text]
  • Executive Summary: Balking Design Patterns by Drew Goldberg
    Executive Summary: Balking Design Patterns By Drew Goldberg Balking Patterns are used to prevent an object from executing certain code if it is an incomplete or inappropriate state. These Design Patterns include: The Balking Pattern, The Guarded Suspension, and The Double-Checked Locking Pattern. These patterns seem to have arisen when JVMs were slower and synchronization wasn't as well understood as it is today. These patterns have appeared become somewhat antiquated as JVMs improved, newer design pattern(s) were introduced, and the increased use of functional programming language's immutable/persistent data structures help reduce the complexities of concurrency's implementation and maintenance. Still it is nice to see what was used in the past inorder to get a better perspective of today's concurrency techniques. Balking - Design Patterns Dealing with Incomplete and Incorrect States By Drew Goldberg What are balking patterns? ● Balking - If an object’s method is invoked when the object is in an inappropriate state, then the method will return without doing anything. Balking Design Patterns: ● Balking Design Pattern ● Guarded Suspension ● Double Checked Locking Reference: http://www.mindspring.com/~mgrand/pattern_synopses.htm#Balking Balking Pattern: Intro ● This software design pattern is used to invoke an action on an object only when the object is in a particular state. ● Objects that use this pattern are generally only in a state that is prone to balking temporarily but for an unknown amount of time reference: http://en.wikipedia.org/wiki/Balking_pattern Balking Pattern: Implementation public class Example { private boolean jobInProgress = false; public void job() { synchronized(this) { If the boolean instance variable if (jobInProgress) { jobInProgress is set to false, then return; the job() will return without having } jobInProgress = true; executed any commands and } therefore keeping the object's // Code to execute job goes here state the same.
    [Show full text]
  • Aspect-Oriented Implementation of Concurrent Processing Design Patterns
    ICCGI 2014 : The Ninth International Multi-Conference on Computing in the Global Information Technology Aspect-Oriented Implementation of Concurrent Processing Design Patterns Shingo Kameyama, Masatoshi Arai, Noriko Matsumoto, Norihiko Yoshida Graduate School of Science and Engineering Saitama University Saitama, Japan fshingo, arai, noriko, [email protected] Abstract—A variety of design patterns are now widely used in This paper is organized as follows: Section 2 gives an software development as their catalog is a collection of knowledge overview of design patterns. Section 3 presents an overview on design and programming techniques and namely elaborated and some functions of aspect-orientated implementation. Sec- patterns. However, as each design pattern is described in the tion 4 introduces an example of aspect-oriented implementa- forms of texts, charts, and simple code examples, it has some tion of GoF design patterns. Section 5 and Section 6 explain limitations in applicability and formal treatment. One of its aspect-oriented implementation of concurrent processing de- reasons is that the design patterns include some crosscutting concerns. To solve this problem, aspect-oriented implementation sign patterns. Section 7 gives some considerations, and Section of the so-called “Gang of Four” (GoF) design patterns, which are 8 contains some concluding remarks. cataloged for component reuse has been proposed. In this paper, we propose aspect-oriented implementation of design patterns for concurrent processing, so as to improve and accelerate design II. DESIGN PATTERNS and development processes of, for example, network systems, embedded systems, and transaction systems. Our aspect-oriented Design patterns are a catalog of typical solutions for some implementation tailors hierarchical or inclusive relationships typical problems in designing and programming in software among design patterns well which are not found in the patterns development.
    [Show full text]
  • Software Frameworks, Architectural and Design Patterns
    Journal of Software Engineering and Applications, 2014, 7, 670-678 Published Online July 2014 in SciRes. http://www.scirp.org/journal/jsea http://dx.doi.org/10.4236/jsea.2014.78061 Software Frameworks, Architectural and Design Patterns Njeru Mwendi Edwin Department of Computing, Jomo Kenyatta University of Agricluture & Technology, Nairobi, Kenya Email: [email protected] Received 21 April 2014; revised 20 May 2014; accepted 14 June 2014 Copyright © 2014 by author and Scientific Research Publishing Inc. This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/ Abstract Software systems can be among the most complex constructions in engineering disciplines and can span into years of development. Most software systems though implement in part what has already been built and tend to follow known or nearly known architectures. Although most soft- ware systems are not of the size of say Microsoft Windows 8, complexity of software development can be quick to increase. Thus among these methods that are the most important is the use of ar- chitectural and design patterns and software frameworks. Patterns provide known solutions to re-occurring problems that developers are facing. By using well-known patterns reusable compo- nents can be built in frameworks. Software frameworks provide developers with powerful tools to develop more flexible and less error-prone applications in a more effective way. Software frame- works often help expedite the development process by providing necessary functionality “out of the box”. Providing frameworks for reusability and separation of concerns is key to software de- velopment today.
    [Show full text]
  • Table of Contents
    Table of Contents Foreword . v About This Book . ix About The Authors . xvii Guide To The Reader . xvii Part I Some Concepts . 1 1 On Patterns and Pattern Languages . 3 1.1 Patterns Introduced . 4 1.2 Inside Patterns . 6 1.3 In Between Patterns . 10 1.4 Into Pattern Languages . 13 1.5 Patterns Connected . 15 2 On Distributed Systems . 17 2.1 Benefits of Distribution . 18 2.2 Challenges of Distribution . 20 2.3 Technologies for Supporting Distribution . 22 2.4 Limitations with Middleware . 32 3 On the Pattern Language . 33 3.1 Intent, Scope, and Audience . 34 3.2 Origins and Genesis . 35 ii 3.3 Structure and Content . 36 3.4 Presentation . 44 3.5 Practical Use . 49 Part II A Story . 53 4 Warehouse Management Process Control . 57 4.1 System Scope . 58 4.2 Warehouse Management Process Control . 60 5 Base-line Architecture . 65 5.1 Architecture Context . 66 5.2 Partitioning the Big Ball of Mud . 67 5.3 Decomposing the Layers . 68 5.4 Accessing Domain Object Functionality . 71 5.5 Bridging the Network . 72 5.6 Separating User Interfaces . 76 5.7 Distributing Functionality . 79 5.8 Supporting Concurrent Domain Object Access . 82 5.9 Achieving Scalable Concurrency . 85 5.10 Crossing the Object-Oriented/Relational Divide . 87 5.11 Configuring Domain Objects at Run-Time . 89 5.12 Base-line Architecture Summary . 90 6 Communication Middleware . 95 6.1 A Middleware Architecture for Distributed Systems 96 6.2 Structuring the Internal Design of the Middleware 100 6.3 Encapsulating Low-level System Mechanisms .
    [Show full text]
  • Pattern-Oriented Software Architecture, Volume 2.Pdf
    Pattern-Oriented Software Architecture, Patterns for Concurrent and Networked Objects, Volume 2 by Douglas Schmidt, Michael Stal, Hans Rohnert and Frank Buschmann ISBN: 0471606952 John Wiley & Sons © 2000 (633 pages) An examination of 17 essential design patterns used to build modern object- oriented middleware systems. 1 Table of Contents Pattern-Oriented Software Architecture—Patterns for Concurrent and Networked Objects, Volume 2 Foreword About this Book Guide to the Reader Chapter 1 - Concurrent and Networked Objects Chapter 2 - Service Access and Configuration Patterns Chapter 3 - Event Handling Patterns Chapter 4 - Synchronization Patterns Chapter 5 - Concurrency Patterns Chapter 6 - Weaving the Patterns Together Chapter 7 - The Past, Present, and Future of Patterns Chapter 8 - Concluding Remarks Glossary Notations References Index of Patterns Index Index of Names 2 Pattern-Oriented Software Architecture—Patterns for Concurrent and Networked Objects, Volume 2 Douglas Schmidt University of California, Irvine Michael Stal Siemens AG, Corporate Technology Hans Rohnert Siemens AG, Germany Frank Buschmann Siemens AG, Corporate Technology John Wiley & Sons, Ltd Chichester · New York · Weinheim · Brisbane · Singapore · Toronto Copyright © 2000 by John Wiley & Sons, Ltd Baffins Lane, Chichester, West Sussex PO19 1UD, England National 01243 779777 International (+44) 1243 779777 e-mail (for orders and customer service enquiries): <[email protected]> Visit our Home Page on http://www.wiley.co.uk or http://www.wiley.com All rights reserved.
    [Show full text]
  • POSA Half Sync / Half Async
    Design Patterns MSc in Computer Science Produced Eamonn de Leastar ([email protected]) by ! Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie POSA Patterns Other sources - POSA - 5 Volumes! Volume 4 • Collates a terse description of large collection of patterns associated with Distributed Systems • Repeats patterns from earlier volumes in series + patterns from GoF and PoEAA • Extensive discussion on how multiple patterns participate in solving a given problem Catalog (Extract) • Sophisticated and Specialised From Mud To Structure: DOMAIN MODEL (182), LAYERS (185), MODEL-VIEW-CONTROLLER (188), PRESENTATION-ABSTRACTION-CONTROL (191), MICROKERNEL (194), REFLECTION (197), PIPES AND FILTERS (200), SHARED REPOSITORY (202), BLACKBOARD (205), and DOMAIN OBJECT (208). Distribution Infrastructure: MESSAGING (221), MESSAGE CHANNEL (224), MESSAGE ENDPOINT (227), Pattern Language MESSAGE TRANSLATOR (229), MESSAGE ROUTER (231), BROKER (237), CLIENT PROXY (240), REQUESTOR (242), INVOKER (244), CLIENT REQUEST HANDLER (246), SERVER REQUEST HANDLER (249), and PUBLISHER-SUBSCRIBER (234). Event Demultiplexing and Dispatching: REACTOR (259), PROACTOR (262), ACCEPTOR-CONNECTOR (265), and ASYNCHRONOUS COMPLETION TOKEN (268). Interface Partitioning: EXPLICIT INTERFACE (281), EXTENSION INTERFACE (284), INTROSPECTIVE INTERFACE (286), DYNAMIC INVOCATION INTERFACE (288), PROXY (290), BUSINESS DELEGATE (292), FACADE (294), COMBINED METHOD (296), ITERATOR (298), ENUMERATION METHOD (300), and BATCH METHOD (302). Component Partitioning: ENCAPSULATED IMPLEMENTATION (313), WHOLE-PART (317), COMPOSITE (319), MASTER-SLAVE (321), HALF-OBJECT PLUS PROTOCOL (324), and REPLICATED COMPONENT GROUP (326). Application Control: PAGE CONTROLLER (337), FRONT CONTROLLER (339), APPLICATION CONTROLLER (341), COMMAND PROCESSOR (343), TEMPLATE VIEW (345), TRANSFORM VIEW (347), FIREWALL PROXY (349), and AUTHORIZATION (351). Concurrency: HALF-SYNC/HALF-ASYNC (359), LEADER/FOLLOWERS (362), ACTIVE OBJECT (365), MONITOR OBJECT (368).
    [Show full text]
  • Generative Programming
    Generative Programming Principles and Techniques of Software Engineering Based on Automated Configuration and Fragment-Based Component Models by Dipl.-Inf. Krzysztof Czarnecki A dissertation submitted in partial fulfillment of the requirements for the degree of Doktor-Ingenieur Department of Computer Science and Automation Technical University of Ilmenau October 1998 Supervisory Committee: Universitair Hoofd Docent Dr. Mehmet Aksit, University of Twente, The Netherlands Prof. Dr. Ulrich W. Eisenecker, FH Heidelberg, Germany Prof. Dr.-Ing. habil. Dietrich Reschke (Chairperson of Supervisory Committee), TU Ilmenau, Germany Oral defense held on August 9, 1999 iii Abstract Current object-oriented (OO) and component technologies suffer from several problems such as the lack of analysis and design methods for the development for reuse, lack of effective techniques for dealing with many variants of components, loss of design knowledge due to the semantic gap between domain abstractions and programming language features, and runtime performance penalties for clean and flexible design. This thesis proposes Generative Programming (GP) as a comprehensive software development paradigm to achieving high intentionality, reusability, and adaptability without the need to compromise the runtime performance and computing resources of the produced software. In the area of analysis and design for GP, we investigate Domain Engineering (DE) methods and their integration with OO analysis and design (OOA/D) methods. The main difference between DE methods and OOA/D methods is that the first are geared towards developing whole families of systems while the latter focus on developing single systems. We identify feature modeling as the main contribution of DE to OOA/D. Feature models represent the configurability aspect of reusable software at an abstract level, i.e.
    [Show full text]
  • Sather 2: a Language Design for Safe, High-Performance Computing
    ¢¡¤£¦¥¨§©¡ £ ¡¤ ©©£¦¥¨§ ¢¥¨¡¥ ¡£ £ !£¦¥ "$#$%'&)(+*¢,$-.*¢/102-354)0567 -8*:9;¢;)4=<+*/?>@*¢A *B$C'(ED¢A 7 FHG'/?,7IDJ#$%'&¢;$%LK@"¢"M#¢NO4QP8RS"$;TU9L%WVMK #2"R'V)4=XZY\[ P8R]"$;TJ9L%'VZK &¢9¢N$% Sather 2: A Language Design for Safe, High-Performance Computing Benedict Gomes, Welf Löwe, Jürgen W. Quittek, Boris Weissman TR-97-035 December 1997 Abstract Consistency of objects in a concurrent computing environment is usually ensured by serializing all incom- ing method calls. However, for high performance parallel computing intra-object parallelism, i.e. concur- rent execution of methods on an object, is desirable. Currently, languages supporting intra-object parallelism are based on object models that leave it to the programmer to ensure consistency. We present an object model, that ensures object consistency while supporting intra-object concurrency thereby offering both safety and efficiency. The description starts with a simple and safe, but inefficient mod- el and gradually increases the sophistication by introducing features for expressiveness and greater efficien- cy while maintaining safety. Based on this model we define extensions for guarded suspension and data parallel programming. The mod- el and the extensions are defined as a language proposal for a new version of Sather, Sather 2. The proposal is based on Sather 1.1, but replaces the parallel extensions of this version. 1 Introduction With the advent of commodity multi-processors and cheap high-performance networks (Myrinet, ATM), parallel hardware platforms are now more widely available than at any time in the past. Furthermore, there is a plethora of applications that could benefit from this readily available multi-processor performance, ranging from mathematically-intensive simulations (the traditional users of high-performance systems), to databases, to web-serv- ers.
    [Show full text]
  • ESWP3 - Embedded Software Principles, Procedures and Patterns Release 1.0
    ESWP3 - Embedded Software Principles, Procedures and Patterns Release 1.0 ESWP3 contributors October 04, 2015 Contents 1 Principles 3 1.1 Categorization of principles.......................................3 1.2 All principles in alphabetic order....................................3 2 Procedures 5 2.1 Categorization of procedures.......................................5 2.2 All procedures in alphabetic order....................................5 3 Patterns 7 3.1 Human Relation Patterns.........................................7 3.2 Build Patterns.............................................. 10 3.3 Requirement Patterns........................................... 13 3.4 Design Patterns.............................................. 16 3.5 Unit Test Patterns............................................. 32 3.6 Tool evaluation patterns......................................... 39 3.7 About the meta-data........................................... 41 4 Bibliography 43 5 “It is all about structure and vision.” 45 6 Indices and tables 47 i ii ESWP3 - Embedded Software Principles, Procedures and Patterns, Release 1.0 This project is about summarizing, referencing, structuring and relating principles, procedures (as sequences of pat- terns in a pattern language) and patterns in the context of embedded software engineering. As “(P)atterns are only meaningful as part of a Pattern Language(.)” (Bergin 2013, pos. 74) this project tries also to “make” relations between different pattern languages and the higher-level principles “visible”. Contents: Contents
    [Show full text]