Model View Controller Development architecture. MVC Model: the classes encapsulating the functionality of your app View: what the user sees and interfaces.

Slides:



Advertisements
Similar presentations
Chapter 8: Designing Classes
Advertisements

Based on Java Software Development, 5th Ed. By Lewis &Loftus
Interactive Reporting v3.2. Multiple Order By Option Set multiple order by options.
Family Game Night Get on Board! designed by: Margaret Shandorf Federal and State Programs.
Tic Tac Toe Prototype Following is a prototype of a Tic Tac Toe program. The main goal of the program is to provide quick and simple entertainment. It.
靜宜大學資管系 楊子青 1 Programming Your App’s Memory 靜宜大學資管系 楊子青
Playing Tic Tac Toe with Neural Networks Justin Herbrand CS/ECE/ME 539.
Tic Tac Toe Game Design Using OOP
1 Project 6: Tic Tac Toe. 2 Tic Tac Toe A Challange Project 10 Points extra credit on final grade OK to work in groups of 2 or 3.
PLANNING THE TIC TAC TOE GAME BY NEEL DAVE. TIC TAC TOE INSTRUCTIONS Tic Tac Toe Instructions The basic concept of Tic Tac Toe 1.This is a game for two.
Tic Tac Toe Architecture CSE 5290 – Artificial Intelligence 06/13/2011 Christopher Hepler.
Conditionals Lab Dan Maselko. Overview  Gain familiarity with working with conditionals  Become familiar with using the modulus operator  Understand.
Integer Tic Tac Toe Let’s Begin Rules: 1.Erase all x’s and o’s from the previous game before you begin. 2.Decide which player will be x’s and which will.
Representing a Game Board In a game, we represent the action taking place using an array – In a very simple game, we use individual variables to represent.
Lesson 2-2 Example Solve. Tic Tac Toe Katrina and her friend played Tic Tac Toe. The outcomes of the games are shown in the line plot. Did Katrina.
Graphical User Interface (GUI) Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
Graphical User Interface (GUI) Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
CSE 115 Week 12 March 31 – April 4, Announcements March 31 – Exam 8 March 31 – Exam 8 April 6 – Last day to turn in Lab 7 for a max grade of 100%,
Object-Oriented Analysis and Design
Android Apps: Building Blocks Module 6, Intro to I.T., Fall 2011 Sam Scott.
Lecture 7: Objects and Interaction 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271 
Week 4-5 Java Programming. Loops What is a loop? Loop is code that repeats itself a certain number of times There are two types of loops: For loop Used.
Android Apps: Look and Feel Module 6, Intro to I.T., Fall 2011 Sam Scott.
Navigating database with windows forms.. Tiered applications  Provide a means to develop many presentations of the same app  Makes changes to the back.
Mason Vail.  A data type definition – “blueprint for objects”  Includes properties and/or methods ◦ “instance” data / methods – specific to one object.
Software Design 4.1 Tell, Don't Ask l Tell objects what you want them to do, do not ask questions about state, make a decision, then tell them what to.
 How are you going to collaborate?  How are you going to divide up work?  How are you going to make sure that changes work with other people’s code?
Computer Science 111 Fundamentals of Programming I Model/View/Controller and Data model design.
Question of the Day  On a game show you’re given the choice of three doors: Behind one door is a car; behind the others, goats. After you pick a door,
1 Project 3: Chomp (Not graded). 2 Project 3 The game of Chomp was described in a Math Trek column in Science News:
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 20 Graphical User Interface (GUI)
Windows Forms Navigating database with windows forms.
Tic Tac Toe Game ©Judy Martin 2013, Clip Art of the Tortoise and the Hare © 2013 LL Martin.
Model View Controller (MVC) Bigger than a Pattern: It’s an Architecture Rick Mercer with help from many of others 1.
ReNeW Reference Net Workshop Presenter Yao Sun. The ReNeW Features  High-level Petri Nets (Support Predicate)  Place/Transition Nets  Petri Nets with.
Views of Data Data – nouns of programming world the objects that are manipulated information that is processed Humans like to group information Classes,
Solving Inequalities. C + 3 < 12 Guess a reasonable solution and write your guess.
CS 151: Object-Oriented Design October 15 Class Meeting Department of Computer Science San Jose State University Fall 2013 Instructor: Ron Mak
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 12 Object-Oriented Programming Starting Out with Games & Graphics.
AP Computer Science A – Healdsburg High School 1 Unit 9 - Why Use Classes - Anatomy of a Class.
1 University of Utah – School of Computing Computer Science Writing Tic Tac Toe H. James de St. Germain University of Utah.
Week101 APCS-AB: Java Miscellaneous Topics: Snippets we missed in Chapters 1-6 of book November 11, 2005.
Chapter 1 Revealed Distributed Objects Design Concepts CSLA.
Chapter More on Classes Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg.
Model View Controller (MVC) an architecture Rick Mercer with help from many of others 1.
Tic tac toe XX PC: X YOU: O The PC-player with mark X goes first. After the PC, you place the mark O at the position of a green circle. If you succeed.
Lecture Model View Controller s/w architecture AND general tips on structuring classes.
Calculator Program Explained by Arafa Hamed. First Designing The Interface Ask yourself how many places are there that will be used to input numbers?
M1G Introduction to Programming 2 2. Creating Classes: Game and Player.
Programming Paradigms, Software Architectural Patterns, and MVC CS 378 – Mobile Computing for iOS Dr. William C. Bulko.
Java FX: Scene Builder.
Catapult Python Programming Session 4
A fun reading Comprehension Game
Next Level Tic-Tac-Toe
O X X O O X X O X O X O O X O X O X Tic Tac Toe Graphical
Tic Tac Toe O O X X ? X O X O © Math by Morrison 2011.
Tic – Tac – Toe ! Choose a square by clicking on “box #”
Creation of an Android App By Keith Lynn
Chapter 3: Coding the GUI Programmatically, Layout Managers
DIVIDING FRACTIONS TIC-TAC-TOE
Tic – Tac – Toe ! Choose a square by clicking on “box #”
Web Application Architectures
Tic – Tac – Toe ! Choose a square by clicking on “box #”
Web Application Architectures
Tic – Tac – Toe ! Choose a square by clicking on “box #”
Tic – Tac – Toe ! Choose a square by clicking on “box #”
Information Hiding and Encapsulation Section 4.2
Web Application Architectures
Tic-Tac-Toe Game Engine
4d – Program Design Lingma Acheson CSCI N331 VB .NET Programming
Presentation transcript:

Model View Controller Development architecture

MVC Model: the classes encapsulating the functionality of your app View: what the user sees and interfaces with Controller: middleman between view and model

MVC  Model does not talk to the View directly When the View changes (via an event from the user for example), the Controller can update the Model When the Model changes (via some computation, for example), the Controller can refresh the View

MVC – Why? Separate User Interface and functionality Clean design Easier to modify your project Easier to work as a group or team Easier to separate the expertise of people (coding, graphics,..)

MVC – Tic Tac Toe X XO O

What will be in the View? 9 buttons that the user will interact with Other things (labels) to tell the user what is going on (anybody won? ) and give some feedback (cannot play here,..)

MVC – Tic Tac Toe What will be in the Model? i.e. how can we represent the Tic Tac Toe game in a class? Natural instance variable = 2-dim array of 3 rows and 3 columns Whose turn is it to play?

MVC – Tic Tac Toe What else will be in the Model? i.e. how can we represent playing Tic Tac Toe in a class? Functions to play, enforce the rules, update the 2-dim array, determine whose turn is it to play, if the game is over, if somebody won,..

MVC – Tip calculator TipCalculator class Instance variables, init method, accessors, mutators, methods to calculate tip, tip per guest, total bill,..