CSC 2720 Building Web Applications Basic Frameworks for Building Dynamic Web Sites / Web Applications.

Slides:



Advertisements
Similar presentations
PHP Form and File Handling
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.
Introduction to MVC Adding a View Page NTPCUG Tom Perkins, Ph.D.
Computer Monitoring System for EE Faculty By Yaroslav Ross And Denis Zakrevsky Supervisor: Viktor Kulikov.
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
DT228/3 Web Development multi page applications/ sharing data.
What is it? –Large Web sites that support commercial use cannot be written by hand What you’re going to learn –How a Web server and a database can be used.
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
1 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText Transfer Protocol Performance Enhancements.
PHP Scripts HTML Forms Two-tier Software Architecture PHP Tools.
Static VS Dynamic websites. 1-What are the advantages and disadvantages? 2- Which one should you choose and why?
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
PHP Tutorials 02 Olarik Surinta Management Information System Faculty of Informatics.
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
ITD 3194 Web Application Development Chapter 4: Web Programming Language.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
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.
Server-side Scripting Powering the webs favourite services.
About Dynamic Sites (Front End / Back End Implementations) by Janssen & Associates Affordable Website Solutions for Individuals and Small Businesses.
Lecture 7 Interaction. Topics Implementing data flows An internet solution Transactions in MySQL 4-tier systems – business rule/presentation separation.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
Web application project Advertising board web site Created by : Alon Nagar Supervisor:Victor Kulikov.
Lecture 19 Web Application Frameworks Boriana Koleva Room: C54
Standalone Java Application vs. Java Web Application
Security Testing Case Study 360logica Software Testing Services.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
Webcommerce Computer Networks Webcommerce by Linnea Reppa Douglas Martindale Lev Shalevich.
1 Welcome to CSC 301 Web Programming Charles Frank.
Prof Frankl, Spring 2008CS Polytechnic University 1 Overview of Web database applications with PHP.
Module 7: Creating a Microsoft ASP.NET Web Application.
Dynamic web content HTTP and HTML: Berners-Lee’s Basics.
JakeShop A complete application for online commerce by Jake Feasel.
Where does PHP code get executed?. Where does JavaScript get executed?
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
® IBM Software Group © 2007 IBM Corporation Best Practices for Session Management
Web Database Programming Week 7 Session Management & Authentication.
CSC 2720 Building Web Applications Frameworks for Building Web Applications.
Model View Controller MVC Web Software Architecture.
PHP-based Authentication
 Registry itself is easy and straightforward in implementation  The objects of registry are actually complicated to store and manage  Objects of Registry.
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
הרצאה 4. עיבוד של דף אינטרנט דינמי מתוך Murach’s PHP and MySQL by Joel Murach and Ray Harris.  דף אינטרנט דינמי משתנה עפ " י הרצת קוד על השרת, יכול להשתנות.
OOSSE Week 8 JSP models Format of lecture: Assignment context JSP models JSPs calling other JSPs i.e. breaking up work Parameter passing JSPs with Add.
Introduction and Principles Web Server Scripting.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
The basics of knowing the difference CLIENT VS. SERVER.
PHP File Manipulation. File Upload and php.ini ;;;;;;;;;;;;;;; ; File Uploads ; ;;;;;;;;;;;;;;;; ; Whether to allow HTTP file uploads. file_uploads =
1 PHP HTTP After this lecture, you should be able to know: How to create and process web forms with HTML and PHP. How to create and process web forms with.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
NMD202 Web Scripting Week2. Web site
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 3 PHP Advanced.
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
DDM Central Catalogs and Central Database Pedro Salgado.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
CGS 3066: Web Programming and Design Spring 2016 PHP.
National College of Science & Information Technology.
Web Programming Language
Haritha Dasari Josue Balandrano Coronel -
PHP / MySQL Introduction
Database Driven Websites
PHP + Oracle = Data-Driven Websites
Web Systems Development (CSC-215)
Lecture 1: Multi-tier Architecture Overview
ASP.NET Module Subtitle.
Hypertext Preprocessor
Wordpress.
Presentation transcript:

CSC 2720 Building Web Applications Basic Frameworks for Building Dynamic Web Sites / Web Applications

Web Application Framework  A web application framework is a software framework that is designed to support the development of dynamic websites and Web applications.web application framework  Aims  Improve productivity  Promote code reuse  Minimize errors  Reduce cost of maintenance

Input-Process-Output  Input:  Extract form data, cookies, etc. from a HTTP request  Process  Validate data, authenticate user, check access right, etc.  Retrieve data from or update data in the storage layer  Apply business logic  Output  Format the output in HTML and CSS  Write PHP scripts to conditionally or iteratively generate the output

Suggestion: Organizing the contents in a PHP script <?php // Validate input // Process the input // Store the output (including error status // and messages if there is any) in some // designated variables ?> <!-- Contains mainly HTML, CSS, and PHP scripts that deal with presentation logic -->

Suggestion: Organizing the contents in a PHP script  Commonly used codes should be made into functions and placed in separate files (so they can be reused). For examples, codes to  Authenticate a user  Establish a database connection  Retrieve data from a database  Validate the format of an address or a credit card number.  Codes that make up the business logic should also be placed in separate files.

Modular Design Presentation Layer Data Access Layer (PHP Functions to retrieve, store, or update data) Data Storage Layer (Database, Files, etc.) Business LogicCommonly used Functions

Model-1 Architecture page1.php Input Validation + Business Logic Presentation Logic page2.phppageN.php …

Model-1 Architecture  Each PHP page is regarded as the focal point for the entire application.  Each PHP page  Contains code for extracting HTTP request parameters and call the business logic  Contains the presentation logics  Adv: Easy to add/remove pages  Suitable for small/simple application

Model-2 Architecture page1.php Input Validation + Business Logic Presentation Logic page2.phppageN.php … Note: These files can be placed in a folder that cannot be accessed directly via a URL. if ($action == 'p1') { include("page1.php"); exit(); } … controller.php controller.php can pass the necessary data to page1.php via some global variables.

Model-2 Architecture  One PHP script serves as a controller that  Handles requests, setup sessions  Performs authentication, validation  Decides what logic to invoke or which PHP script to handle the business logic  Decides which PHP script to be used to present the output  Adv: One entry point to the web application (easier to enforce access control and perform user authentication)  Suitable for large or complicated application