M-V-C for web applications. Model for Web Applications model consists of data and system state database tables –persistent data session information –current.

Slides:



Advertisements
Similar presentations
3rd Annual Plex/2E Worldwide Users Conference Page based on Title Slide from Slide Layout palette. Design is cacorp Title text for Title or Divider.
Advertisements

Designing Web Applications. client server architectures design patterns model 2 web applications.
The Document Object Model
M-V-C for web applications. Model for Web Applications model consists of data and system state database tables –persistent data session information –current.
JavaScript and the DOM Les Carr COMP3001 Les Carr COMP3001.
Building Applications using ASP.NET and C# / Session 1 / 1 of 21 Session 1.
1 Chapter 12 Working With Access 2000 on the Internet.
15 Chapter 15 Web Database Development Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
Multiple Tiers in Action
Introduction to Web Based Application. Web-based application TCP/IP (HTTP) protocol Using WWW technology & software Distributed environment.
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
Session-01. Layers Struts 2 Framework The struts 2 framework is used to develop MVC-based web application. Struts 1.0 was released in June The.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
ITM352 Javascript and Dynamic Web Pages: Client Side Processing.
UNIT-V The MVC architecture and Struts Framework.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 13 Slide 1 Application architectures.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
Internet Applications Spring Review Last week –PHP/JavaScript – Form –Questions?
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
May 16 – 18, 2007 Copyright 2007, Data Access Worldwide May 16 – 18, 2007 Copyright 2007, Data Access Worldwide Build Great Web Application 'Fast and Easy'
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Introduction to Internet Programming (Web Based Application)
Lecture 11 – DOM Scripting SFDV3011 – Advanced Web Development Reference: 1.
Lecture 19 Web Application Frameworks Boriana Koleva Room: C54
 2004 Prentice Hall, Inc. All rights reserved. 1 Chapter 34 - Case Study: Active Server Pages and XML Outline 34.1 Introduction 34.2 Setup and Message.
Client side web programming Introduction Jaana Holvikivi, DSc. School of ICT.
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
School of Computing and Information Systems CS 371 Web Application Programming PHP – Forms, Cookies, Sessions and Database.
Implementation - Part 2 CPS 181s March 18, Pieces of the Site-building Puzzle Page 180, figure 4.1.
Mainframe (Host) - Communications - User Interface - Business Logic - DBMS - Operating System - Storage (DB Files) Terminal (Display/Keyboard) Terminal.
Introduction to ASP.NET1. 2 Web applications in general Web applications are divided into two parts –The server part –The client part The server part.
Navigation Framework using CF Architecture for a Client-Server Application using the open standards of the web Kedar Desai presented by.
Overview Web Session 3 Matakuliah: Web Database Tahun: 2008.
IT WEB TECHNOLOGY Prepared by, K.ABINAYA Lect/IT.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
WHAT IS SERVER SIDE SCRIPTING? Server-side scripting is a web server technology in which a user's request is verified by running a script directly on the.
14 1 Chapter 14 Web Database Development Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
The basics of knowing the difference CLIENT VS. SERVER.
AJAX and REST. Slide 2 What is AJAX? It’s an acronym for Asynchronous JavaScript and XML Although requests need not be asynchronous It’s not really a.
Navigation Framework using CF Architecture for a Client-Server Application using the open standards of the Web presented by Kedar Desai Differential Technologies,
Database application development 1. Chapter 8 © 2013 Pearson Education, Inc. Publishing as Prentice Hall OBJECTIVES  Define terms  Explain three components.
1 LM 6 Database Applications Dr. Lei Li. Learning Objectives Explain three components of a client-server system Describe differences between a 2-tiered.
Apache Cocoon – XML Publishing Framework 데이터베이스 연구실 박사 1 학기 이 세영.
THE DOM.
DHTML.
Web Technologies Computing Science Thompson Rivers University
Introduction and Principles
AJAX and REST.
GeneXus 9.0: Web applications at their higher power
Creating Novell Portal Services Gadgets: An Architectural Overview
IS 360 Course Introduction
Distributed System Using Java 2 Enterprise Edition (J2EE)
Lecture 1: Multi-tier Architecture Overview
Web Application Architectures
ASP.NET Module Subtitle.
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Web Application Architectures
Database Connectivity and Web Development
Web Technologies Computing Science Thompson Rivers University
Web Servers (IIS and Apache)
Web Application Development Using PHP
Presentation transcript:

M-V-C for web applications

Model for Web Applications model consists of data and system state database tables –persistent data session information –current system state data business logic (eCommerce) –rules governing the transaction

View for web applications view gives a presentation of the model client-side presentation in a browser window –(D)HTML –CSS stylesheets –server-side templates administrative information –server output logs

Controller for web applications controller handles events user-generated events –client-side scripting –http request processing –redirection –preprocessing system maintenance –web application management

M-V-C Example PHP /CGI Web Server Web Browser presentationrequest processingprogram logic controllerviewmodel two-tier client-server architecture

M-V-C Example JSP /ASP /CF Web Server Web Browser entity database view controller view/ controller model multi-tier client server architecture

development of absence monitoring web app model data –student ids and names –number of absences model API –list names –list names and absences –update absences implement as a relational database

development of absence monitoring web app views –attendance register –list of absences –add a student –delete a student implemented in a browser –DHTML interface –pages dynamically generated from model

development of absence monitoring web app controller –handle requests for views generate correct page from the database –update the model translate user action into a database update –update the views refresh browser when view changes

build the model design data structure implement tables create SQL queries –support all required functionality test queries against sample data –this is a simple view

build the view develop server side scripts to query the database –SQL already tested is the model API design web pages and embed the scripts –view now updates from the model

build the controller add client side scripts –JavaScript –HMTL forms –input validation add navigation functionality –frames –layers update confirmation pages

web application frameworks

technologies designed to implement web apps in M-V-C –model 2 architecture provide standard re-useable components for model, view and controller greatly ease the design of large sophisticated web apps significant learning curve

web application frameworks typically xml configuration files glue components into an application implement standard web concepts –interface features (forms) –request and response objects –sessions –database interactions many frameworks exist

web application frameworks Many frameworks are being developed… –JavaServer Faces, Struts, Webwork2 –WebObjects (.NET specific) –Model Glue (ColdFusion specific) –Velocity, Fusebox, Mach II, Maypole, Catalyst, Tapestry, ZNF, Phrame, Cocoon, Ruby on Rails, … Most, but not all, are based around M-V-C

Laboratory Five

var element = theData.documentElement; DOMVisualiser

document.writeln (element.nodeName); fellowship DOMVisualiser

currentNode = element.childNodes.item (i); document.write (currentNode.nodeName); item (i) nodeName member DOMVisualiser

theMembers = theData.getElementsByTagName ("member"); theNine NodeList consisting of all member elements

if (m.getAttribute ("age") > 100) { bgcolour = "black"; colour = "white";} document.write ( + m.getAttribute('name') + ); theNine

XMLEditor fellowship2.xml fellowTable.xsl Internet Explorer XML Editor page results page MSDOM Document Object MSDOM Transform Object displayMember()

function deleteMember () theName = document.controls.gonner.value; XMLEditor theMembera = theData.getElementsByTagName(memebr"); NodeList consisting of all member elements

function deleteMember () element = m.parentNode; element.removeChild (m); XMLEditor remove element with matching name from its parent

function addMember () theName = theData.createAttribute ("name"); new name attribute node with value obtained from the form theName.value = document.controls.name.value; XMLEditor

function addMember () newMember = theData.createElement ("member"); newMember.setAttributeNode(theName); new member node created and name attribute attached XMLEditor

function addMember () element.item (0).appendChild (newMember); element = theData.getElementsByTagName("fellowship"); fellowship node located and new member node attached XMLEditor