MVC. Controller. Model. View. Divide objects in your program into 3 camps. Stanford CS193p Fall 2011

Similar documents
Model-View-Controller Architecture

Stanford CS193p. Developing Applications for ios Fall Stanford CS193p. Fall 2013

Software System/Design & Architecture. Eng.Muhammad Fahad Khan Assistant Professor Department of Software Engineering

Assignment III: Graphing Calculator

Assignment I Walkthrough

Assignment III: Graphing Calculator

Stanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011

Mobile Application Development

When we re first learning Cocoa (or Java, or Qt, or any other application framework),

Mobile Application Programming. Messaging and Delegation

Developing Applications for ios

Assignment III: Graphing Calculator

Assignment II: Calculator Brain

Assignment IV: Smashtag Mentions

Mobile Application Development

Stanford CS193p. Developing Applications for ios. Winter CS193p! Winter 2015

Stanford CS193p. Developing Applications for ios. Fall CS193p. Fall

Assignment III: Graphing Calculator

ios Mobile Development

ios Development Lecture 3 Controllers of View Controllers Ing. Simone Cirani

CS193E Lecture 14. Cocoa Bindings

ios DeCal : Lecture 2 Structure of ios Applications: MVC and Auto Layout

Announcements. Today s Topics

Stanford CS193p. Developing Applications for ios. Spring Stanford CS193p. Spring 2012

Discussion 2C Notes (Week 9, March 4) TA: Brian Choi Section Webpage:

S A M P L E C H A P T E R

CS193p Spring 2010 Wednesday, March 31, 2010

1 GSW Bridging and Switching

Assignment II: Foundation Calculator

CS193P: HelloPoly Walkthrough

ECE 158A: Lecture 13. Fall 2015

CMPSC 250 Analysis of Algorithms Spring 2018 Dr. Aravind Mohan Shortest Paths April 16, 2018

Stanford CS193p. Developing Applications for ios. Winter CS193p. Winter 2017

PAGE 1 RCL SYSTEM PARTS IMT MATERIAL HANDLING SYSTEMS RCL SYSTEM PARTS

Enabling Apple AirPrint with Your Xerox ConnectKey Device

View Controller Lifecycle

Building GUIs with UIKit. Kevin Cathey

Distributed Collaboration - Assignment 3: Replicated N-User IM

Chapter 4: Application Protocols 4.1: Layer : Internet Phonebook : DNS 4.3: The WWW and s

CS193p Spring 2010 Thursday, April 29, 2010

ios Mobile Development

Strategies That Work

Creating Models. Rob Allen, July 2014

EmberJS A Fitting Face for a D8 Backend. Taylor Solomon

Installing and Setting Up Ring Video Doorbell Elite

Installing and Setting Up Ring Video Doorbell Elite

Dispatch Console 3.0. User guide

Configuring your VLAN. Presented by Gregory Laffoon

BL -700 C ali brati on G ui de

MVC & Onwards. CS 442: Mobile App Development Michael Saelee

Stanford CS193p. Developing Applications for ios. Winter CS193p! Winter 2015

Enabling Apple AirPrint with Your Xerox AltaLink Multifunction Printer. White Paper

Stanford CS193p. Developing Applications for ios. Fall CS193p. Fall

WELCOME UVAHS REMEDY INCIDENT MANAGEMENT

where are we? ICS 105: Project in HCI ui toolkits what does the toolkit do? model-view-controller model-view-controller lectures

Hi. I m a three. I m always a three. I never ever change. That s why I m a constant.

The MSAP is available only in the root virtual domain from 7.3 Release.

Executive MOBEX Telephone User Guide Series

Your . A setup guide. Last updated March 7, Kingsford Avenue, Glasgow G44 3EU

Beacon Office. User Manual. Radianta Inc. Version - 2.5(1)

SHOUTcast v2 - Broadcasting with Nicecast

Designing iphone Applications

What's new in ios 5?

English Bible for the Deaf

AP firmware version tested: NetLink Wireless Telephone software version tested: Maximum telephone calls per AP: 8

Week 3. Topic 5 Asymptotes

Designing the M in MVC

Programming Robots with ROS, Morgan Quigley, Brian Gerkey & William D. Smart

MASSIVE-SCALE ONLINE CONVERSATIONS

PRODUCT CATALOG 2018

Stanford CS193p. Developing Applications for ios. Spring CS193p. Spring 2016

Building a Secure Wireless Network. Use i and WPA to Protect the Channel and Authenticate Users. May, 2007

Yasser Mostafa The Wall The Wall is an interactive media system with a screen the size of a wall. Some of the things it can do includes:

Stanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011

live streaming tools+tips

Assignment I: Concentration

range expectation about 820 feet line-of-sight outdoors.

CSCI 1100L: Topics in Computing Lab Lab 1: Introduction to the Lab! Part I

Stanford CS193p. Developing Applications for ios. Winter CS193p! Winter 2015

Announcements. Today s Topics

iphone Application Programming Lab 2: MVC and Delegation + A01 discussion

Instruction Set: Manage Delegation

Configuring WO Automation for Radio for TuneGenie

6 Stephanie Well. It s six, because there s six towers.

WL5041 Router User Manual

How to Create and Submit a Press Release

INLAND GPS. TECHNICAL TIPS from. MyMobiler Free remote display for Trimble TSC2

Notes for Lecture 14

Configure App Service Authentication for Your Azure Web App

Configuring Repeater and Standby Access Points

Programming in Android. Nick Bopp

Smart Operator USER GUIDE

Gearing Up for Development CS130(0)

Developing Applications for ios

How to configure a Point-to-Point link

One of the fundamental kinds of websites that SharePoint 2010 allows

Xamarin for C# Developers

ReactiveCocoa. Marc Prud'hommeaux Ottawa CocoaHeads February 13th, 2014

Overview: Steps to create an notification upon survey submission:

HOW TO SETUP TP-LINK DECO

Transcription:

Divide objects in your program into 3 camps.

= What your application is (but not how it is displayed)

= How your is presented to the user (UI logic)

= Your s minions

It s all about managing communication between camps

s can always talk directly to their.

outlet s can also talk directly to their.

outlet The and should never speak to each other.

outlet? Can the speak to its?

outlet Sort of. Communication is blind and structured.

target outlet The can drop a target on itself.

target outlet action Then hand out an action to the.

target outlet action The sends the action when things happen in the UI.

target outlet should will did action Sometimes the needs to synchronize with the.

should will did target outlet delegate action The sets itself as the s delegate.

should will did target outlet delegate action The delegate is set via a protocol (i.e. it s blind to class).

should will did target outlet delegate action s do not own the data they display.

should will did target outlet delegate action data at count So, if needed, they have a protocol to acquire it.

data at should will did count target outlet delegate data source action s are almost always that data source (not!).

data at should will did count target outlet delegate data source action s interpret/format information for the.

should target? data at will did count outlet data source delegate action Can the talk directly to the?

data at should will did count target outlet delegate data source action No. The is (should be) UI independent.

data at should will did count target outlet delegate data source action So what if the has information to update or something?

should target Notification & KVO data at will did count outlet data source delegate action It uses a radio station -like broadcast mechanism.

should target Notification & KVO data at will did count outlet data source delegate action s (or other ) tune in to interesting stuff.

should target Notification & KVO data at will did count outlet data source delegate action A might tune in, but probably not to a s station.

should target Notification & KVO data at will did count outlet data source delegate action Now combine MVC groups to make complicated programs...

MVCs working together

MVCs not working together

s working together What happens when your application gets more features? Now all of your UI can t fit in one MVC s view.

s working together What happens when your application gets more features? We never have an MVC s view span across screens. So we ll have to create a new MVC for these new features.

s working together So how do we switch the screen to show this other MVC?

s working together UINavigation We use a controller of controllers to do that. For example, a UINavigation.

s working together UINavigation The UINavigation is a whose looks like this.

MVCs working together UINavigation ro ot Vi ew Co nt ro ll er But it s special because we can set its root outlet to another MVC...

s working together UINavigation... and it will embed that MVC s inside its own.

s working together UINavigation Then a UI element in this (e.g. a UIButton) can segue to the other MVC and its will now appear in the UINavigation.

s working together UINavigation

s working together UINavigation Notice this Back button automatically appears.

s working together UINavigation When we click it, we ll go back to the first MVC.

s working together UINavigation

Calculator Calculator display CalculatorBrain digitpressed: CalculatorGraph graph? GraphDataSource

Calculator Calculator display CalculatorBrain digitpressed: CalculatorGraph graph? GraphDataSource

Calculator Calculator display CalculatorBrain digitpressed: CalculatorGraph graph? GraphDataSource

Calculator Calculator display CalculatorBrain digitpressed: CalculatorGraph graph? GraphDataSource

Calculator Calculator display CalculatorBrain digitpressed: CalculatorGraph CalculatorProgramsTable graph GraphDataSource Popover Segue UITableDataSource table? NSArray of programs

Calculator display Calculator When someone clicks in this table, we want to update the graph. How can we do that? CalculatorBrain digitpressed: CalculatorGraph CalculatorProgramsTable graph GraphDataSource Popover Segue UITableDataSource table? NSArray of programs

Calculator display Calculator We CANNOT directly ask this Graph to do it because we are (indirectly) part of that s. CalculatorBrain digitpressed: CalculatorGraph CalculatorProgramsTable graph GraphDataSource Popover Segue UITableDataSource table? NSArray of programs

Calculator Calculator display CalculatorBrain We do it in the normal way a can talk back to its : delegation. digitpressed: CalculatorGraph blec CalculatorProgramsTa Gr? ap gr hv ie wd at ap as hv ou ie rc e w CalculatorProgramsTable ontrollerdelegate gu e e S ver o p Po UI Ta bl ev ta ie wd at as bl ou ev rc ie w e NSArray of programs