Mac OS X and ios operating systems. Lecture 5 Design patterns. Tomasz Idzi

Similar documents
COSC 3351 Software Design. Design Patterns Behavioral Patterns (I)

Brief Note on Design Pattern

EMBEDDED SYSTEMS PROGRAMMING Design Patterns

EMBEDDED SYSTEMS PROGRAMMING Design Patterns

Design Patterns Reid Holmes

CS 2720 Practical Software Development University of Lethbridge. Design Patterns

Object Oriented. Analysis and Design

Pro Objective-C Design Patterns for ios

Appendix-A. A.1 Catalogues of Design Patterns. Below is the definition for each design pattern using the FINDER notation, followed

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns

Software Engineering - I An Introduction to Software Construction Techniques for Industrial Strength Software

Last Lecture. Lecture 17: Design Patterns (part 2) Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 4448/ Spring Semester, 2005

Development and Implementation of Workshop Management System Application to Explore Combing Multiple Design Patterns

Design Pattern. CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.)

2.1 Design Patterns and Architecture (continued)

Slide 1. Design Patterns. Prof. Mirco Tribastone, Ph.D

2.1 Design Patterns and Architecture (continued)

COSC 3351 Software Design. Design Patterns Behavioral Patterns (II)

CS 349 / SE 382 Design Patterns. Professor Michael Terry January 21, 2009

Introduction to Software Engineering: Object Design I Reuse & Patterns

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

THOMAS LATOZA SWE 621 FALL 2018 DESIGN PATTERNS

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011

Component ConcreateComponent Decorator ConcreateDecoratorA ConcreteDecoratorB

CS560. Lecture: Design Patterns II Includes slides by E. Gamma et al., 1995

Egon Borger (Pisa) Capturing Design Pattern Abstractions by ASMs

Announcements. Today s Topics

DESIGN PATTERN - INTERVIEW QUESTIONS

I, J. Key-value observing (KVO), Label component, 32 text property, 39

Design pa*erns. Based on slides by Glenn D. Blank

TDDB84: Lecture 6. Adapter, Bridge, Observer, Chain of Responsibility, Memento, Command. fredag 4 oktober 13

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011

Design of Software Systems (Ontwerp van SoftwareSystemen) Design Patterns Reference. Roel Wuyts

Chapter 8, Object Design: Reusing Pattern Solutions

Design Patterns Reid Holmes

Refining the Observer Pattern: The Middle Observer Pattern

Ingegneria del Software Corso di Laurea in Informatica per il Management. Design Patterns part 1

CSC207H: Software Design Lecture 6

Object-oriented Software Design Patterns

Software Reengineering Refactoring To Patterns. Martin Pinzger Delft University of Technology

Design Patterns. (and anti-patterns)

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D.

Observer Pattern. CS580 Advanced Software Engineering October 31, Yu Sun, Ph.D.

Behavioral patterns. Command Iterator Observer Strategy Template method

UNIT I Introduction to Design Patterns

Design patterns. Valentina Presutti courtesy of Paolo Ciancarini

Design Patterns. CSE870: Advanced Software Engineering (Design Patterns): Cheng

DESIGN PATTERNS MOCK TEST DESIGN PATTERNS MOCK TEST II

CSE870: Advanced Software Engineering (Cheng) 1

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

A Reconnaissance on Design Patterns

ITP 342 Mobile App Development. Model View Controller

Trusted Components. Reuse, Contracts and Patterns. Prof. Dr. Bertrand Meyer Dr. Karine Arnout

Goals of Lecture. Lecture 27: OO Design Patterns. Pattern Resources. Design Patterns. Cover OO Design Patterns. Pattern Languages of Programming

Design Patterns! Acknowledgements!

Dr. Xiaolin Hu. Review of last class

Topics in Object-Oriented Design Patterns

Java Technologies. Lecture III. Valdas Rapševičius. Vilnius University Faculty of Mathematics and Informatics

Last Lecture. Lecture 26: Design Patterns (part 2) State. Goals of Lecture. Design Patterns

EECS 4314 Advanced Software Engineering. Topic 04: Design Pattern Review Zhen Ming (Jack) Jiang

Lecture 17: Patterns Potpourri. Copyright W. Howden 1

Facade and Adapter. Comp-303 : Programming Techniques Lecture 19. Alexandre Denault Computer Science McGill University Winter 2004

Lecture 19: Introduction to Design Patterns

Produced by. Design Patterns. MSc in Communications Software. Eamonn de Leastar

Design Patterns: Structural and Behavioural

Information systems modelling UML and service description languages

Mobile Application Programming. Messaging and Delegation

CISC 322 Software Architecture

Design Patterns (II)

UNIT-I. Introduction, Architectural Styles, Shared Information Systems

Design Patterns. Dr. Rania Khairy. Software Engineering and Development Tool

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1

UNIT I Introduction to Design Patterns

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 6: Design Patterns

Applying Design Patterns to SCA Implementations

Design Patterns. Definition of a Design Pattern

SDC Design patterns GoF

2/12/15. Template Method. Design Patterns. In Swing s JComponent. Template Method. Where do template methods come from? Making Template Methods

Idioms and Design Patterns. Martin Skogevall IDE, Mälardalen University

The Strategy Pattern Design Principle: Design Principle: Design Principle:

CPSC 427a: Object-Oriented Programming

Lecture 20: Design Patterns II

Design Patterns and Frameworks Command

Page 1. Chapter 8, Object Design: Design Patterns II. Recall: Why reusable Designs? Definitions. A Taxonomy of Design Patterns

Design Patterns. Observer Pattern*

Software Eningeering. Lecture 9 Design Patterns 2

Design patterns generic models

Design Patterns Lecture 2

Course UML and Design Patterns of module Software Engineering and Design, version November 18, 2013.

Design Patterns. GoF design patterns catalog

Course "UML and Design Patterns" of module "Software Engineering and Design", version November 2011

DESIGN PATTERNS FOR MERE MORTALS

Advanced Topics in Software Engineering (02265) Ekkart Kindler

SYLLABUS CHAPTER - 1 [SOFTWARE REUSE SUCCESS FACTORS] Reuse Driven Software Engineering is a Business

Introduction and History

Object Oriented Methods with UML. Introduction to Design Patterns- Lecture 8

CSCI Object Oriented Design: Frameworks and Design Patterns George Blankenship. Frameworks and Design George Blankenship 1

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

Lecture 4: Observer Pattern, Event Library and Componentization

Transcription:

Lecture 5 Design patterns

What is it? reusable solutions clear code easy to develop

Descripion of pattern. what why how the design pattern is you should use it to use it

singleton abstract factory MVC decorator adapter facade composite observer memento chain of responsibility command

Model View Controller what why how the design pattern is you should use it to use it

what Model View Controller controller update notify update user actions model view

why Model View Controller better understanding Cocoa easy add new features use it in other projects

Model View Controller controller update notify update user actions model view

Model View Controller ViewController notify update update user actions Album AlbumView

what Singleton Manager +instance:manager +sharedinstance():manager -init():id

why Singleton global access

Singleton LibraryAPI +instance:libraryapi +sharedinstance():libraryapi -init():id

Singleton

what Facade API remote server database file system memory

why Facade single interface to a complex subsystem reduces dependencies of outside code easier to develop

Facade LibraryAPI HTTPClient Persistency Manager

Facade LibraryAPI HTTPClient Persistency Manager

what Decorator Obj-c category delegation

what Decorator category NewClass : NSString

what Decorator category NSString +NewClass.h NSString +NewClass.m

why Decorator category extend existing classes without subclassing replace existing method add methods to any of Cocoa s own classes

Decorator category

Decorator category

Decorator category

Decorator category

Decorator category titles Artist Album Genre Year values album.artist album.tittle album.genre album.year

Decorator category

what Decorator delegation ViewController UITableView tableview:numberofrowsinsection: return 4 tableview:cellforrowatindexpath: How many rows should I draw? for (int i=0;i<4;i++) What should I present for cell 1? return cell and so on...

why Decorator delegation changes in another object two objects coordinate to solve a problem

Decorator delegation MyCell MainViewController.h.m.m

what Adapter

what Adapter

what Adapter client <target> request adaptee request adapter request [adaptee specificrequest]

why Adapter different types of objects work together easy add new features use it in other projects

Adapter

Adapter HorizontalScroller.h

Adapter HorizontalScroller.m

Adapter HorizontalScroller.m

Adapter HorizontalScroller.m

Adapter HorizontalScroller.m

Adapter HorizontalScroller.m

Adapter

what Observer subject attachobserver:observer detachobserver:observer notify observer update ConcreteSubject getstate setstate:state subjectstate_ ConcreteObserver update observestate_

why Observer one object notifies other objects of any state change

Observer Notification Key-Value Observing (KVO)

Observer Notification AlbumView.m LibraryAPI.m

Observer Notification PresistencyManager.m

Observer Notification LibraryAPI.m

Observer Key-Value Observing (KVO) AlbumView.m

what Memento originator -state + SetMemento + CreateMemento memento - state + GetState + SetState memento caretaker

why Memento save and load app state whenever you want

Memento

what Command client invoker <Command> execute receiver action receiver ConcreteCommand execute [receiver action]

why Command app support undo/redo

Command