COSC405 Web Application Engineering II Slides adopted from here

Slides:



Advertisements
Similar presentations
Other Web Application Development Technologies. PHP.
Advertisements

A Toolbox for Blackboard Tim Roberts
Adding Dynamic Content to your Web Site
IS 360 Course Introduction. Slide 2 What you will Learn (1) The role of Web servers and clients How to create HTML, XHTML, and HTML 5 pages suitable for.
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Web Page Behavior IS 373—Web Standards Todd Will.
Dynamic Web Pages Bert Wachsmuth. Review  Internet, IP addresses, ports, client-server, http, smtp  HTML, XHTML, XML  Style Sheets, external, internal,
Website Development with PHP and MySQL Introduction.
Russell Taylor Lecturer in Computing & Business Studies.
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Mgt 240 Lecture Website Construction: Software and Language Alternatives March 29, 2005.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Overview of JSP Technology. The need of JSP With servlets, it is easy to – Read form data – Read HTTP request headers – Set HTTP status codes and response.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Computer Concepts 2014 Chapter 7 The Web and .
JavaScript & jQuery the missing manual Chapter 11
Languages in WEB Presented by: Jenisha Kshatriya BCM SS09.
Website Design Lecture 1. Outline Introduction to the module Outline of the Assessment Schedule Lecture Static XHTML, client side and server side Why.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
Scripting Languages Client Side and Server Side. Examples of client side/server side Examples of client-side side include: JavaScript Jquery (uses a JavaScript.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
1) PHP – Personal Home Page Scripting Language 2) JavaScript.
Unit 1 – Web Concepts Instructor: Brent Presley.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 2: Introduction to IS2803 Rob Gleasure
Introduction to JavaScript MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/2/2016.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
Web Services Essentials. What is a web service? web service: software functionality that can be invoked through the internet using common protocols like.
 Project Team: Suzana Vaserman David Fleish Moran Zafir Tzvika Stein  Academic adviser: Dr. Mayer Goldberg  Technical adviser: Mr. Guy Wiener.
G046 – Lecture 2A Recognising Web-Technologies Mr C Johnston ICT Teacher
National College of Science & Information Technology.
Introduction to JavaScript MIS 3502, Fall 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 9/29/2016.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Web Programming Language
Scripting - Client-side vs. Server-side Scripting
Group 18: Chris Hood Brett Poche
Introduction to Dynamic Web Programming
WWW and HTTP King Fahd University of Petroleum & Minerals
Introduction and Principles
Lecture 11. Web Standards Continued
Web Software Model CS 4640 Programming Languages for Web Applications
Introduction to Programming the WWW I
Application with Cross-Platform GUI
AJAX.
PHP / MySQL Introduction
Intro to PHP & Variables
Database Driven Websites
Introduction to JavaScript
IS 360 Course Introduction
A second look at JavaScript
Web Development Using ASP .NET
Chapter 27 WWW and HTTP.
Module 1 Introduction to PHP 11/30/2018 CS346 PHP.
Lecture 1: Multi-tier Architecture Overview
Objective Understand web-based digital media production methods, software, and hardware. Course Weight : 10%
JavaScript.
IntroductionToPHP Static vs. Dynamic websites
Intro to PHP.
Introduction to JavaScript
An Introduction to JavaScript
BOF #1 – Fundamentals of the Web
PHP: Hypertext Preprocessor
Lecture 6: Processing Forms with PHP
Web Application Development Using PHP
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

COSC405 Web Application Engineering II Slides adopted from here

These notes are intended for use by students in CS1520 at the University of Pittsburgh and no one else These notes are provided free of charge and may not be sold in any shape or form These notes are NOT a substitute for material covered during course lectures. If you miss a lecture, you should definitely obtain both these notes and notes written by a student who attended the lecture. Material from these notes is obtained from various sources, including, but not limited to, the following: Programming the World Wide Web, various editions, by Robert W. Sebesta Online documentation at: http://www.php.net and in particular the PHP Manual at http://www.php.net/manual/en/ PHP and MySQL Web Development, by Luke Welling and Laura Thomson (Developer's Library) The Web Wizard's Guide to PHP by David A. Lash (AW)

Goals of the Course To understand and be able to program web servers and web clients to accomplish useful tasks Web servers are ubiquitous and many / most organizations now have elaborate / interactive web sites These web sites require programming on the server side Scripts that execute on the server and return resulting documents to the client For server-side scripts we will primarily utilize the PHP language

These web sites require programming on the client side Goals of the Course These web sites require programming on the client side Scripts that execute locally on a user’s machine via the web browser For client-side scripts we will primarily utilize the Javascript language We will also utilize JQuery, a library of Javascript functions that simplifies much of the client-side programming We may also look at an API, such as Google Maps that can be integrated into our sites

This leads to some more specific goals… Goals of the Course These web sites often require interaction between web servers and web clients More and more sites contain resident client code which accesses the server asynchronously and dynamically updates the client page We will utilize DOM and AJAX for this interaction Document Object Model Asynchronous Javascript And XML This leads to some more specific goals…

To learn and utilize the PHP language, and its applications Goals of Course To learn and utilize the PHP language, and its applications PHP syntax, constructs and basic language features Using PHP for server-side embedded scripts Writing and processing HTML forms with PHP Access and utilizing system state variables Maintaining individual states via cookies and sessions Regular expression handling in PHP Object-oriented features of PHP

Using PHP for Web database access Goals of Course Using PHP for Web database access With a MySQL database We will cover the very basics of using MySQL and DB development as well Simple database setup and querying We will leave more interesting DB issues to the CS 1555 course Simple authentication and authorization

Goals of Course To learn and utilize the Javascript language in conjunction with html files Learning the basics of the language Quickly Using Javascript in conjunction with DOM to add dynamic content to web pages Ex: Doing client-side processing of forms Checking form input, dynamic formatting, etc. Using AJAX techniques to make web apps more like stand-alone applications Updating a web page without requiring a full refresh

To learn and utilize the JQuery library Goals of Course To learn and utilize the JQuery library Many client-side actions can be simplified greatly utilizing JQuery rather than straight Javascript To learn and utilize XML and how it can be used in Web applications Basic idea / syntax of XML Parsing / formatting XML documents Validating XML documents

Goals of Course If time permits… To look at an API such as Google Maps and how it can be integrated into our sites To examine mobile web apps and how they differ from traditional web apps Content and formatting differences To learn the basics of the Perl language Writing stand alone Perl programs Using Perl and its features for Web applications

Goals of Course Number of programmers coding in given language over time (Reference: www.ohloh.net) Web Client Native Web Server Web

Lecture 1: Getting Started What is assumed of you: You should be familiar with Java and have used it in CS0401/445 You are expected to know object-oriented programming and basic event-driven programming You are expected to know the basics of html What is not assumed of you: Detailed knowledge / experience with any of the languages we will be using

Lecture 1: Intro. to Web Servers How do Web Servers work? Client specifies document at a specific web address that is desired (specified by a URL) Ex: http://www.cs.pitt.edu/ If the document is HTML or text, the server simply forwards it back to the client If it is text, it is shown unaltered in the browser If it is HTML it is rendered in the client's browser HTML tags are interpreted and result is shown to the user For info on HTML and XHTML, read Ch. 2 in the Sebesta text

Lecture 1: Intro. to Web Servers However, the requested document may be an executable script, or it may be HTML with an embedded script The script could be written in any of many different web scripting languages In these cases, the server executes the script If the entire document was a script, the server simply sends the output back to the client If the document had an embedded script, the script sections are replaced with the output and the modified document is then sent to the client

Lecture 1: Intro. to Web Servers Note that the client never sees the server-side script code This is important – typically client should not see logic / code that the server executes to process requests The server may be accessing files whose names should not be seen, or preprocessing data that it does not want the client to see See ex1.txt See ex1.html See ex1.php

Lecture 1: CS 1520 Web Servers In order to be useful, web servers need access to the directories from which they serve and process files Minimally the server must have read access, but in many cases, write access is also needed and/or useful In case server creates / modifies files Ex: User submits a file Ex: Various user data is stored / updated in a file This leads to an issue for a course like CS 1520:

Lecture 1: CS 1520 Web Servers How do we give the server access to students’ individual directories in isolation? For student X the server should have read/write access to X’s directory However, when executing a script in X’s directory, the server should not be able to access files in the directory of some other student, Y Discuss There are ways of doing this but they are not simple We may utilize this later in the term For now we are eliminating this issue entirely

Lecture 1: CS 1520 Web Servers Rather than using a shared Web server, you will each use your own server The server you will use is XAMPP This is a full-featured Apache / MySQL / PHP / Perl development environment It can be installed on a laptop If you have one It can be installed on a flash drive Makes it very portable See: https://www.apachefriends.org/index.html

Lecture 1: CS 1520 Web Servers You will develop your projects on your own servers, and then run them for your TA via a demonstration You will need to bring either your laptop or your flash drive (with the server on it) to the demonstration Assignment: Your first in-class exercise (next week Thursday) will be to run a simple script on your own XAMPP server You have from now until then to get it installed on either your laptop or on a flash drive

Lecture 1: CS 1520 Web Servers If you are putting it on your laptop the installation is fairly straightforward If you are putting it on a flash drive, you don’t actually “install” it – just download the .zip file, unzip it and run a .bat script See documentation for where to put your scripts so that they will run If you have any trouble with this, see your TA or me before next Wednesday!

HTML is a mark-up language Lecture 1: Intro. to HTML HTML is a mark-up language Idea is that extra characters / symbols in the text provide information to a parser, which uses that information to render the document in a certain way Ex: <strong>Hello There</strong> The tags do not appear in the rendered document The parser utilizes them to alter the appearance of the text We will discuss mark-up languages in more detail when we discuss XML later in the term

HTML has evolved greatly over the years Lecture 1: Intro. to HTML HTML has evolved greatly over the years New tags have been added Some obsolete tags have been removed Syntax has been standardized The current version is HTML 5 Still not universally used However, HTML 5 is becoming more and more prominent Most recent browsers mostly support it

Fundamentally, each HTML 5 document has the following shell: Lecture 1: Intro. to HTML Fundamentally, each HTML 5 document has the following shell: <!DOCTYPE html> <html> <head> </head> <body> </body> </html> There are a LOT of other tags / attributes and variations See: http://dev.w3.org/html5/html-author/ There are many other reference links as well We will discuss some of these in more detail later, when we focus on client-side programming

HTML can be generated in several ways: Lecture 1: Intro. to HTML HTML can be generated in several ways: Can by typed in directly, using a text editor Ex: TextWrangler, TextPad, vi Can be generated through software Ex: MS Word, DreamWeaver Can be generated dynamically via scripts Ex: PHP, Perl In this course we will be either typing in HTML directly or generating dynamically via scripts Ex: Using PHP