Patterns Senior Member of Technical Staff and Pattern Languages Knowledge Systems Corp

Total Page:16

File Type:pdf, Size:1020Kb

Patterns Senior Member of Technical Staff and Pattern Languages Knowledge Systems Corp Kyle Brown An Introduction to Patterns Senior Member of Technical Staff and Pattern Languages Knowledge Systems Corp. 4001 Weston Parkway CSC591O Cary, North Carolina 27513-2303 April 7-9, 1997 919-481-4000 Raleigh, NC [email protected] http://www.ksccary.com Copyright (C) 1996, Kyle Brown, Bobby Woolf, and 1 2 Knowledge Systems Corp. All rights reserved. Overview Bobby Woolf Senior Member of Technical Staff O Patterns Knowledge Systems Corp. O Software Patterns 4001 Weston Parkway O Design Patterns Cary, North Carolina 27513-2303 O Architectural Patterns 919-481-4000 O Pattern Catalogs [email protected] O Pattern Languages http://www.ksccary.com 3 4 Patterns -- Why? Patterns -- Why? !@#$ O Learning software development is hard » Lots of new concepts O Must be some way to » Hard to distinguish good communicate better ideas from bad ones » Allow us to concentrate O Languages and on the problem frameworks are very O Patterns can provide the complex answer » Too much to explain » Much of their structure is incidental to our problem 5 6 Patterns -- What? Patterns -- Parts O Patterns are made up of four main parts O What is a pattern? » Title -- the name of the pattern » A solution to a problem in a context » Problem -- a statement of what the pattern solves » A structured way of representing design » Context -- a discussion of the constraints and information in prose and diagrams forces on the problem »A way of communicating design information from an expert to a novice » Solution -- a description of how to solve the problem » Generative: show when and how to apply solutions –This may include a list of the participants in the pattern » One of the hottest topics in OO Design O May have other sections 7 8 Patterns -- Origin (1) Patterns -- Origin (2) O Pattern concept came from architecture » A Pattern Language O A Pattern Language [Alexander77] describes » A Timeless Way of » Common architectural Building [Alexander79] motifs O Alexander used patterns » How they can come to together to form a » Express the interaction of cohesive, liveable forces in a problem environment » Arrive at an elegant solution 9 Patterns -- Doors Example (1) Patterns -- Doors Example (2) O Corner Doors O Solution: “...in most » [196 in Alexander77] rooms, especially small O Problem: How do you ones, put the doors as near place the doors in a room? the corners of the room as “untouched by O “If the doors create a possible.” movement” pattern of movement O “If a room has two doors, G! which destroys the places N and people move through BA in a room, the room will it, keep both doors at one never allow people to be end of the room.” comfortable.” Software Patterns -- What? Software Patterns -- Why? O Ward Cunningham and Kent Beck from O Abstractors and Tektronix Elaborators [Beck94] O In 1987, they applied Alexander’s ideas to » Abstractors create reusable pieces designing user interfaces (frameworks) » “Nouns in Lists, Verbs in Menus” » Elaborators use pieces to » “Window per Task” build applications » Abstractors must explain O The idea was independently discovered pieces to elaborators » Jim Coplien of AT&T [Coplien92] » Patterns are an efficient »Others explanation of intent 13 14 Software Patterns -- Why? Software Pattern -- GUIs O Patterns support O Nouns in Lists, Verbs in Menus reusable software O Problem: »Many more elaborators than abstractors (100:1?) »Designing a GUI: What goes in lists vs. menus? » More efficient explanation, more blah blah blah efficient reuse blah » More powerful than a blah blah faster compiler or better ? blah tools 15 16 Nouns in lists... Nouns in lists… (2) O Context: O Solution: » Principle of least astonishment » Put nouns in lists, verbs in menus » People expect to perform actions on subjects » List of actions without subjects looks incomplete edit tree » Select a subject first, then an action house copy ? cut 17 18 Patterns have exploded! Architectural Patterns Architectural Analysis Patterns O Deal with the highest levels of software Patterns development O Often discovered in very large projects Alexander’s O A few published examples Patterns Organizational Design » Coad, Object Models: Strategies Patterns and Patterns Patterns Applications » Buschmann, Pattern Oriented Software Architectures: A System of Patterns Language-Specific Patterns 19 20 Architectural Pattern - Pipes and Filters Pipes and Filters (2) O From [Buschmann96] O Solution: Divide the task O Problem: Building Lexical Analysis into sequential Systems to Transform processing steps and Process Streams of (filters). Syntax Analysis/Parsing Data O Steps are connected by » Different steps of the process may be data flow components Semantic Analysis represented differently (pipes) »Many intermediate data O Example: Compiler forms Code Generation 21 22 Architectural Pattern -- Four Layer Architecture (1) Four Layer Architecture (2) O Problem: »How do you structure an application with O Solution: significant presentation » Divide classes into layers and model components? » The MVC architecture of O Forces: Smalltalk-80 separated »Existing structures the “model” and “view” » Code reuse components » Distribution of work » More layers are needed among team members to model all necessary abstractions »Portability to new environments and language vendors Smalltalk Application Layers Layer purposes O View layer - provides the graphical view of an application. Handles user interaction O View layer Application layer - Mediates between different views of an application. Adapts the protocol Application layer of the View layer to the protocol of the domain model. Domain layer O Domain layer - Represents the business or Infrastructure layer “real-world” model of the application O Infrastructure layer - supports the domain layer with connections to external interfaces Analysis Patterns Analysis Patterns O Written by Martin Fowler O Deals with common O Patterns about Analysis business domains O Are they patterns about the Analysis process, » Accounting »Finance or patterns found in systems analysis? » Inventory O Both have been published... O Includes general purpose analysis patterns 27 28 An Analysis Pattern Account - Solution Account Entry Transaction entries O Account balance : Quantity amount : Quantity whenCharged : TimeStamp 2 O Problem: In many fields whenBooked : TimeStamp you must keep records Constraint: Constraint: of not just the current balance = sum(entries.amount) value of a thing, but the sum (entries.amount) = 0 changes that have affected that value. Basic Double-Entry Accounting! 29 30 Design Patterns Design Patterns -- Gang of Four O Gang of Four is Erich Gamma, Richard Helm, O Design Patterns are patterns about OO Ralph Johnson and John Vlissides design O Collaborated on finding patterns in software O Discuss tradeoffs inherent in the process over a series of years O Evaluate alternative designs O Finally decided to write a book 31 32 A Design Pattern -- Strategy Design Patterns (315) O Their book is Design Patterns: Elements of Reusable Object- O Often you have the “Choose 1 of N Oriented Software algorithms” problem. [GHJV95] O Example: Converting different file formats O 23 basic design patterns found in many large OO » GIF, JPEG, EPS, etc. systems O You could write one “FileReader” with a LOT O A pattern catalog of case statements. » Patterns are not dependent on each other 33 34 Strategy Solution Strategy Structure O Define a family of algorithms strategy Client AbstractStrategy » Various approaches to solving a problem » Encapsulate them as objects » Make them polymorphic O Client requests problem StrategyA StrategyB be solved O Strategy directs how problem is solved 35 36 Example Strategy Strategy Benefits strategy FileConverter AbstractReader O convertFrom:to: readFileNamed: Avoids case statements O Easily extensible » just add new Strategy subclasses O Strategy classes may be GIFReader JPGReader reusable elsewhere readFileNamed: readFileNamed: 37 38 A Design Pattern -- State (305) State Solution O Sometimes you have an object that acts O Define a set of State differently over time. objects. O Example: A TCPConnection O Defer the » You can’t open an opened one or close a closed implementation of the one. different methods to the O You could use methods like become: or state object. changeClassToThatOf: O The client changes its state from time to time. » leads to messy, difficult code 39 40 TCP Example STD TCP Example Hierarchy transmit state TCPConnection TCPState ActiveOpen( ) ActiveOpen( ) Close( ) Close( ) activeOpen PassiveOpen( ) PassiveOpen( ) Closed Established state.ActiveOpen() TCPClosed passiveOpen send TCPEstablished TCPListen ActiveOpen( ) ActiveOpen( ) ActiveOpen( ) close Close( ) Close( ) Close( ) PassiveOpen( ) PassiveOpen( ) PassiveOpen( ) Listen 41 42 State Benefits Why use Design Patterns O Proven solutions to common OO problems O Makes state transitions explicit O Confer expertise to beginners O Localizes behavior; better allocation of O Common vocabulary for designers responsibility O Documentation for existing frameworks O Eliminates the need for case statements O Once internalized, good design techniques O Since the States are objects, the State become second nature Machine can be reconfigured on the fly O Often combined to create more sophisticated designs 43 44 How to use Design Patterns Languages-Specific Patterns O Usually the pattern describes a role for an O Often called idioms object -- not a class! O Can be found in any language (not just OO) » Don’t blindly implement all 23 as classes! O They are the way
Recommended publications
  • Iot Design Patterns: Computational Constructs to Design, Build and Engineer Edge Applications
    2016 IEEE First International Conference on Internet-of-Things Design and Implementation IoT Design Patterns: Computational Constructs to Design, Build and Engineer Edge Applications Soheil Qanbari∗, Samim Pezeshki†, Rozita Raisi †, Samira Mahdizadeh∗, Rabee Rahimzadeh†, Negar Behinaein†, Fada Mahmoudi†, Shiva Ayoubzadeh †, Parham Fazlali†, Keyvan Roshani†, Azalia Yaghini†, Mozhdeh Amiri†, Ashkan Farivarmoheb†, Arash Zamani†, and Schahram Dustdar∗ ∗Distributed Systems Group, Vienna University of Technology, Vienna, Austria {qanbari, dustdar}@dsg.tuwien.ac.at †Baha’i Institute for Higher Education (BIHE) {firstname.lastname}@bihe.org Abstract—The objective of design patterns is to make design wiring approach of Hanmer [7]. This articulates the benefits robust and to abstract reusable solutions behind expressive of applying patterns by showing how each piece can fit into interfaces, independent of a concrete platform. They are ab- one integrated solution. stracted away from the complexity of underlying and enabling technologies. The connected things in IoT tend to be diverse With this motivation in mind, the paper continues in Sec- in terms of supported protocols, communication methods and tion II, with a brief review of how IoT design patterns are capabilities, computational power and storage. This motivates documented. Next, we introduce the diversity of our proposed us to look for more cost-effective and less resource-intensive patterns and how they are related to the edge applications IoT microservice models. We have identified a wide range of life-cycle in Section III. With some definitive clues on the design disciplines involved in creating IoT systems, that act as a seamless interface for collaborating heterogeneous things, and pattern language convention, we propose an edge provisioning suitable to be implemented on resource-constrained devices.
    [Show full text]
  • Capturing Interactions in Architectural Patterns
    Capturing Interactions in Architectural Patterns Dharmendra K Yadav Rushikesh K Joshi Department of Computer Science and Engineering Department of Computer Science and Engineering Indian Institute of Technology Bombay Indian Institute of Technology Bombay Powai, Mumbai 400076, India Powai, Mumbai 400076, India Email: [email protected] Email: [email protected] TABLE I Abstract—Patterns of software architecture help in describing ASUMMARY OF CCS COMBINATORS structural and functional properties of the system in terms of smaller components. The emphasis of this work is on capturing P rimitives & Descriptions Architectural the aspects of pattern descriptions and the properties of inter- Examples Significance component interactions including non-deterministic behavior. Prefix (.) Action sequence intra-component Through these descriptions we capture structural and behavioral p1.p2 sequential flow specifications as well as properties against which the specifications Summation (+) Nondeterminism choice within a component are verified. The patterns covered in this paper are variants of A1 + A2 Proxy, Chain, MVC, Acceptor-Connector, Publisher-Subscriber Composition (|) Connect matching multiple connected and Dinning Philosopher patterns. While the machines are CCS- A1 | A2 i/o ports in assembly components based, the properties have been described in Modal µ-Calculus. Restriction (\) Hiding ports from Internal The approach serves as a framework for precise architectural A\{p1, k1, ..} further composition features descriptions. Relabeling ([]) Renaming of ports syntactic renaming A[new/old, ..] I. INTRODUCTION In component/connector based architectural descriptions [6], [13], components are primary entities having identities in the represents interface points as ports uses a subset of CSP for system and connectors provide the means for communication it’s formal semantics.
    [Show full text]
  • Structured Patterns Metamodel Standardtm Publication
    An OMG® Structured Patterns Metamodel StandardTM Publication OBJECT MANAGEMENT GROUP Structured Patterns Metamodel StandardTM V1.1 _______________________________________________ OMG Document Number: formal/2017-04-05 Release Date: July 2017 Standard document URL: http://www.omg.org/spec/SPMS/1.1 Normative Machine Consumable File(s): http://www.omg.org/spec/ SPMS /201 60301 /SPMS.xmi http://www.omg.org/spec/ SPMS/20160301/PHORML.xml http://www.omg.org/spec/ SPMS /201 60301 /APML.xmi _________________________________________________ Copyright © 2017, Object Management Group, Inc. Copyright © 2014, The Software Revolution, Inc. Copyright © 2014, CAST Copyright © 2014, KDM Analytics Copyright © 2014, Benchmark Consulting Copyright © 2014, eCube Systems Copyright © 2014, MITRE Copyright © 2014, University of North Carolina at Chapel Hill Copyright © 2014, École Polytechnique de Montréal USE OF SPECIFICATION – TERMS, CONDITIONS & NOTICES The material in this document details an Object Management Group specification in accordance with the terms, conditions and notices set forth below. This document does not represent a commitment to implement any portion of this specification in any company's products. The information contained in this document is subject to change without notice. LICENSES The companies listed above have granted to the Object Management Group, Inc. (OMG) a nonexclusive, royalty-free, paid up, worldwide license to copy and distribute this document and to modify this document and distribute copies of the modified version. Each of the copyright holders listed above has agreed that no person shall be deemed to have infringed the copyright in the included material of any such copyright holder by reason of having used the specification set forth herein or having conformed any computer software to the specification.
    [Show full text]
  • Wiki As Pattern Language
    Wiki as Pattern Language Ward Cunningham Cunningham and Cunningham, Inc.1 Sustasis Foundation Portland, Oregon Michael W. Mehaffy Faculty of Architecture Delft University of Technology2 Sustasis Foundation Portland, Oregon Abstract We describe the origin of wiki technology, which has become widely influential, and its relationship to the development of pattern languages in software. We show here how the relationship is deeper than previously understood, opening up the possibility of expanded capability for wikis, including a new generation of “federated” wiki. [NOTE TO REVIEWERS: This paper is part first-person history and part theory. The history is given by one of the participants, an original developer of wiki and co-developer of pattern language. The theory points toward future potential of pattern language within a federated, peer-to-peer framework.] 1. Introduction Wiki is today widely established as a kind of website that allows users to quickly and easily share, modify and improve information collaboratively (Leuf and Cunningham, 2001). It is described on Wikipedia – perhaps its best known example – as “a website which allows its users to add, modify, or delete its content via a web browser usually using a simplified markup language or a rich-text editor” (Wikipedia, 2013). Wiki is so well established, in fact, that a Google search engine result for the term displays approximately 1.25 billion page “hits”, or pages on the World Wide Web that include this term somewhere within their text (Google, 2013a). Along with this growth, the definition of what constitutes a “wiki” has broadened since its introduction in 1995. Consider the example of WikiLeaks, where editable content would defeat the purpose of the site.
    [Show full text]
  • Enterprise Integration Patterns Introduction
    Enterprise Integration Patterns Gregor Hohpe Sr. Architect, ThoughtWorks [email protected] July 23, 2002 Introduction Integration of applications and business processes is a top priority for many enterprises today. Requirements for improved customer service or self-service, rapidly changing business environments and support for mergers and acquisitions are major drivers for increased integration between existing “stovepipe” systems. Very few new business applications are being developed or deployed without a major focus on integration, essentially making integratability a defining quality of enterprise applications. Many different tools and technologies are available in the marketplace to address the inevitable complexities of integrating disparate systems. Enterprise Application Integration (EAI) tool suites offer proprietary messaging mechanisms, enriched with powerful tools for metadata management, visual editing of data transformations and a series of adapters for various popular business applications. Newer technologies such as the JMS specification and Web Services standards have intensified the focus on integration technologies and best practices. Architecting an integration solution is a complex task. There are many conflicting drivers and even more possible ‘right’ solutions. Whether the architecture was in fact a good choice usually is not known until many months or even years later, when inevitable changes and additions put the original architecture to test. There is no cookbook for enterprise integration solutions. Most integration vendors provide methodologies and best practices, but these instructions tend to be very much geared towards the vendor-provided tool set and often lack treatment of the bigger picture, including underlying guidelines and principles. As a result, successful enterprise integration architects tend to be few and far in between and have usually acquired their knowledge the hard way.
    [Show full text]
  • Research Challenges in Nextgen Service Orchestration
    Research Challenges in Nextgen Service Orchestration Luis M. Vaquero1, Felix Cuadrado2, Yehia Elkhatib3, Jorge Bernal-Bernabe4, Satish N. Srirama5, and Mohamed Faten Zhani6 1Faculty of Engineering, University of Bristol, UK Corresponding author: [email protected] 2EECS, Queen Mary University of London, UK 3MetaLab, SCC, Lancaster University, UK 4DIIC, University of Murcia, Spain 5Institute of Computer Science, University of Tartu, Estonia 6École de Technologie Supérieure, Montréal Abstract Fog/edge computing, function as a service, and programmable infrastructures, like software-defined networking or network function virtualisation, are becoming ubiquitously used in modern Information Technology infrastructures. These technologies change the characteristics and capabilities of the underlying computational substrate where services run (e.g. higher volatility, scarcer computational power, or programmability). As a consequence, the nature of the services that can be run on them changes too (smaller codebases, more fragmented state, etc.). These changes bring new requirements for service orchestrators, which need to evolve so as to support new scenarios where a close interaction between service and infrastructure becomes essential to deliver a seamless user experience. Here, we present the challenges brought forward by this new breed of technologies and where current orchestration techniques stand with regards to the new challenges. We also present a set of promising technologies that can help tame this brave new world. Keywords: NVM; SDN; NFV; orchestration; large scale; serverless; FaaS; churn; edge; fog. 1. Introduction arXiv:1806.00764v2 [cs.DC] 7 Jun 2018 There is a new breed of technologies that are becoming mainstream in current Information Technology (IT) infrastructures. Fog computing aims to partially move services from core cloud data centres into the edge of the network [159].
    [Show full text]
  • From a Pattern Language to a Field of Centers and Beyond Patterns and Centers, Innovation, Improvisation, and Creativity
    From a Pattern Language to a Field of Centers and Beyond Patterns and Centers, Innovation, Improvisation, and Creativity Hajo Neis Illustration 1: University of Oregon in Portland Downtown Urban Campus The Campus is located in downtown Portland in adapted old warehouse buildings, and was first designed in the Oregon pattern language method with the principles of pat- terns and user participation. The White Stag building facilities are open since 2009. 144 Hajo Neis INTRODUCTION What we call now the ›overall pattern language approach‹ in architecture, urban design, and planning has grown from its original principle of ›pattern and pat- tern language‹ into a large and solid body of theory and professional work. To- day, pattern theory and practice includes a large number of principles, methods, techniques and practical project applications in which patterns themselves play a specific part within this larger body of knowledge. Not only has the pattern lan- guage approach grown in its original area of architecture, but it has also (though less triumphantly than silently) expanded into a large number of other disciplines and fields, in particular computer and software science, education, biology, com- munity psychology, and numerous practical fields. Nevertheless, we first have to acknowledge that the pattern approach originally started with a single principle almost 50 years ago, the principle of pattern and pattern language that gave the name to this school of thought and practical professional project work. In this article we want to trace some of the theoretical and practical develop- ment of the pattern method and its realization in practical projects. We want to explore how challenges and opportunities resulted in the adaptation of the pattern language method into various forms of pattern project formats and formulations including ›pattern language‹ and ›project language.‹ We want to look at various forms of innovations and techniques that deal with theoretical improvements as well as the necessities of adaptation for practical cases and projects.
    [Show full text]
  • The Culture of Patterns
    UDC 681.3.06 The Culture of Patterns James O. Coplien Vloebergh Professor of Computer Science, Vrije Universiteit Brussel, PO Box 4557, Wheaton, IL 60189-4557 USA [email protected] Abstract. The pattern community came about from a consciously crafted culture, a culture that has persisted, grown, and arguably thrived for a decade. The culture was built on a small number of explicit principles. The culture became embodied in its activities conferences called PLoPs that centered on a social activity for reviewing technical worksand in a body of literature that has wielded broad influence on software design. Embedded within the larger culture of software development, the pattern culture has enjoyed broad influence on software development worldwide. The culture hasnt been without its problems: conflict with academic culture, accusations of cultism, and compromises with other cultures. However, its culturally rich principles still live on both in the original organs of the pattern community and in the activities of many other software communities worldwide. 1. Introduction One doesnt read many papers on culture in the software literature. You might ask why anyone in software would think that culture is important enough that an article about culture would appear in such a journal, and you might even ask yourself: just what is culture, anyhow? The software pattern community has long taken culture as a primary concern and focus. Astute observers of the pattern community note a cultural tone to the conferences and literature of the discipline, but probably view it as a distant and puzzling phenomenon. Casual users of the pattern form may not even be aware of the cultural focus or, if they are, may discount it as a distraction.
    [Show full text]
  • A Survey of Architectural Styles.V4
    Survey of Architectural Styles Alexander Bird, Bianca Esguerra, Jack Li Liu, Vergil Marana, Jack Kha Nguyen, Neil Oluwagbeminiyi Okikiolu, Navid Pourmantaz Department of Software Engineering University of Calgary Calgary, Canada Abstract— In software engineering, an architectural style is a and implementation; the capabilities and experience of highest-level description of an accepted solution to a common developers; and the infrastructure and organizational software problem. This paper describes and compares a selection constraints [30]. These styles are not presented as out-of-the- of nine accepted architectural styles selected by the authors and box solutions, but rather a framework within which a specific applicable in various domains. Each pattern is presented in a software design may be made. If one were to say “that cannot general sense and with a domain example, and then evaluated in be called a layered architecture because the such and such a terms of benefits and drawbacks. Then, the styles are compared layer must communicate with an object other than the layer in a condensed table of advantages and disadvantages which is above and below it” then one would have missed the point of useful both as a summary of the architectural styles as well as a architectural styles and design patterns. They are not intended tool for selecting a style to apply to a particular project. The to be definitive and final, but rather suggestive and a starting paper is written to accomplish the following purposes: (1) to give readers a general sense of several architectural styles and when point, not to be used as a rule book but rather a source of and when not to apply them, (2) to facilitate software system inspiration.
    [Show full text]
  • Analysis Patterns.Pdf
    Symbols for mappings DLKING , : www.dlking.com Generalization notation DLKING , : www.dlking.com Contents Foreword v Foreword vii Preface xv Chapter 1. Introduction 1 1.1 Conceptual Models 1 1.2 The World of Patterns 4 1.3 The Patterns in this Book 8 1.4 Conceptual Models and Business Process Reengineering 10 1.5 Patterns and Frameworks 11 1.6 Using the Patterns 11 References 14 Part 1. Analysis Patterns 15 Chapter 2. Accountability 17 2.1 Party 18 2.2 Organization Hierarchies 19 2.3 Organization Structure 21 2.4 Accountability 22 2.5 Accountability Knowledge Level 24 2.6 Party Type Generalizations 27 2.7 Hierarchic Accountability 28 2.8 Operating Scopes 30 2.9 Post 32 References 33 Chapter 3. Observations and Measurements 35 3.1 Quantity 36 3.2 Conversion Ratio 38 3.3 Compound Units 39 3.4 Measurement 41 3.5 Observation 42 3.6 Subtyping Observation Concepts 46 3.7 Protocol 46 3.8 Dual Time Record 47 IX DLKING , : www.dlking.com x Contents 3.9 Rejected Observation 48 3.10 Active Observation, Hypothesis, and Projection 49 3.11 Associated Observation 50 3.12 Process of Observation 51 References 55 Chapter 4. Observations for Corporate Finance 57 4.1 Enterprise Segment 59 4.2 Measurement Protocol 65 4.3 Range 76 4.4 Phenomenon with Range 77 4.5 Using the Resulting Framework 82 References 83 Chapter 5. Referring to Objects 85 5.1 Name 86 5.2 Identification Scheme 88 5.3 Object Merge 90 5.4 Object Equivalence 92 References 93 Chapter 6.
    [Show full text]
  • A Model of Inheritance for Declarative Visual Programming Languages
    An Abstract Of The Dissertation Of Rebecca Djang for the degree of Doctor of Philosophy in Computer Science presented on December 17, 1998. Title: Similarity Inheritance: A Model of Inheritance for Declarative Visual Programming Languages. Abstract approved: Margaret M. Burnett Declarative visual programming languages (VPLs), including spreadsheets, make up a large portion of both research and commercial VPLs. Spreadsheets in particular enjoy a wide audience, including end users. Unfortunately, spreadsheets and most other declarative VPLs still suffer from some of the problems that have been solved in other languages, such as ad-hoc (cut-and-paste) reuse of code which has been remedied in object-oriented languages, for example, through the code-reuse mechanism of inheritance. We believe spreadsheets and other declarative VPLs can benefit from the addition of an inheritance-like mechanism for fine-grained code reuse. This dissertation first examines the opportunities for supporting reuse inherent in declarative VPLs, and then introduces similarity inheritance and describes a prototype of this model in the research spreadsheet language Forms/3. Similarity inheritance is very flexible, allowing multiple granularities of code sharing and even mutual inheritance; it includes explicit representations of inherited code and all sharing relationships, and it subsumes the current spreadsheet mechanisms for formula propagation, providing a gradual migration from simple formula reuse to more sophisticated uses of inheritance among objects. Since the inheritance model separates inheritance from types, we investigate what notion of types is appropriate to support reuse of functions on different types (operation polymorphism). Because it is important to us that immediate feedback, which is characteristic of many VPLs, be preserved, including feedback with respect to type errors, we introduce a model of types suitable for static type inference in the presence of operation polymorphism with similarity inheritance.
    [Show full text]
  • Pedagogical and Elementary Patterns Patterns Overview
    Pedagogical and Elementary Patterns Overview Patterns Joe Bergin Pace University http://csis.pace.edu/~bergin Thanks to Eugene Wallingford for some material here. Jim (Cope) Coplien also gave advice in the design. 11/26/00 1 11/26/00 2 Patterns--What they DO Where Patterns Came From • Capture Expert Practice • Christopher Alexander --A Pattern Language • Communicate Expertise to Others – Architecture • Solve Common Recurring Problems • Structural Relationships that recur in good spaces • Ward Cunningham, Kent Beck (oopsla ‘87), • Vocabulary of Solutions. Dick Gabriel, Jim Coplien, and others • Bring a set of forces/constraints into • Johnson, Gamma, Helm, and Vlisides (GOF) equilibrium • Structural Relationships that recur in good programs • Work with other patterns 11/26/00 3 11/26/00 4 Patterns Branch Out Patterns--What they ARE • Software Design Patterns (GOF...) •A Thing • Organizational Patterns (XP, SCRUM...) • A Description of a Thing • Telecommunication Patterns (Hub…) • A Description of how to Create the Thing • Pedagogical Patterns •A Solution of a Recurring Problem in a • Elementary Patterns Context – Unfortunately this “definition” is only useful if you already know what patterns are 11/26/00 5 11/26/00 6 Patterns--What they ARE (2) Elements of a Pattern • Structural relationships between •Problem components of a system that brings into • Context equilibrium a set of demands on the system •Forces • A way to generate complex (emergent) •Solution behavior from simple rules • Examples of Use (several) • A way to make the world a better place for humans -- not just developers or teachers... • Consequences and Resulting Context 11/26/00 7 11/26/00 8 Exercise Exercise • Problem: Build a stairway up a castle tower • Problem: Design the intersection of two or • Context: 12th Century Denmark.
    [Show full text]