With Cache Collector 344 with Data Accessor 31 with Domain

Total Page:16

File Type:pdf, Size:1020Kb

With Cache Collector 344 with Data Accessor 31 with Domain NockIX.fm Page 445 Friday, August 8, 2003 2:06 PM Index A with Selection Factory 52, 201 Abstract Factory (pattern) with Update Factory 52, 224 with Cache Collector 344 Active Record (pattern) with Data Accessor 31 with Active Domain Object 52 with Domain Object Factory 213 ActiveDomainObject (class) with Selection Factory 201 participant in Active Domain Object with Update Factory 224 38–39 access plan 129 Adapter (pattern) Active Domain Object (pattern) 33–52 with Data Accessor 31 connection factory 43 with Layers 78, 93 connection management 42–43 Address (class) 4–5 connection pool 43 example in Active Domain Object 34– data model encapsulation 36–37, 40 36, 48–49, 50 data model inconsistency 34–37 example in Domain Object Factory 209–212 domain logic 41 aggregation 62–64 domain object attribute 41 Apache Software Foundation 65 domain object collection 41, 50–51 see also Object/Relational Bridge logical attribute 38 (OJB) logical operation 38 AS/400 161, 164, 166–167, 172 saved state 43–48 atomicity 380 with Active Record 52 attribute with Cache Accessor 280 changes 219 with Data Accessor 31, 52 domain object 215–219 with Domain Object Assembler 52, transaction 389–390 252 unmapped 61–62 with Domain Object Factory 52, 213 authorization 80 with Layers 52, 76, 78, 91–93 authorization (example) with Object/Relational Map 52, 73 example in Primed Cache 291–292, with Paging Iterator 52 301–303 with Resource Descriptor 169 AuthorizationData (class) with Resource Pool 49 445 NockIX.fm Page 446 Friday, August 8, 2003 2:06 PM 446 Index example in Primed Cache 301–303 collection AuthorizationKeyFactory (class) see Cache Collector (pattern) example in Primed Cache 302–303 complexity 270 configuration 362 B creation timestamp 336–338 badge reader system (example) debugging 361–362 example in Cache Search Sequence decoupled 271–272, 273 306–308, 312–314, 317–320, 322 demand BadgeAccessRecord (class) see Demand Cache (pattern) example in Cache Search Sequence description 365–370 306–308, 322 distributed notification 353 BaseConnectionDecorator (class) domain object 268–269 example in Resource Decorator 111– efficiency 362 114 encapsulation 275 example in Resource Pool 127, 130 expired data 325–344 example in Resource Timer 146, 154 fixed expiration 326, 328, 336–338 BasePreparedStatementDecorator (class) hash table 276 example in Resource Pool 132 heterogeneous notification 353 BaseResourceDecorator (class) hits 362, 365–370 participant in Resource Decorator 107, 109–110 housekeeping 269 BaseStatementDecorator (class) identity object 62 example in Resource Decorator 111– inactive expiration 326, 330, 338–341 115 initialization 268, 281–282, 285 bean-managed persistence (BMP) 52 interprocess notification 353 begin 381, 384, 388 key 268, 273–274, 276–279, 292–303 buffer 97 key access queue 338–343 key creation queue 336–338 C key generalization 310, 314, 317–322 cache last access timestamp 338–341 accesses 365–370 layer 79 accessor least-recently-used expiration 326, see Cache Accessor (pattern) 341–344 administration 276–277, 361–362 memory leak 285, 296, 331 candidate 281 metadata 328–330, 335 clear 276–277 minimal data set 285 coherency 346 notification 346–359 NockIX.fm Page 447 Friday, August 8, 2003 2:06 PM Index 447 operation 268 write operation 275 optimized data set 296 Cache (class) partial key 292–303 participant in Cache Accessor 273– patterns 267–270 277 persistence manager 62 participant in Cache Search Sequence placeholder entry 285, 296–297, 311, 309–311 315 participant in Demand Cache 283– population 268, 281–282, 284–285, 285 291–293 participant in Primed Cache 294–297 prime operation 292, 295–296, 298 Cache (interface) primed participant in Cache Replicator 350, see Primed Cache (pattern) 353 read operation 274, 284–287 Cache Accessor (pattern) 271–280 redundant notification 352 multiple instances 276 refresh 276–277 read operation 274 replication stale data 275 see Cache Replicator (pattern) transparency 273 result set data 105 with Active Domain Object 280 scope 275 with Cache Collector 326 search sequence with Cache Replicator 280, 359 see Cache Search Sequence (pat- with Cache Search Sequence 280, 315, tern) 323 shortcut entry 307–314, 316–317 with Cache Statistics 280, 370 size 365–370 with Data Accessor 273, 280 size threshold 341–343 with Demand Cache 274, 280, 283, 290 specific key 292–303 with Domain Object Assembler 252, stale data 275, 345–346 280 statement 125 with Layers 280 statement handle 129–135 with Object/Relational Map 280 statistics with Primed Cache 274, 280, 292, 304 see Cache Statistics (pattern) write operation 275 synchronization 332–333 Cache Collector (pattern) topology 347–349, 352–353 325–344 transparency 268, 273 collection strategy 326–344 utilitization 275 creation timestamp 336–338 visibility 268 daemon thread 331–335 NockIX.fm Page 448 Friday, August 8, 2003 2:06 PM 448 Index decoupled cache logic 326–328, 331 peer cache replicator 347–348 expired data 325–344 redundant notification 352 fixed expiration 326, 328, 336–338 replicated cache 347–356, 358–359 inactive expiration 326, 330, 338–341 scalability 346 initialization 343–344 stale data 345–346 key access queue 338–343 topology 347–349, 352–353 key creation queue 336–338 with Cache Accessor 280, 359 last access timestamp 338–341 with Decorator 350, 359 least-recently-used expiration 326, with Demand Cache 359 341–344 with Observer 359 metadata 328–330, 335 Cache Search Sequence (pattern) 305–323 multiple strategies 331 directed graph 314, 320–322 performance 332 key generalization 310, 314, 317–322 queue threshold 341–343 placeholder entry 311, 315 synchronization 332–333 sequence keys 309–317 thread 331–335 shortcut entry 307–314, 316–317 with Abstract Factory 344 with Cache Accessor 280, 315, 323 with Cache Accessor 326 with Cache Statistics 323 with Cache Statistics 344, 370 with Demand Cache 323 with Demand Cache 290, 344 with Primed Cache 323 with Primed Cache 304, 344 Cache Statistics (pattern) 361–370 with Strategy 344 accesses 365–370 Cache Replicator (pattern) 345–359 administration 361–362 central cache 348–349, 358–359 cache efficiency 362 centralized cache replicator 348–349, configuration 362 358–359 console interface 362, 369–370 clustering 346 current statistics 364, 367–368 coherency 346 debugging 361–362 decoupled replication logic 349, 352 decoupled presentation 362–363 distributed notification 353 description 365–370 event 347 graphical interface 362, 369–370 heterogeneous notification 353 hits 362, 365–370 interprocess notification 353 misses 365–370 Java event idiom 353 pool size 362 load balancing 346 resource leak 362 notification 346–359 snapshot statistics 366–368 NockIX.fm Page 449 Friday, August 8, 2003 2:06 PM Index 449 with Cache Accessor 280, 370 CacheEntryFactory (interface) with Cache Collector 344, 370 example in Cache Collector 332–344 with Cache Search Sequence 323 participant in Cache Collector 327– with Demand Cache 370 329, 344 with Model-View-Controller 370 CacheReplicator (class) with Primed Cache 370 participant in Cache Replicator 350– with Resource Pool 136, 370 353 CacheAccessor (class) CacheSearchSequence (class) example in Cache Accessor 277–279 example in Cache Search Sequence 315–317, 322 example in Cache Collector 332–335, 343–344 participant in Cache Search Sequence 309–311 example in Cache Search Sequence 315–316 CacheUpdateEvent (class) example in Cache Statistics 368–369 example in Cache Replicator 357–358 example in Demand Cache 286–287, CacheUpdateListener (interface) 289 example in Cache Replicator 353–359 example in Primed Cache 297–303 CacheUpdateObserver (interface) participant in Cache Accessor 273– participant in Cache Replicator 350 277 call records (example) participant in Cache Search Sequence example in Pessimistic Lock 405–407, 309–311 411–414 participant in Demand Cache 283– CallRecord (class) 285 example in Pessimistic Lock 411–414 participant in Primed Cache 293–297 CALLS (table) CacheAccessor (interface) example in Pessimistic Lock 406, participant in Cache Collector 327– 411–414 331 centralized cache replicator 348–349, CacheCollector (interface) 358–359 example in Cache Collector 332–344 Chain of Responsibility (pattern) participant in Cache Collector 327– with Layers 93 331 with Resource Decorator 116 CachedStatement (class) change identifier 400 example in Resource Pool 130–134 clustering 346 CacheEntry (interface) CollectionStatistics (class) example in Cache Collector 334–343 example in Cache Statistics 367–369 participant in Cache Collector 327– column list 207–208 330 Command (pattern) NockIX.fm Page 450 Friday, August 8, 2003 2:06 PM 450 Index with Data Accessor 31 example in Data Accessor 21–29 with Retryer 176–177, 183 example in Layers 89–91 commit 381, 384–385, 388, 392–393 concurrency Compensatable (interface) dirty read 374, 388–389, 391 example in Compensating Transac- missing update 373–374, 388–389, tion 424–429 396–397, 406–408, 419, 424 participant in Compensating Trans- non-repeatable read 374, 388–389 action 421–422 patterns 371–377 compensatable operation phantom read 374–375, 388–389 see Compensating Transaction (pat- problems 373–375 tern) resource 97, 99–100 compensating serialization 375–376 see Compensating Transaction (pat- solutions 375–376 tern) timer 375 Compensating Transaction (pattern) unit of work 371–376 417–430 working copy 372–377 compensatable operation 419–429 configuration data 281–282 compensate 421–422, 424–429 connection 98 compensating 419–429 close 124 create operation 424 factory 43 delete operation 424 initialization
Recommended publications
  • Mastering JEE Design Patterns
    "Charting the Course ... ... to Your Success!" Mastering JEE Design Patterns Course Summary Description Geared for experienced enterprise Java (JEE) developers, Mastering JEE Design Patterns is a lab- intensive Java / JEE design patterns training course which explores the many sophisticated JEE-oriented design patterns and how to use these patterns to develop solid, robust and reusable JEE applications. Technologies such as JPA and EJB3, as well as frameworks such as Spring, web services and rich interfaces, have significantly impacted previous generations of design patterns. Many of these technologies were heavily influenced by the very problems that previous design patterns addressed. While the basic patterns still ring true, the more advanced patterns have evolved into more robust solutions for secure, stable and scalable enterprise applications. Working in a hands-on environment, developers will explore key patterns in each of the different JEE layers and how they are used most effectively in building robust, reusable JEE applications. Objectives Working in a dynamic, interactive discussion and hands-on programming environment, let by our JEE expert team, students will explore the following pattern categories: Crosscutting Business Tier Presentation Tier Integration Tier Topics Introduction to Design Patterns Integration Tier Patterns “Gang of Four” Design Patterns Presentation Tier Patterns Base Patterns Crosscutting Patterns Business Tier Patterns Working with Patterns Audience This is an intermediate level Java EE (JEE) developer course, designed for experienced Java developers, new to JEE, that need to further extend their skills in web development and Struts. Prerequisites Attendees should have an extensive working knowledge in developing basic Java applications. Duration Five days Due to the nature of this material, this document refers to numerous hardware and software products by their trade names.
    [Show full text]
  • Design Optimizations of Enterprise Applications – a Literature Survey
    Design Optimizations of Enterprise Applications – A Literature Survey Willie (Phong) Tu Dept. of Computer Science, University of Calgary [email protected] Abstract Another dimension is the performance improvement for the single user versus multiple users, in other words, Software design patterns have been defined as scalability. The design optimization patterns noted here possible solutions to reoccurring problems. One aspect will focus on actual running time of operations for of the problems is performance. This can be arguably single user performance and multi-user scalability true in high volume enterprise applications. This paper improvements. will explore the current discussions and research in The organization of the findings is categorized utilization of software design patterns to optimize through the usage of an architectural pattern, which is enterprise applications. defined as layer [5]. The layers used are the primary three-layer architecture for information systems [10,21], which includes the data access layer, domain layer, and 1. Introduction presentation layer. Design optimization patterns that spans layers will be elaborated first, then a bottom up First, let’s define what is design optimization. In this approach starting with the data access layer, followed by context, design optimization is the improvement of an the domain layer, and finally the presentation layer. We application’s design and performance using software will then continue on with findings from different design patterns. Design improvements can be subjective, enterprise applications. After which, we will summarize thus the main qualifier is the utilization of software the current state in design optimizations of enterprise design patterns to improve the performance of an applications based on the findings.
    [Show full text]
  • Enterprise Application Design Patterns: Improved and Applied
    Enterprise Application Design Patterns: Improved and Applied Stuart Thiel A Thesis in The Department of Computer Science and Software Engineering Presented in Partial Fulfillment of the Requirements for the Degree of Master of Computer Science at Concordia University Montreal, Quebec, Canada January 2010 © Stuart Thiel, 2010 i CONCORDIA UNIVERSITY School of Graduate Studies This is to certify that the thesis prepared By: Stuart Thiel Entitled: Enterprise Application Design Patterns: Improved and Applied and submitted in partial fulfillment of the requirements for the degree of Master of Computer Science complies with the regulations of the University and meets the accepted standards with respect to originality and quality. Signed by the final examining committee: ______________________________________________Chair Dr. Nematollaah Shiri ______________________________________________Examiner Dr. Greg Butler ______________________________________________Examiner Dr. Yuhong Yan ______________________________________________Supervisor Dr. Patrice Chalin Approved by __________________________________________ Chair of Department or Graduate Program Director _____________________________________ Dr. Robin Drew, Dean Faculty of Engineering and Computer Science Date ______________________________________________ i ii Abstract Enterprise Application Design Patterns: Improved and Applied Stuart Thiel Providing developers with proper tools is of ever increasing importance as software integrates itself further into all aspects of our lives. Aside from conventional hardware and software tools, architectural and design patterns have been identified over the years as a means to communicate knowledge of known problems and their solutions. In this thesis, we present several refinements and additions to these patterns, building primarily on Martin Fowler’s Patterns of Enterprise Application Architecture (2003). We present a practical implementation approach to using these patterns and discuss a framework that we have developed to aid practitioners in following this methodology.
    [Show full text]
  • A Solution to the Object-Relational Mismatch
    Universidade do Minho Escola de Engenharia Miguel Esteves CazDataProvider: A solution to the object-relational mismatch Outubro de 2012 Universidade do Minho Escola de Engenharia Departamento de Informática Miguel Esteves CazDataProvider: A solution to the object-relational mismatch Dissertação de Mestrado Mestrado em Engenharia Informática Trabalho realizado sob orientação de Professor José Creissac Campos Outubro de 2012 To my parents... \Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice." Christopher Alexander Abstract Today, most software applications require mechanisms to store information persistently. For decades, Relational Database Management Systems (RDBMSs) have been the most common technology to provide efficient and reliable persistence. Due to the object-relational paradigm mismatch, object oriented applications that store data in relational databases have to deal with Object Relational Mapping (ORM) problems. Since the emerging of new ORM frameworks, there has been an attempt to lure developers for a radical paradigm shift. However, they still often have troubles finding the best persistence mechanism for their applications, especially when they have to bear with legacy database systems. The aim of this dissertation is to discuss the persistence problem on object oriented applications and find the best solutions. The main focus lies on the ORM limitations, patterns, technologies and alternatives. The project supporting this dissertation was implemented at Cachapuz under the Project Global Weighting Solutions (GWS). Essentially, the objectives of GWS were centred on finding the optimal persistence layer for CazFramework, mostly providing database interoperability with close-to-Structured Query Language (SQL) querying.
    [Show full text]
  • Architects and Architecture Today
    PUBLISHED BY Microsoft Press A Division of Microsoft Corporation One Microsoft Way Redmond, Washington 98052-6399 Copyright © 2009 by Andrea Saltarello and Dino Esposito All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Library of Congress Control Number: 2008935425 Printed and bound in the United States of America. 1 2 3 4 5 6 7 8 9 QWT 3 2 1 0 9 8 Distributed in Canada by H.B. Fenn and Company Ltd. A CIP catalogue record for this book is available from the British Library. Microsoft Press books are available through booksellers and distributors worldwide. For further infor mation about international editions, contact your local Microsoft Corporation office or contact Microsoft Press International directly at fax (425) 936-7329. Visit our Web site at www.microsoft.com/mspress. Send comments to [email protected]. Microsoft, Microsoft Press, Access, ActiveX, IntelliSense, MS, MSDN, MS-DOS, PowerPoint, Silverlight, SQL Server, Visio, Visual Basic, Visual C#, Visual Studio, Windows, and Windows Vista are either registered trademarks or trademarks of the Microsoft group of companies. Other product and company names mentioned herein may be the trademarks of their respective owners. The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. This book expresses the author’s views and opinions.
    [Show full text]
  • Doctrine 2 ORM Documentation Release 2
    Doctrine 2 ORM Documentation Release 2 Doctrine Project Team June 11, 2015 Contents 1 Getting Help 3 2 Getting Started 5 3 Mapping Objects onto a Database7 4 Working with Objects 9 5 Advanced Topics 11 6 Tutorials 13 7 Changelogs 15 8 Cookbook 17 9 Welcome to Doctrine 2 ORM’s documentation! 19 9.1 Tutorials................................................. 19 9.2 Reference Guide............................................. 60 9.3 Cookbook................................................ 278 i ii Doctrine 2 ORM Documentation, Release 2 The Doctrine documentation is comprised of tutorials, a reference section and cookbook articles that explain different parts of the Object Relational mapper. Doctrine DBAL and Doctrine Common both have their own documentation. Contents 1 Doctrine 2 ORM Documentation, Release 2 2 Contents CHAPTER 1 Getting Help If this documentation is not helping to answer questions you have about Doctrine ORM don’t panic. You can get help from different sources: • There is a FAQ with answers to frequent questions. • The Doctrine Mailing List • Internet Relay Chat (IRC) in #doctrine on Freenode • Report a bug on JIRA. • On Twitter with #doctrine2 • On StackOverflow If you need more structure over the different topics you can browse the table of contents. 3 Doctrine 2 ORM Documentation, Release 2 4 Chapter 1. Getting Help CHAPTER 2 Getting Started • Tutorial: Getting Started with Doctrine • Setup: Installation & Configuration 5 Doctrine 2 ORM Documentation, Release 2 6 Chapter 2. Getting Started CHAPTER 3 Mapping Objects onto a Database • Mapping: Objects| Associations| Inheritance • Drivers: Docblock Annotations| XML| YAML| PHP 7 Doctrine 2 ORM Documentation, Release 2 8 Chapter 3. Mapping Objects onto a Database CHAPTER 4 Working with Objects • Basic Reference: Entities| Associations| Events • Query Reference: DQL| QueryBuilder| Native SQL • Internals: Internals explained| Associations 9 Doctrine 2 ORM Documentation, Release 2 10 Chapter 4.
    [Show full text]
  • SAMPLE CHAPTER Nhibernate in Action
    SAMPLE CHAPTER NHibernate in Action Pierre Henri Kuaté Tobin Harris Christian Bauer Gavin King Chapter 1 Copyright 2009 Manning Publications brief contents PART 1DISCOVERING ORM WITH NHIBERNATE............................. 1 1 ■ Object/relational persistence in .NET 3 2 ■ Hello NHibernate! 24 PART 2NHIBERNATE DEEP DIVE ................................................. 49 3 ■ Writing and mapping classes 51 4 ■ Working with persistent objects 100 5 ■ Transactions, concurrency, and caching 134 6 ■ Advanced mapping concepts 166 7 ■ Retrieving objects efficiently 207 PART 3NHIBERNATE IN THE REAL WORLD.................................. 257 8 ■ Developing NHibernate applications 259 9 ■ Writing real-world domain models 286 10 ■ Architectural patterns for persistence 319 1 Part 1 Discovering ORM with NHibernate The first part of the book provides insights into what ORM is, why it exists, and how it fits in a typical .NET application. We then introduce NHibernate, using a clear and simple example to help you understand how the various pieces of an NHibernate application fit together. Object/relational persistence in .NET This chapter covers ■ .NET persistence and relational databases ■ Layering .NET applications ■ Approaches to implementing persistence in .NET ■ How NHibernate solves persistence of objects in relational databases ■ Advanced persistence features Software development is an ever-changing discipline in which new techniques and technologies are constantly emerging. As software developers, we have an enor- mous array of tools and practices available, and picking the right ones can often make or break a project. One choice that is thought to be particularly critical is how to manage persistent data—or, more simply, how to load and save data. Almost endless options are available. You can store data in binary or text files on a disk.
    [Show full text]
  • Microsoft .NET: Architecting Applications for the Enterprise Ebook
    PUBLISHED BY Microsoft Press A Division of Microsoft Corporation One Microsoft Way Redmond, Washington 98052-6399 Copyright © 2009 by Andrea Saltarello and Dino Esposito All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Library of Congress Control Number: 2008935425 Printed and bound in the United States of America. 1 2 3 4 5 6 7 8 9 QWT 3 2 1 0 9 8 Distributed in Canada by H.B. Fenn and Company Ltd. A CIP catalogue record for this book is available from the British Library. Microsoft Press books are available through booksellers and distributors worldwide. For further infor mation about international editions, contact your local Microsoft Corporation office or contact Microsoft Press International directly at fax (425) 936-7329. Visit our Web site at www.microsoft.com/mspress. Send comments to [email protected]. Microsoft, Microsoft Press, Access, ActiveX, IntelliSense, MS, MSDN, MS-DOS, PowerPoint, Silverlight, SQL Server, Visio, Visual Basic, Visual C#, Visual Studio, Windows, and Windows Vista are either registered trademarks or trademarks of the Microsoft group of companies. Other product and company names mentioned herein may be the trademarks of their respective owners. The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. This book expresses the author’s views and opinions.
    [Show full text]
  • Design Patterns and Coldfusion Sean a Corfield Chief Systems Architect Broadchoice, Inc
    Design Patterns and ColdFusion Sean A Corfield Chief Systems Architect Broadchoice, Inc. Patterns describe problems and solutions “Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice.” -- Christopher Alexander, architect Alexander is not a software architect - he is a building architect! 1. Hierarchy of Open Space - big space in front, small space behind 2. Intimacy Gradient - enter into public areas, navigate into private areas Who am I? VP Engineering, Broadchoice Previously: Mgr, Adobe Hosted Services Sr Architect, Macromedia IT Sr Consultant, various web co. Architect / Developer: ColdFusion since 2001 Java since 1997 (Groovy since 2008!) Also manager of Bay Area ColdFusion User Group! What is this about? Common problems Common solutions Trade offs Show of hands: 1. Who’s using ColdFusion 8? 7? 6.1? 5 or earlier? 2. Who’s using CFCs? Who thinks they’re writing OO code? Patterns? I want to remove some of the mystery around patterns by showing you how pervasive they are - you're probably already using some patterns without even realizing it. I hope that you will come out of this session with a better understanding of what patterns are how they can help you in your day-to-day programming work - and that you will be inspired to learn more about patterns and extend yourself to become a better developer. Our roadmap Some simple, common patterns Patterns and languages Selecting and using patterns Frameworks and patterns Recommended reading Simple, common pattern examples A common problem My web site has the same stuff at the top and bottom of each page and I don't want to duplicate that in every page! A common solution Put the common stuff in separate files (header.cfm and footer.cfm) and include them on every page.
    [Show full text]
  • Migration of Applications Across Object-Oriented Apis
    Migration of Applications across Object-Oriented APIs by Thiago Tonelli Bartolomei A thesis presented to the University of Waterloo in fulfillment of the thesis requirement for the degree of Doctor of Philosophy in Electrical and Computer Engineering Waterloo, Ontario, Canada, 2012 c Thiago Tonelli Bartolomei 2012 I hereby declare that I am the sole author of this thesis. This is a true copy of the thesis, including any required final revisions, as accepted by my examiners. I understand that my thesis may be made electronically available to the public. ii Abstract Software developers often encapsulate reusable code as Application Programming Inter- faces (APIs). The co-evolution of applications and APIs may motivate an API migration: the replacement of application dependencies to an original API by dependencies to an alternative API that provides similar functionality and abstractions. In this dissertation, we investigate issues associated with API migration in object- oriented systems, with special focus on wrapping approaches. We present two studies and a set of developer interviews that elicit issues in the process and techniques used in API migration in practice. The results suggest that the most pressing issues relate to discovery and specification of differences between APIs, and to assessment of migration correctness. This dissertation introduces techniques and a method to address these issues. We propose the use of design patterns to support the specification of API wrappers. API wrapping design patterns encode solutions to common wrapping design problems. We present an initial catalog of such patterns that were abstracted from programming idioms found in existing API wrappers. We introduce the concept of compliance testing for API migration, a form of automated testing.
    [Show full text]
  • Patterns for API Migration by Wrapping
    Swing to SWT and Back: Patterns for API Migration by Wrapping Thiago Tonelli Bartolomei and Krzysztof Czarnecki Ralf Lammel¨ University of Waterloo University of Koblenz-Landau Waterloo, Canada Koblenz, Germany Abstract—Evolving requirements may necessitate API migra- In terms of their interfaces, the chosen APIs are very similar, tion—re-engineering an application to replace its dependence on but the actual implementations differ systematically in the one API with the dependence on another API for the same contracts for many methods. Our study was meant to measure domain. One approach to API migration is to replace the original API by a wrapper-based re-implementation that makes reuse of the effort needed to develop a sufficiently compliant wrapper the other API. Wrapper-based migration is attractive because in such a situation. The overall result of that work is twofold: application code is left untouched and wrappers can be reused a) wrappers need to involve a lot of tuning in order to achieve across applications. The design of such wrappers is challenging semantical equivalence in terms of pre- and post-conditions; though if the two involved APIs were developed independently, b) full compliance of the wrapper’s implementation with the in which case the APIs tend to differ significantly. We identify the challenges faced by developers when designing wrappers original API may be impractical; compliance relative to an for object-oriented APIs, and we recover the solutions used in ‘application of interest’ is achievable though. practice. To this end, we analyze two large, open-source GUI In this paper, we address a different aspect of API migration wrappers and compile a set of issues pervasive in their designs.
    [Show full text]
  • Software Architecture Design Architectural Patterns Readings
    Software Architecture Design Architectural Patterns Matthew Dailey Computer Science and Information Management Asian Institute of Technology Matthew Dailey (CSIM-AIT) Patterns 1 / 193 Readings Readings for these lecture notes: - Fowler (2002), Patterns of Enterprise Application Architecture, Addison-Wesley, Ch. 1–3, 9–11. Some material c Fowler (2002). Matthew Dailey (CSIM-AIT) Patterns 2 / 193 Outline 1 Introduction 2 Domain logic patterns 3 Mapping to relational databases 4 Web presentation 5 Concurrency 6 Session state 7 Distribution strategies Matthew Dailey (CSIM-AIT) Patterns 3 / 193 Introduction Fowler (2002) opens with a quote from Christopher Alexander: Each pattern describes a problem which occurs over and over again in our environment, then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice. Alexander was actually a (building) architect, but the same idea is relevant in software system architecture. Patterns represent best practices we can apply to ensure we don’t make the same mistakes the pioneers did. Matthew Dailey (CSIM-AIT) Patterns 4 / 193 Introduction In software architecture as in building architecture, patterns are references forming a common vocabulary for design. Patterns are not recipes! You can never blindly apply them, since they are always incomplete to some degree. Matthew Dailey (CSIM-AIT) Patterns 5 / 193 Introduction We begin with Fowler’s (2002) patterns, which share a common structure: Each pattern has a carefully chosen name. Each pattern has an intent summing up the pattern in a sentence or two. Each pattern has a sketch representing it visually, in UML or otherwise.
    [Show full text]