Slides by Alex Mariakakis with material from Krysta Yousoufian and Kellen Donohue Section 8: Model-View-Controller.

Slides:



Advertisements
Similar presentations
New Release Announcements and Product Roadmap Chris DiPierro, Director of Software Development April 9-11, 2014
Advertisements

Apache Struts Technology
CM_AD_315 Booking Rules v3 1 Booking Rules CM_AD_315.
Calendar Browser is a groupware used for booking all kinds of resources within an organization. Calendar Browser is installed on a file server and in a.
Graphical User Interface (GUI) Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
Event-Driven Programming and Access Events
Graphical User Interface (GUI) Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Midterm Presentation 24/05/04 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of.
Object-Oriented Analysis and Design
Apache Struts Technology A MVC Framework for Java Web Applications.
MIS2502: Data Analytics MySQL and SQL Workbench David Schuff
Technical solution presentation AVL System for Fire Brigades.
Hazard Awareness and Vulnerable Road Users
Booking Rules SLCM_AD_315 1 SLCM_AD_315 Booking Rules.
Lesson 2.2 Traffic Signals  Today’s Objectives: 1. Explain what to do at a green, yellow, and red light. 2. Describe the action to take when you approach.
A physicist, an engineer and a programmer were in a car driving over a steep alpine pass when the brakes failed. The car was getting faster and faster,
ARCHIBUS Log On Instructions. Log Into ARCHIBUS Web Central Log In Screen 1.Open your Internet browser. 2.Enter the URL to view the ARCHIBUS Login Page.
Microsoft Outlook Web Application (OWA)
MVC pattern and implementation in java
ENVIROTRAC: A Premier Chamber Monitoring and Data Acquisition System Envirotrac A Guided Tour.
Microsoft Office Communicator A General Introduction.
Model View Controller (MVC) Rick Mercer with a wide variety of others 1.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Data File Access API : Under the Hood Simon Horwith CTO Etrilogy Ltd.
Developing the Game User Interface (UI) Lesson 5.
FireRMS NEMSIS (Part 2) Presented by Laura Small FireRMS Quality Assurance.
Design Patterns Part two. Structural Patterns Concerned with how classes and objects are composed to form larger structures Concerned with how classes.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
SunGuide® Software Development Project Release 4.3 Express Lanes Enhancements Design Review December 15, 2009 December 15, 20091R4.3 Design Review.
Slides adapted from Alex Mariakakis, with material from Krysta Yousoufian and Kellen Donohue Section 8: Model-View-Controller.
Access Forms and Queries. Entering Data in Your Table  You can add data to your table in Datasheet view, by typing in the columns and rows.  This.
Computer Basics & Keyboarding. What Is A Computer? An electronic device operating under the control of instructions stored in its own memory unit An electronic.
Exchange 2013 Web App (OWA) User Guide. Table of Contents How to Logon Opening View Navigation Mail Contacts Calendar 2.
Developing MVC based AJAX applications Kapil Mohan Rich Internet Application Developer, Uzanto Consulting A talk by.
Error Resolution in mUzima Introducing new Error resolution UI.
The Abstract Window Toolkit (AWT) supports Graphical User Interface (GUI) programming. AWT features include: a rich set of user interface components; a.
Introduction to Views Stanford Drupal Camp April 6, 2013.
Behavioural Design Patterns Quote du jour: ECE450S – Software Engineering II I have not failed. I've just found 10,000 ways that won't work. - Thomas Edison.
Model View Controller (MVC) Bigger than a Pattern: It’s an Architecture Rick Mercer with help from many of others 1.
FriendFinder Location-aware social networking on mobile phones.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
ITE District 6 Annual Meeting 1 Implementing a Web-based Transportation Data Management System Prepared for: ITE District 6 Annual Meeting Honolulu, Hawaii.
Institute for the Protection and Security of the Citizen HAZAS – Hazard Assessment ECCAIRS Technical Course Provided by the Joint Research Centre - Ispra.
Chapter 5 Introduction To Form Builder. Lesson C Objectives  Use sequences to automatically generate primary key values in a form  Create lists of values.
Dextrosoft SCHEDULED PHONE BACKUP Backup your mobile life Version Copyright © 2015 Dextrosoft Private Limited. All Rights Reserved.
Apache Struts Technology A MVC Framework for Java Web Applications.
Interstage BPM v11.2 1Copyright © 2010 FUJITSU LIMITED INTERSTAGE BPM ARCHITECTURE BPMS.
Due to the competitive nature of this document, the information contained within is considered to be of a proprietary and confidential nature and shall.
 Every sign’s shape and color have special meaning  Regulatory Signs: Signs that set limits, or give commands.  Example: stop sign, Yield, One Way,
 Signs that set limits or give commands are regulatory signs. Regulatory sings control traffic.
Integrating ArcSight with Enterprise Ticketing Systems
Integrating ArcSight with Enterprise Ticketing Systems
Creating Oracle Business Intelligence Interactive Dashboards
CONTENT MANAGEMENT SYSTEM CSIR-NISCAIR, New Delhi
Section 8: Model-View-Controller
Introduction to Triggers
Observer Design Pattern
Section 8: Model-View-Controller
MVC and other n-tier Architectures
Materials Engineering Product Data Management (ePDM)
A physicist, an engineer and a programmer were in a car driving over a steep alpine pass when the brakes failed. The car was getting faster and faster,
MIS2502: Data Analytics MySQL and SQL Workbench
INFO/CSE 100, Spring 2006 Fluency in Information Technology
NEW! To meet the growing requirements for managing our courses and events, Olympic ESD 114 has partnered with a new program called pdEnroller. pdEnroller.
A physicist, an engineer and a programmer were in a car driving over a steep alpine pass when the brakes failed. Their car raced down the mountain, and.
Variables & getting info from the user
Download the APhA 2018 app Scan the QR code or search for APhA in iTunes or APhA Annual in the Google Play store. For all other device types (including.
PCW-09 Vision: Information Center Approval System
Event loops.
COmputeR ScIenCe wait-list User Stories Presentation
Presentation transcript:

Slides by Alex Mariakakis with material from Krysta Yousoufian and Kellen Donohue Section 8: Model-View-Controller

Agenda MVC MVC example 1: traffic light MVC example 2: registration HW8 info

MVC The classic design pattern Used for data-driven user applications Such apps juggle several tasks: o Loading and storing the data – getting it in/out of storage on request o Constructing the user interface – what the user sees o Interpreting user actions – deciding whether to modify the UI or data These tasks are largely independent of each other Model, view, and controller each get one task

Model talks to data source to retrieve and store data Which database table is the requested data stored in? What SQL query will get me the data I need?

View asks model for data and presents it in a user-friendly format Would this text look better blue or red? In the bottom corner or front and center? Should these items go in a dropdown list or radio buttons?

Controller listens for the user to change data or state in the UI, notifying the model or view accordingly The user just clicked the “hide details” button. I better tell the view. The user just changed the event details. I better let the model know to update the data.

Communication Flow What do you think are the benefits of MVC? ModelViewController

Benefits of MVC Organization of code o Maintainable, easy to find what you need Ease of development o Build and test components independently Flexibility o Swap out views for different presentations of the same data (ex: calendar daily, weekly, or monthly view) o Swap out models to change data storage without affecting user

MVC Example – Traffic Signal Regulate valid traffic movements o Don’t let cars run into each other Detect cars waiting to enter intersection Traffic lights to direct car traffic Manual override for particular lights o Automatic green for fire trucks Detect pedestrians waiting to cross Pedestrian signals to direct pedestrians External timer which triggers changes at set interval

Traffic Signal – MVC ComponentModelViewController Regulate valid traffic movements Detect cars waiting to enter intersection Traffic lights to direct car traffic Manual override for particular lights Detect pedestrians waiting to cross Pedestrian signals to direct pedestrians External timer which triggers changes at set interval

Traffic Signal – MVC ComponentModelViewController Regulate valid traffic movementsX Detect cars waiting to enter intersection Traffic lights to direct car traffic Manual override for particular lights Detect pedestrians waiting to cross Pedestrian signals to direct pedestrians External timer which triggers changes at set interval

Traffic Signal – MVC ComponentModelViewController Regulate valid traffic movementsX Detect cars waiting to enter intersection X Traffic lights to direct car traffic Manual override for particular lights Detect pedestrians waiting to cross Pedestrian signals to direct pedestrians External timer which triggers changes at set interval

Traffic Signal – MVC ComponentModelViewController Regulate valid traffic movementsX Detect cars waiting to enter intersection X Traffic lights to direct car trafficX Manual override for particular lights Detect pedestrians waiting to cross Pedestrian signals to direct pedestrians External timer which triggers changes at set interval

Traffic Signal – MVC ComponentModelViewController Regulate valid traffic movementsX Detect cars waiting to enter intersection X Traffic lights to direct car trafficX Manual override for particular lights X Detect pedestrians waiting to cross Pedestrian signals to direct pedestrians External timer which triggers changes at set interval

Traffic Signal – MVC ComponentModelViewController Regulate valid traffic movementsX Detect cars waiting to enter intersection X Traffic lights to direct car trafficX Manual override for particular lights X Detect pedestrians waiting to crossX Pedestrian signals to direct pedestrians External timer which triggers changes at set interval

Traffic Signal – MVC ComponentModelViewController Regulate valid traffic movementsX Detect cars waiting to enter intersection X Traffic lights to direct car trafficX Manual override for particular lights X Detect pedestrians waiting to crossX Pedestrian signals to direct pedestrians X External timer which triggers changes at set interval

Traffic Signal – MVC ComponentModelViewController Regulate valid traffic movementsX Detect cars waiting to enter intersection X Traffic lights to direct car trafficX Manual override for particular lights X Detect pedestrians waiting to crossX Pedestrian signals to direct pedestrians X External timer which triggers changes at set interval X

Traffic Signal – Model Stores current state of traffic flow o Knows current direction of traffic o Capable of skipping a light cycle Stores whether there are cars and/or pedestrians waiting Example o TrafficModel

Traffic Signal – Views Conveys information to cars and pedestrians in a specific direction Examples o CarLight – traffic light o PedestrianLight – pedestrian light

Traffic Signal – Controller Aware of model’s current direction Triggers methods to notify model that state should change Examples o PedestrianButton – notifies TrafficModel that there is a pedestrian waiting o CarDetector – notifies TrafficModel that there is a car waiting o LightSwitch – enables or disables the light o Timer – regulates time in some way, possibly to skip cycles

MVC Example – Registration Registration system with web interface Advisors create classes, set space, time, restrictions Professors can see who’s signed up for their class Students can see available classes and sign up for classes Administrators can place holds on student registration Professors can be notified when a student drops Students can be notified when a spot is available in a class they want

Registration Would you use push or pull? What would change for interaction with an API or mobile app? If advisors can see what students are registered for and change their registration, what changes?

HW8 Overview Apply your generic graph & Dijkstra’s to campus map data Given a list of buildings and walking paths Produce routes from one building to another on the walking paths o Distance in feet, compass directions Command-line interface now o GUI in HW9

HW8 Data Format List of buildings (abbreviation, name, loc in pixels) BAG Bagley Hall (East Entrance) , BGR By George , List of paths (endpoint 1, endpoint 2, dist in feet) , , : , : ,1956.5: , , : , : , : (0,0) is in the upper left

MVC in HW8 Model stores graph, performs Dijkstra’s View shows results to users in text format Controller takes user commands and uses view to show results View and Controller will change in HW9, but Model will stay the same