Internet Applications Spring 2008. Review Last week –PHP/JavaScript –Email Form –Questions?

Slides:



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

Lecture 11 Server Side Interaction
CG0119 Web Database Systems Parsing XML: using SimpleXML & XSLT.
JavaScript and AJAX Jonathan Foss University of Warwick
PHP Hypertext Preprocessor Information Systems 337 Prof. Harry Plantinga.
XML: Managing Data Exchange Stylesheets. Lesson Contents CSS The basic XSL file XSL transforms Templates Sort Numbering Parameters and Variables Datatypes.
1.  Understanding about How to Working with Server Side Scripting using PHP Framework (CodeIgniter) 2.
PHP (2) – Functions, Arrays, Databases, and sessions.
© Anselm SpoerriInfo + Web Tech Course Information Technologies Info + Web Tech Course Anselm Spoerri PhD (MIT) Rutgers University
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
PHP and MySQL PHP for the Web, page PHP and MySQL MySQL Resource PHP – MySQL Resource
Multiple Tiers in Action
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
PHP Scripts HTML Forms Two-tier Software Architecture PHP Tools.
Internet Applications Spring Review Last week –Ajax / APIs –JavaScript overview –RSS reader exercises 1-5 –Questions?
Lecture 3 – Data Storage with XML+AJAX and MySQL+socket.io
4.1 JavaScript Introduction
Institute of New Media Development & Research Prabhat Road, Lane No 5, Opp. Lijit Papad, Above OBC Bank, 1st Floor, Pune Web site :
Introduction to PHP and Server Side Technology. Slide 2 PHP History Created in 1995 PHP 5.0 is the current version It’s been around since 2004.
© Yanbu University College YANBU UNIVERSITY COLLEGE Management Science Department © Yanbu University College Module 6:WEB SERVER AND SERVER SIDE SCRPTING,
Internet Applications Spring Review Last week –MySQL –Questions?
MySQL in PHP – Page 1 of 17CSCI 2910 – Client/Server-Side Programming CSCI 2910 Client/Server-Side Programming Topic: MySQL in PHP Reading: Williams &
Internet and Web Application Development Revision.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
Internet Applications Spring Review Last week –XML / RSS –PHP introduction –Exercises from last week –Unanswered questions.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
NMED 3850 A Advanced Online Design January 26, 2010 V. Mahadevan.
Data File Access API : Under the Hood Simon Horwith CTO Etrilogy Ltd.
1 Accelerated Web Development Course JavaScript and Client side programming Day 2 Rich Roth On The Net
Client side web programming Introduction Jaana Holvikivi, DSc. School of ICT.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
Technology & Management Club Development Software Overview.
Intro to PHP Carl-Erik Svensson. What is PHP? PHP is a widely-used general-purpose scripting language that is especially suited for Web development and.
Just a Little PHP Programming PHP on the Server. Common Programming Language Features Comments Data Types Variable Declarations Expressions Flow of Control.
Dynamic web content HTTP and HTML: Berners-Lee’s Basics.
PHP Open source language for server-side scripting Works well with many databases (e.g., MySQL) Files end in.php,.php3 or.phtml Runs on all major platforms.
PHP Database connectivity Connecting with RDBMS and editing, adding, and deleting databases therein are all done through PHP functions.
Security Considerations Steve Perry
THE WEBMASTERS: SENG + WAVERING.  On account of construction, we will be having class in room 1248 next week.
PHP getting data from a MySQL database. Replacing XML as data source with MySQL Previously we obtained the data about the training session from an XML.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
1 Javascript DOM Peter Atkinson. 2 Objectives Understand the nature and structure of the DOM Add and remove content from the page Access and change element.
הרצאה 4. עיבוד של דף אינטרנט דינמי מתוך Murach’s PHP and MySQL by Joel Murach and Ray Harris.  דף אינטרנט דינמי משתנה עפ " י הרצת קוד על השרת, יכול להשתנות.
NMD202 Web Scripting Week5. What we will cover today PHP & MySQL Displaying Dynamic Pages Exercises Modifying Data PHP Exercises Assignment 1.
Unit 3 — Advanced Internet Technologies Lesson 11 — Introduction to XSL.
CSC 405: Web Application Engineering II8.1 Web programming using PHP What have we learnt? What have we learnt? Underlying technologies of database supported.
Working With Database Library And Helpers. Connecting to your Database First you need to set parameters in you database.php file residing in config folder.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
1 Objects In JavaScript. 2 Types of Object in JavaScript Built-in objects User Defined Objects Browser Object Document Object Model.
1/7/2016www.infocampus.co.in1. 1/7/2016www.infocampus.co.in2 Web Development training gives you and all-round training in both the design and the development.
HTML Introduction HTML Editors HTML Basic HTML Elements HTML Attributes HTML Headings HTML Paragraphs HTML Formatting HTML Links HTML Head HTML CSS HTML.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative.
WEB 431 Aid Education Expert/web431aidexpert.com FOR MORE CLASSES VISIT www. web431aid.com.
WEB 431 UOP Course Tutorial For more course tutorials visit
Unit 4 Representing Web Data: XML
Introduction to Dynamic Web Programming
Intro to JavaScript CS 1150 Spring 2017.
Introduction to CodeIgniter (CI)
Introduction to Web programming
Introduction to Advance Web Technologies
PHP Training at GoLogica in Bangalore
ISC440: Web Programming 2 Server-side Scripting PHP 3
Tutorial 6 PHP & MySQL Li Xu
Web Technologies Computing Science Thompson Rivers University
Introduction to Web programming
Information Technologies Anselm Spoerri PhD (MIT)
Presentation transcript:

Internet Applications Spring 2008

Review Last week –PHP/JavaScript – Form –Questions?

This week Ajax/APIs Beginning work on our RSS reader Next week plan –Work on application or install Wordpress?

Ajax Application model diagram Design considerations –Graceful degradation –Application fragmentation –Usability Components –JavaScript –HTTP request object

APIs Application Programming Interfaces Examples –Amazon web servicesAmazon –Google Books APIGoogle Books API Catalog Example Data formats –JSONJSON

JavaScript Syntax –Function() {}; –/* comment */ Variable and function declarations –var newvariable = value; –function functionName() {content;} Control Structures –If (variable == value) { do stuff; } –For (var i=0; i<10; i++) { do stuff;} object.method.value –document.write –document.getElementById(‘navigation’);

DOM JavaScript An approach to writing JavaScript that appends functions to elements of the HTML document Reference getElementById getElementsByTagName parentNode childNodes nodeValue firstChild previousSibling

DOM JavaScript Example #sample {background-color:#FFCC66; border:solid; width: 50px;} function moveMe (element, sTop, sLeft, eMove) { var myElement = document.getElementById(element); alert(myElement); myElement.style.position = 'absolute'; myElement.style.left = sLeft; myElement.style.top = sTop; for(var i=sTop; i<eMove; i++) { myElement.style.left = i+'px'; myElement.style.top = i+'px'; } function init() { moveMe("sample", 0, 0, 800 ); } window.onload = init; Here is some content

DOM Scripting Write functions that append actions to DOM elements maindiv = Document.getElementById(‘main’); maindiv.childNodes Maindiv.appendChild Maindiv.innerHTML = “stuff” Use the window.onload method to initialize page processing Script libraries – –

Class Exercises Application overview – Exercises –Today 1. A quick orientation 2. Create the HTML page framework 3. Create an XML configuration file and transformation function 4. Showing our feeds 5. Combine the two XSL files using named templates and parameters –Next Week 6. Migrating our feed-list to a relational database 7. Enabling feed subscription and un-subscription 8. Creating a PHP functions file –April 8th 9. Use JavaScript to control form display 10. Adding a Login function to our page –April 15th 11. Introducing Ajax

Exercise Framework Main Page (DOM, HTML, PHP) PHP Functions file (Program logic) MySQL Database (Data) XSL Stylesheet (Transformation) XML Data files (Data for ex. 1- 5) CSS Stylesheet (Layout) JavaScript file (Display, Ajax)

Skills needed for exercise 1-5 Ex 1, 2 - HTML, CSS Ex 3 – XML, XSL, PHPEx 3 Create an RSS file XSL transformation functions Create a PHP page to output them Ex 4 – Creating navigation linksEx 4 Dynamic query strings Ex 5 – Parameters for our XSL fileEx 5 More work with templates Creating arrays and accessing them in XSL

Next week Open source software Relational database overview –MySQL –SQL language Refresher on HTML forms PHP elements –Global variables

Skills needed for exercises 6 & 7 Ex 6 – MySQLEx 6 SQL syntax MySQL functions in PHP Ex 7 – Forms & form processingEx 7 Form coding and actions Global variables Page Logic

MySQL Open Source Relational Database At SILS –pearl.ils.unc.edu Relational database features Tables, Indexes, Queries SQL (Structured Query Language)

SQL Skills SQL – Structured query language –Uses a syntax with words like (select, where, insert, delete, from) to create logical statements Select column from tablename where limit = ‘value’; Insert into table (column, column) values (value 1, value 2); –A good reference

SQL Examples SELECT statements SELECT * from feeds where username = 'mitcheet'", SELECT * from feeds where id = ".$_REQUEST['feed'] INSERT statements INSERT INTO feeds (username, feedname, feedURL) values ('".$_REQUEST['username']."', '".$_REQUEST['feedName']."', '".$_REQUEST['feedUrl']."')"; DELETE statements DELETE from feeds where id = ".$_REQUEST['feedId']

MySQL functions in PHP Create a connection to the database $connection = mysql_connect($dbserver, $username, $pass); Select a database mysql_select_db($database, $connection); Run a query $result = mysql_query("SELECT * from feeds where username = 'mitcheet'", $connection); Get the results of the query as an array while ($row = mysql_fetch_array($result, MYSQL_NUM)) {} Close the connection mysql_close($connection);

MySQL Example function showFeed () { $connection = mysql_connect ("pearl.ils.unc.edu", "inls572_spring08", "yreuq572"); mysql_select_db("inls572_spring08", $connection); $result = mysql_query("SELECT * from feeds where id = ".$_REQUEST['feed'], $connection); while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo $row[3]; }

Skills needed for exercises 8 & 9 Ex 8 – External PHP functions file PHP require() function File management Ex 9 – Javascript Basics of JavaScript functions DOM scripting

Skills needed for exercises 10 & 11 Ex 10 – Login / Logoff functions More on HTML forms & PHP Writing and using Cookies Ex 11 - Ajax Ajax components Advanced JavaScript functions