CS160 Discussion Section Matthew Kam Apr 7, 2003.

Slides:



Advertisements
Similar presentations
Welcome to. Who am I? A better way to code Design Patterns ???  What are design patterns?  How many are there?  How do I use them?  When do I use.
Advertisements

Software Engineering 2003 Jyrki Nummenmaa 1 OBJECT ARCHITECTURE DESIGN These slides continue with our example application, based on the simplified.
Lecture Roger Sutton 21: Revision 1.
Object-Oriented Design Patterns Composite Singleton State Observer … Autumn 2012UCN Technology: IT/Computer Science1.
Internal information 1 EPi/Policy training UK September 12, 2008.
Literature Survey, Literature Comprehension, & Literature Review.
OOP Design Patterns Chapters Design Patterns The main idea behind design patterns is to extract the high level interactions between objects and.
1 Programming for Engineers in Python Autumn Lecture 5: Object Oriented Programming.
6/13/20151 CS 160: Lecture 13 Professor John Canny Fall 2004.
1 Model View Controller. 2 Outline Review Definitions of MVC Why do we need it? Administiriva Changing the display Event flow Dragging at interactive.
Welcome to Turnitin.com’s Peer Review! This tour will take you through the basics of Turnitin.com’s Peer Review. The goal of this tour is to give you.
Graphical User Interface (GUI) Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
Web Design Patterns (Homepage) IS 485, Professor Matt Thatcher.
Class 0: Review and Perspective. cis 335 Fall 2001 Barry Cohen Class info n Barry Cohen n n Office hours: W 3:15-4:40.
Graphical User Interface (GUI) Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Spring 2010CS 2251 Design Patterns. Spring 2010CS 2252 What is a Design Pattern? "a general reusable solution to a commonly occurring problem in software.
0 CS 160: Design Process: Implement Event-based UI Programming, Model-View-Controller, and the Web Jeffrey Nichols IBM Almaden Research Center
CS 201 Functions Debzani Deb.
1 Web Design Process & Patterns. 2 Outline Review Web design process Motivation for design patterns Web design patterns Home page pattern.
MVC Fall 2005 OOPD John Anthony. Design Patterns The hard problem in O-O programming is deciding what objects to have, and what their responsibilities.
Object-Oriented Analysis and Design
CS & ECE Senior Design Project Winter 2008 Karen Davis Chia Han Altan Ferendeci.
Stanford hci group / cs376 research topics in human-computer interaction UI Software Tools Scott Klemmer 27 October 2005.
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Web Design and Patterns CMPT 281. Outline Motivation: customer-centred design Web design introduction Design patterns.
MVC pattern and implementation in java
Copyright ©: SAMSUNG & Samsung Hope for Youth. All rights reserved Tutorials Software: Building apps Suitable for: Advanced.
Planning for Divisions. Meeting Goals  Provide Baseline Overview of Divisions  Review Divisions Plan & Testing To Date.
Software Tools.  It accomplishes an important task  (for better and for worse) You don’t have to make it yourself, and it abstracts a set of knowledge.
MVC and MVP. References enter.html enter.html
Model View Controller (MVC) Rick Mercer with a wide variety of others 1.
Model-View-Controller Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Organizing Your Information
1 WEB Engineering E-Commerce Strategy & Management COM350.
(c) University of Washington08-1 CSC 143 Models and Views Reading: Ch. 18.
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
Cohesion and Coupling CS 4311
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Web Application Design Patterns. Large Scale Architectures Early systems were monolithic applications –Large and hard to maintain Then came the client-server.
Problemsolving Problem Solving – 4 Stages Analysis Design Development Evaluate (ADDE) Note: In this unit Evaluate is not covered in depth.
Model View Controller (MVC) Bigger than a Pattern: It’s an Architecture Rick Mercer with help from many others 1.
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
Model View Controller MVC Web Software Architecture.
Model View Controller (MVC) Bigger than a Pattern: It’s an Architecture Rick Mercer with help from many of others 1.
Object Oriented Analysis & Design Game Patterns. Contents  What patterns are  Delegation  Game Loop  Scene Graph  Double Buffering  Component 
Design Patterns Software Engineering CS 561. Last Time Introduced design patterns Abstraction-Occurrence General Hierarchy Player-Role.
ANDROID AND MODEL / VIEW / CONTROLLER. Slide 2 Design Patters Common solutions to programming problems are called design patterns Design patterns are.
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
MVC WITH CODEIGNITER Presented By Bhanu Priya.
Model-View-Controller Architecture. 2 Give someone a program, you frustrate them for a day; teach them how to program, you frustrate them for a lifetime.
 An essential supporting structure of any thing  A Software Framework  Has layered structure ▪ What kind of functions and how they interrelate  Has.
The Hashemite University Computer Engineering Department
Model View Controller (MVC) an architecture Rick Mercer with help from many of others 1.
L10: Model-View-Controller General application structure. User Interface: Role, Requirements, Problems Design patterns: Model – View – Controller, Observer/Observable.
Prof. James A. Landay University of Washington Winter 2007 Video Prototyping January 22, 2007.
BUS 642 Entire Course (2 Sets) FOR MORE CLASSES VISIT This Tutorial Contains 2 Sets of Assignments for All Weeks, Check Details.
Presented by Alexey Vedishchev Developing Web-applications with Grails framework American University of Nigeria, 2016 Intro To MVC Architecture.
Imposing MVC design sample in.NET. Design patterns are very useful to solve complex design issues if used well. The primary concept of the Model View.
Design Patterns Source: “Design Patterns”, Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides And Created.
GRASP – Designing Objects with Responsibilities
Topic: Python’s building blocks -> Variables, Values, and Types
Professor John Canny Spring 2003
Patterns.
Professor John Canny Fall 2004
based on notes by James Landay
Professor John Canny Spring 2004 March 5
Model, View, Controller design pattern
Standards learning goals - syllabus lecture notes – the current .ppt
Professor John Canny Spring 2003 March 12
Presentation transcript:

CS160 Discussion Section Matthew Kam Apr 7, 2003

Outline Design Patterns Model-View-Controller Heuristic Evaluation Assignment Administrivia

Motivation for Design Patterns Most examples from UI literature are critiques –Norman, Nielsen, etc. Design is about finding solutions Unfortunately, designers often reinvent –hard to know how things were done before –hard to reuse specific solutions Design patterns are a solution –reuse existing knowledge of what works well

Pattern Format 1.Pattern Title 2.Background Information 3.Problem Statement 4.Solution 5.Solution Sketch 6.Other Patterns to Consider

Home Page Design Rules Problem –without a compelling home page (H/P), no one will ever go on to the rest of your site –surveys show millions of visitors leave after H/P most will never come back -> lost sales, etc.

Six Ways to Make a Good Home Page Lure visitors to return –with fresh content keep it updated so there is a reason to come back –by seducing with text you have only seconds –lively, sparkling, precise

Design Patterns Next used in software engineering [Gamma, et. al.] –communicate design problems & solutions Proxy –surrogate for another object to control access to it Observer –when one object changes state, its dependents are notified

Model-View-Controller Architecture for interactive apps –introduced by Smalltalk developers at PARC Partitions application in a way that is –scalable –maintainable Model View Controller

Model Information the app is trying to manipulate Representation of real world objects –circuit for a CAD program logic gates and wires connecting them –shapes in a drawing program geometry and color Model View Controller

Example Application Blue circles: 4 Cardinal squares: 2

Example Code (Model) class Model { class Shape {... int type; // 0 – square, 1 – circle int x, y; Color color; Shape(int type, int x, int y, Color c) {…}; } Shape shapes[MAX_SHAPES]; // array of shapes View views[MAX_VIEWS]; // array of Views void addCircle(Shape circle) { shapes.addElement(circle); for each view do view.refresh(); }

Controller Receives all input events from the user Decides what they mean and what to do –communicates with view to determine which objects are being manipulated (e.g., selection) –calls model methods to make changes on objects model makes change and notifies views to update Model View Controller

Example Code (Controller) // declaration in corresponding Model class Shape {... int type; // 0 – square, 1 – circle int x, y; Color color; Shape(int type, int x, int y, Color c); } // code in corresponding Model void addCircle(Shape circle) {... } // Controller code void onMouseClick(MouseEvent e) { addCircle( new Shape(Shape.CIRCLE, e.getX(), e.getY(), Color.BLUE)); }

View Implements a visual display of the model May have multiple views –e.g., shape view and numerical view Any time the model is changed, each view must be notified so that it can change later –e.g., adding a new shape Model View Controller

Example Code (View) // code in corresponding model void addCircle(Shape circle) { shapes.addElement(circle); for each view do view.refresh(); } // for graphical View void refresh() { for each shape do shape.repaint(); } // for text View void refresh() { print(“Blue circles:” + shapes.count(Shape.CIRCLE); print(“Cardinal squares:” + shapes.count(Shape.SQUARE); } Blue circles: 4 Cardinal squares: 2

Why MVC? Combining MVC into one class or using global variables will not scale –model may have more than one view each is different and needs update when model changes Separation eases maintenance –easy to add a new view later –new model info may be needed, but old views still work –can change a view later, e.g., draw shapes in 3-d (recall, view handles selection)

Multiple Views Blue circles: 4 Cardinal squares: 2

Adding Views Later Blue circles: 4 Cardinal squares: 2

Combining View & Controller View and controller are tightly intertwined –lots of communication between the two Almost always occur in pairs –i.e., for each view, need a separate controller Many architectures combine into a single class Model View Controller

Combining V-C for Efficiency Blue circles: 4 Cardinal squares: 2 drag

Example Code void onMouseDragged(MouseEvent e) { if (view1.inDraggedMode() { view1.getDraggedObject.setX(e.getX()); view1.getDraggedObject.setY(e.getY()); view1.refresh(); } Blue circles: 4 Cardinal squares: 2 drag

Back to Patterns What are the problems that MVC attempts to solve? What is the overall solution in the MVC approach?

HE Assignment Report outline –Problem (one sentence) –Violations found (as needed) –Summary of violations (¾ page) Total # of violations in user interface # of violations for each heuristic # of violations for each severity rating –Overall recommendations (¾ page)

Grading Criteria Completeness –Does HE cover entire interface? Indicate clearly if no violation found on particular screens –HE must include unimplemented portions Indicate clearly if no sketches given for unimplemented portions Explain if unimplemented portions could not be evaluated –Were there major violations that were not found? That’s why HE needs 3-5 evaluators

Grading Criteria (Cont’d) Clarity of violation descriptions –Are the stated violations valid? –Limit to 30 major violations if >30 found –Report multiple instances as single violation Quality of recommendations –Usually, one recommendation per heuristic Unless each heuristic’s violation fall under >1 category –For each heuristic, give recommendation for violation with highest severity

Administrivia Heuristic evaluation assignment due Apr 9, 2003 (this Wed) in lecture –Turn in two copies –Post online on Swiki for respective groups to start making hi-fi changes

Administrivia Scribe notes from HCI Panel posted on section homepage under “Announcements” –Skills needed for HCI careers –Career opportunities in HCI –Workplace-related issues Ethics involving human subjects –Anonymize online reports if haven’t already done so