© Oscar Nierstrasz ST — Introduction ST 1.1 Scaffolding Patterns  How to prototype applications even faster?  Based on K. Auer Patterns.

Slides:



Advertisements
Similar presentations
Dynamic Object-Oriented Programming with Smalltalk 1. Introduction Prof. O. Nierstrasz.
Advertisements

Decorator Pattern Lecture Oo29 Artificial Life Simulation.
Georgia Institute of Technology Workshop for CS-AP Teachers Chapter 3 Advanced Object-Oriented Concepts.
© Oscar Nierstrasz ST — Introduction ST 1.1 A Word about Primitives  For optimization, if a primitive fails, the code following is executed. 
Stéphane Ducasse9.1 Inheritance Semantics and Lookup.
Button click handlers Maarten Pennings. Introduction An activity has one or more views – view is also known as widget or control – examples include Button,
Dynamic Object-Oriented Programming with Smalltalk 1. Introduction Prof. O. Nierstrasz Summer Semester 2006.
3. Standard Classes. © Oscar Nierstrasz ST — Standard Classes 3.2 Roadmap  Object  Numbers, Characters, Strings and Arrays  Variables  Blocks and.
Department of Computer Science & Engineering College of Engineering Dr. Betty H.C. Cheng, Laura A. Campbell, Sascha Konrad The demand for distributed real-time.
CHAPTER 10 Recursion. 2 Recursive Thinking Recursion is a programming technique in which a method can call itself to solve a problem A recursive definition.
4. Smalltalk Coding Idioms. © Oscar Nierstrasz ST — Smalltalk Coding Idioms 4.2 Roadmap  Snakes and Ladders — Cascade and Yourself  Lots of Little Methods.
Label production Solution with Label Gallery programs Label Gallery is used for general label design and print GalleryData is used to create small database.
Modern Concurrency Abstractions for C# by Nick Benton, Luca Cardelli & C´EDRIC FOURNET Microsoft Research.
Faculty of Informatics and Information Technologies Slovak University of Technology Peter Kajsa and Ľubomír Majtás Design.
Online Learning for Matrix Factorization and Sparse Coding
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
ITEC 370 Lecture 11 Design. Review Questions? Today! –Rough draft of your SRS document –Introduction, Features (Functional / Non-functional), Interfaces.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Mads Torgersen, Microsoft.  Language INtegrated Query  An open multi-language query facility  Uses cool language stuff  Points into the future.
Upgrading Applications to VB.NET Leveraging Your Visual Basic 6 Investments with VB 2005 & the Interop Forms Toolkit 2.0 Jonathan Aneja Program Manager.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Assessing the influence on processes when evolving the software architecture By Larsson S, Wall A, Wallin P Parul Patel.
Stéphane Ducasse 1 Visitor.
Chapter 8 Object Design Reuse and Patterns. Object Design Object design is the process of adding details to the requirements analysis and making implementation.
S.Ducasse Stéphane Ducasse savoie.fr e/ e/ 1 Inheritance Semantics and Method Lookup.
Database Design Some of these slides are derived from IBM/Rational slides from courses on UML and object-oriented design and analysis. Copyright to the.
Object Oriented Analysis and Design Class and Object Diagrams.
Caching for Performance Jeff Tapper Tapper.net Consulting.
Design Patterns Definition:
CASCADING STYLE SHEETS. CSS Advantages Lets you set up styles all in one place They can then be invoked just using the names.
ANDROID AND MODEL / VIEW / CONTROLLER. Slide 2 Design Patters Common solutions to programming problems are called design patterns Design patterns are.
Object-Oriented Programming © 2013 Goodrich, Tamassia, Goldwasser1Object-Oriented Programming.
Nathanael Schärli (SCG, University of Bern) and Andrew P. Black (CSE, Oregon Health & Science University) Nathanael Schärli (SCG, University of Bern) and.
The State Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
Implementation Basics in C# code Minimal C++ code Application logic in Java code.
1 Design Patterns Delegates Visitor Pattern. 2 Observer Pattern Observer Pattern is an object-oriented design that simulates void-pointers in for instance.
Herzog August Bibliothek Wolfenbüttel Backend, Service, Listener VuFind's new SOLR connection Originally Presented By David Maus Herzog August Bibliothek.
Refactoring Agile Development Project. Lecture roadmap Refactoring Some issues to address when coding.
Building Custom Controls with ASP.NET and the Microsoft ®.NET Framework Rames Gantanant Microsoft Regional Director, Thailand
Physical and Virtual Presence – What Does Center Look Like? August 28, 2013 Meeting Recap of Previous Discussions.
Patterns and Sequences Sequence: Numbers in a specific order that form a pattern are called a sequence. An example is 2, 4, 6, 8, 10 and 12. Polygon:
JavaScript and Ajax (JavaScript Environment) Week 6 Web site:
Technician Table Editor Academic advisor : Professor Ehud Gudes Technical advisor : Menny Even Danan Team: Olga Peled Doron Avinoam Ira Zaitsev ADD Presentation.
Plug-In Architecture Pattern. Problem The functionality of a system needs to be extended after the software is shipped The set of possible post-shipment.
COMPOSITE PATTERN NOTES. The Composite pattern l Intent Compose objects into tree structures to represent whole-part hierarchies. Composite lets clients.
SEAMCAT European Communications Office José Carrascosa - SEAMCAT Manager 5 April 2016.
Patterns Protect from Change Rule: if something is going to change, make it an object. Strategy: make algorithm an object so it can change State: make.
Smalltalk Meta-Programming Programming Languages HUJI 2010 Yardena Meymann.
Glast Collaboration Data Server and Data Catalog
CMSC201 Computer Science I for Majors Lecture 22 – Searching
jQuery – Form Validation
Satisfying Open/Closed Principle
Do Now Pg 52 #18-21.
Compass Navigation Support for Back-in-Time Debugging
Doug Jeffries CS490 Design Patterns May 1, 2003
EE 422C Java FX.
Jim Fawcett CSE776 – Design Patterns Summer 2003
Reusability 11/29/2018© 2006 ITT Educational Services Inc.
Composite Pattern Context:
CSE 1030: Data Structure Mark Shtern.
Towards JIT compiler for IO language Dynamic mixin optimization
PH Chapter 3 Thanks for the Memory Leaks Pushme-Pullyu (pp
Lecture 9 The most important GUI elements
CS 350 – Software Design Singleton – Chapter 21
Introduction to programming
Can you put the symbols in?
COMPILERS Semantic Analysis
Aim: How do we prepare for an AP Free Response question?
Extending Interface Based Design
Smalltalk on a Dime.
Presentation transcript:

© Oscar Nierstrasz ST — Introduction ST 1.1 Scaffolding Patterns  How to prototype applications even faster?  Based on K. Auer Patterns

© Oscar Nierstrasz ST — Introduction ST 1.2 Patterns  Extensible Attributes  Artificial Delegation —How do you prepare for additional delegated operations?  Cached Extensibility  Selector Synthesis

© Oscar Nierstrasz ST — Introduction ST 1.3 Extensible Attributes  Context: —multi person project + heavy version control —other designers will want to add attributes to your class  How do you minimize the effort required to add additional attributes to the class?  Solution:  Add a dictionary attribute to your class  + a dictionary access

© Oscar Nierstrasz ST — Introduction ST 1.4 Extensible Attributes  anExtensibleObject attributes at: #attName put: value  value := anExtensibleObject attributes at: #attName

© Oscar Nierstrasz ST — Introduction ST 1.5 Artificial Accessors  Context: you applied Extensible Attributes  How do you make it easier for other classes to access your extended attributes?  Solution: simulate the presence of accessor for the attributes by specializing doesNotUnderstand:

© Oscar Nierstrasz ST — Introduction ST 1.6 Artificial Accessors Code  anExtensibleObject widgets: 4  is converted to  self attributes at: #widgets put: 4  anExtensibleObject widgets  is converted to  ^ self attributes at: #widgets

© Oscar Nierstrasz ST — Introduction ST 1.7 Consequences  Accessors do not exist therefore —browsing can be a problem —tracing also —reflective queries (allSelectors, canUnderstand:....) will not work as with plain methods

© Oscar Nierstrasz ST — Introduction ST 1.8 Artificial Delegation  How do you make —^ self delegate anOperation  easier?  Solution: Override doesNotUnderstand: of the delegator to iterate through its attribute looking for an attribute that supports the method selector that was not understood 

© Oscar Nierstrasz ST — Introduction ST 1.9 Cached Extensibility  Context: you used the previous patterns  How do you know which artificial accessors or artificial delegate have been used?  Solution: Specialize doesNotUnderstand: to create methods as soon as artificial ones are invoked

© Oscar Nierstrasz ST — Introduction ST 1.10 Selector Synthesis  How can you implement a state-dependent object with a minimal effort?  Solution: define state and event as symbols and given a pair synthesise a method selector  selector := ‘handle’, anEvent aString, ‘In’, aState asString.  self perform: selector asSymbol.