CS 4720 Model-View-Controller CS 4720 – Web & Mobile Systems.

Slides:



Advertisements
Similar presentations
CS 4720 RESTfulness CS 4720 – Web & Mobile Systems.
Advertisements

INTRODUCTION TO ASP.NET MVC AND EXAMPLE WALKTHROUGH RAJAT ARYA EFECS - OIM DAWG – 4/21/2009 ASP.NET MVC.
Ruby on Rails Model of MVC. Model-View-Controller Paradigm A way of organizing a software system Benefits: Isolation of business logic from the user interface.
1 The Database Application Development Process The Database Application Development Process.
Objectives In this session, you will learn to:
Technical Architectures
ASP MVC s/mvc-4/getting-started-with- aspnet-mvc4/intro-to-aspnet- mvc-4.
J4www/jea Week 3 Version Slide edits: nas1 Format of lecture: Assignment context: CRUD - “update details” JSP models.
Multiple Tiers in Action
The Architecture of Transaction Processing Systems
Software Architecture Patterns (2). what is architecture? (recap) o an overall blueprint/model describing the structures and properties of a "system"
1 Classification: Genpact Internal.  Tool From Oracle  Works with Oracle Database  PL/SQL Based  Widely Used with Oracle Applications  Can be Used.
Object-Oriented Analysis and Design
The Client/Server Database Environment
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
Chapter 2 Database System Concepts and Architecture
Introduction to Databases Transparencies 1. ©Pearson Education 2009 Objectives Common uses of database systems. Meaning of the term database. Meaning.
UNIT-V The MVC architecture and Struts Framework.
Client/Server Architectures
Web server and web browser It’s a take and give policy in between client and server through HTTP(Hyper Text Transport Protocol) Server takes a request.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse 2.
IT 210 The Internet & World Wide Web introduction.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
What is Architecture  Architecture is a subjective thing, a shared understanding of a system’s design by the expert developers on a project  In the.
2013Dr. Ali Rodan 1 Handout 1 Fundamentals of the Internet.
Model View Controller (MVC) Rick Mercer with a wide variety of others 1.
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
ASP.NET and Model View Control Jesper Tørresø ITNET2 F08.
COMP 410 & Sky.NET May 2 nd, What is COMP 410? Forming an independent company The customer The planning Learning teamwork.
Design Patterns Phil Smith 28 th November Design Patterns There are many ways to produce content via Servlets and JSPs Understanding the good, the.
2. Database System Concepts and Architecture
Lecture 19 Web Application Frameworks Boriana Koleva Room: C54
1 Dr Alexiei Dingli Web Science Stream Introducing Rails.
Introduction  Client/Server technology is seen by many as the solution to the difficulty of linking together the various departments of corporation.
MySQL and PHP Internet and WWW. Computer Basics A Single Computer.
Pemrograman Web MVC Programming and Design Pattern in PHP 5.
1 Welcome to CSC 301 Web Programming Charles Frank.
Intro – Part 2 Introduction to Database Management: Ch 1 & 2.
Architectural Patterns Support Lecture. Software Architecture l Architecture is OVERLOADED System architecture Application architecture l Architecture.
Chapter 2 Database System Concepts and Architecture Dr. Bernard Chen Ph.D. University of Central Arkansas.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
1 Web Servers (Chapter 21 – Pages( ) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3 System Architecture.
Sakai WebApp Structure
Web Server.
Chapter 4 Basic Object-Oriented Concepts. Chapter 4 Objectives Class vs. Object Attributes of a class Object relationships Class Methods (Operations)
Data Communications and Networks Chapter 9 – Distributed Systems ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
Chapter 1 Revealed Distributed Objects Design Concepts CSLA.
The basics of knowing the difference CLIENT VS. SERVER.
Chapter 9 Web Application Design. Objectives Describe the MVC design pattern as used with Web applications Explain the role and responsibilities of each.
Lecture Model View Controller s/w architecture AND general tips on structuring classes.
Rails and routing INFO 2310: Topics in Web Design and Programming.
2) Database System Concepts and Architecture. Slide 2- 2 Outline Data Models and Their Categories Schemas, Instances, and States Three-Schema Architecture.
Ruby on Rails. Web Framework for Ruby Designed to make it easier to develop, deploy, and maintain web applications Design with Model-View-Controller –almost.
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
Presented by Alexey Vedishchev Developing Web-applications with Grails framework American University of Nigeria, 2016 Intro To MVC Architecture.
Model In MVC Mo Rezai.
Organize your code with MVC
Chapter 2 Database System Concepts and Architecture
Mobile Device Architecture
MVC Architecture, Symfony Framework for PHP Web Apps
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
Model View Controller
Content Management System
Design Patterns: Model View Controller
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
Sakai WebApp Structure
CS222 Web Programming Course Outline
MVC Framework, in general.
Organize your code with MVC
The Model Layer What is Model?
Presentation transcript:

CS 4720 Model-View-Controller CS 4720 – Web & Mobile Systems

CS 4720 Abstractions and Tiers Every system we seem to build we talk about tiers How do we reason about the architecture of a system? How can we communicate how the pieces fit together? 2

CS 4720 A Two-Tier System 3

CS 4720 A Two-Tier System? 4

CS 4720 Describing the World We generally refer to client/server systems as “two-tier systems” Why? What does that communicate? 5

CS 4720 A Three-Tier System How might a three-tier system be different than a two tier? Do we add a server? Do we add a client? What does it mean to have three tiers? 6

CS 4720 Context Clues It’s all in what you’re talking about. If you’re discussion the overall system, including the client, a common view of a three-tier architecture might be this: 7

CS 4720 Context Switch What if we are talking about just inside our application? We assume that the client is there, but it is somewhat immaterial How do we define the layers now? 8

CS 4720 Three-Tier Architecture 9

CS 4720 Three-Tier Architecture We will see this architecture pattern over and over again in this class –Web development –Web services –Android (basically all mobile…) Here we are discussing it in the context of a RESTful web architecture 10

CS 4720 Principles of REST Remember this one? –3. Addressable Resources –Everything has its place and every place has a thing –“Everything is a resource” This is actually key to how we go about building a three-tier web application 11

CS 4720 RESTful Tiers If every resource is a place, and every place is a resource, how do we define our resources? We know the URL would look something like: – Where: –mysite.com is the domain –users is the “category of resources” –mss2x is a specific instance of the resource 12

CS 4720 RESTful Tiers What we want the web server / web application to do is translate this: – Into effectively a function call that –Identifies what the user is asking for –Loads a particular resource –Displays the pertinent info about that resource back to the user 13

CS 4720 Model-View-Controller This is the definition of what MVC is The MVC pattern maps: –Identifies what the user is asking for –Loads a particular resource –Displays the pertinent info about that resource back to the user To Model, Controller, View (in that order) 14

CS 4720 MVC 15

CS 4720 MVC 16

CS 4720 Controller The role of the controller is basically traffic cop It takes the request from the user and (with the assistance of the server and routing rules) turns it into a method call of sorts It finds the appropriate model to load It finds the appropriate view to load It returns the whole thing back to the user 17

CS 4720 Model The model is the representation of the data This may or may not be directly linked to a database (but often is in larger apps) A model is often translated directly into a DB table, with the columns as its attributes Think “class definition w/ DB backend” Often contains relationship rules (a Student has many Classes, for instance) 18

CS 4720 View The closest thing to what you’ve been dealing with so far is the view It’s effectively an HTML template that will be populated with the appropriate data from the loaded model It often has PHP (or whatever) embedded in it All UI components go here 19

CS 4720 Putting it all Together So, if you were building a blog, what might some of the models be? What are the resources that should have addresses to them? How do they relate to each other? 20

CS REST and MVC REST and MVC aren’t directly related, but they intersect in many, many ways The idea of “nouns” in the system – of addressable resources – is a major component of both In general, a good MVC system will be RESTful, although a RESTful system does not have to follow MVC.

CS 4720 Example Code What do some of these things look like? 22