MVC Controllers https://flic.kr/p/4MRZPn. TestsMigrations Ye Olde Internet Model DB Server Router View Browser Today’s focus Controller.

Slides:



Advertisements
Similar presentations
Let's say we want to access domain - reliablescribe.com First we need to buy a computer We need to subscribe to an Internet Service Provider (ISP) The.
Advertisements

Lecture 6/2/12. Forms and PHP The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input When dealing with HTML forms.
Reference and Instruction Automated Statistics Gathering and Reporting System Members: Patrick Chen (pyc7) Soo-Yung Cho (sc444) Gregg Herlacher (gah24)
INTRODUCTION The Group WEB BROWSER FOR RELATION Goals.
Multiple Tiers in Action
Apache Tomcat Server Typical html Request/Response cycle
06 | Implementing Web APIs Jon Galloway | Tech Evangelist Christopher Harrison | Head Geek.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Databases and the Internet. Lecture Objectives Databases and the Internet Characteristics and Benefits of Internet Server-Side vs. Client-Side Special.
Server-side Scripting Powering the webs favourite services.
Web application architecture
Web Page Design I Basic Computer Terms “How the Internet & the World Wide Web (www) Works”
CPT 123 [299] Internet Skills Overview of the Internet Session One Class Notes DMWilliamson 1998.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Create, Update and Delete Carol Wolf Computer Science.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
Ruby on Rails Controller of MVC. Routes How we map URIs like /tweets/1 to calling the show method of the Controller.
ASSIGNMENT 2 Salim Malakouti. Ticketing Website  User submits tickets  Admins answer tickets or take appropriate actions.
How Web Database Architectures Work CPS181s April 8, 2003.
Routes Carol Wolf Computer Science. RESTful Architecture  Rails uses REST-style architecture: representation state transfer  resources :courses in routes.rb.
Jim Fawcett CSE686 – Internet Programming Summer 2010
Jim Fawcett CSE686 – Internet Programming Spring 2014
Databases and the MVC Model
An introduction to ASP.Net with MVC Nischal S
How HTTP Works Made by Manish Kushwaha.
Section 6.3 Server-side Scripting
HTTP AND ABSTRACTION ON THE INTERNET
WWU Hackathon May 6 & 7.
Jim Fawcett CSE686 – Internet Programming Spring 2012
Using E-Business Suite Attachments
JavaScript and Ajax (Internet Background)
MVC Architecture, Symfony Framework for PHP Web Apps
Section 13 - Integrating with Third Party Tools
1993 version of Mosaic browser.
Data Virtualization Tutorial… CORS and CIS
CNIT 131 Internet Basics & Beginning HTML
Play Framework: Introduction
Server sends index-HTML-Code Enter in Browser (localhost/name) Local Server Browser Requests Data Server sends index-HTML-Code.
CASE STUDY -HTML,URLs,HTTP
Networks Problem Set 1 Due Oct 3 Bonus Date Oct 2
Design Patterns: Model View Controller
CMPE 280 Web UI Design and Development October 24 Class Meeting
PHP / MySQL Introduction
Build Better Apps with MEAN.
Web Browser server client 3-Tier Architecture Apache web server PHP
REST.
Web Systems Development (CSC-215)
Servlet APIs Every servlet must implement javax.servlet.Servlet interface Most servlets implement the interface by extending one of these classes javax.servlet.GenericServlet.
Objectives In this lesson you will learn about: Need for servlets
Hyper Text Transfer Protocol
Lecture 5: Functions and Parameters
PIE Planning & Resources
Databases and the MVC Model
Databases and the MVC Model
Cancel a room booking No No No Next page Yes Yes Yes No Yes Next page
Back end Development CS Programming Languages for Web Applications
MVC Controllers.
MVC Controllers.
Security: Authentication & Authorization
Databases and the MVC Model
Chengyu Sun California State University, Los Angeles
MVC Controllers.
Databases and the MVC Model
Ajax and JSON Jeremy Shafer Department of MIS Fox School of Business
WJEC GCSE Computer Science
Client-Server Model: Requesting a Web Page
Information Retrieval and Web Design
Your computer is the client
Back end Development CS Programming Languages for Web Applications
Chengyu Sun California State University, Los Angeles
Presentation transcript:

MVC Controllers

TestsMigrations Ye Olde Internet Model DB Server Router View Browser Today’s focus Controller

5 Basic Controller Patterns Create – new/create: Enter a new record Read – index: List all records – show: Display a particular record Update – edit/update: Modify an existing record Delete – destroy: Remove a record

5 Basic Controller Patterns Create – new/create: Enter a new record Read – index: List all records – show: Display a particular record Update – edit/update: Modify an existing record Delete – destroy: Remove a record

index Page

Ye Olde Internet Model DB Server Router View Browser How to implement index? Controller

Ye Olde Internet Model DB Server Router View Browser How to implement index? Controller 1.Route “index” URL pattern 2.Controller uses Model to retrieve records 3.Controller uses View to generate HTML (passes records to View) Demo Time!

5 Basic Controller Patterns Create – new/create: Enter a new record Read – index: List all records – show: Display a particular record Update – edit/update: Modify an existing record Delete – destroy: Remove a record ✔

new Form

Ye Olde Internet Model DB Server Router View Browser How many HTTP requests does it take to create a record? Controller

Ye Olde Internet Model DB Server Router View Browser How many HTTP requests does it take to create a record? Controller Two: One to request a form (GET) One to perform the add (POST)

Ye Olde Internet Model DB Server Router View Browser How to implement get form? Controller

Ye Olde Internet Model DB Server Router View Browser How to implement get form? Controller 1.Route URL pattern 2.Controller uses View to generate HTML (passes View records) 1 2

Ye Olde Internet Model DB Server Router View Browser How to implement post new record? Controller

Ye Olde Internet Model DB Server Router View Browser How to implement post new record? Controller 1.Route URL pattern 2.Controller uses Model to add rec 3.Controller sends HTTP redirect Demo Time!

5 Basic Controller Patterns Create – new/create: Enter a new record Read – index: List all records – show: Display a particular record Update – edit/update: Modify an existing record Delete – destroy: Remove a record ✔ ✔ Demo Time! Like index Like create Needs explaining…

Appendix

TestsMigrations Ye Olde Internet Model DB Server Router View Browser Controller