TOOLBOX 2.2. Jean-Christophe (JC) Nebel

Similar documents
PHP Tutorial From beginner to master

Short notes on webpage programming languages

IE Class Web Design Curriculum

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Software Requirements Specification For Real Estate Web Site

Xtreeme Search Engine Studio Help Xtreeme

COURSE SYLLABUS EDG 6931: Designing Integrated Media Environments 2 Educational Technology Program University of Florida

Advanced Web Development SCOPE OF WEB DEVELOPMENT INDUSTRY

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Web Design in Nvu Workshop Session Plan

CrownPeak Playbook CrownPeak Hosting with PHP

GLEN RIDGE PUBLIC SCHOOLS MATHEMATICS MISSION STATEMENT AND GOALS

ISI ACADEMY Web applications Programming Diploma using PHP& MySQL

Adobe Dreamweaver CC 14 Tutorial

Bijlage1. Software Requirements Specification CIS. For. Version 1.0 final. Prepared by Saidou Diallo. HvA/Inaxion. November 2009

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

LICENSE4J LICENSE MANAGER USER GUIDE

Application note: Connecting the to a Database

Mercury Users Guide Version 1.3 February 14, 2006

SUBJECT CODE : 4074 PERIODS/WEEK : 4 PERIODS/ SEMESTER : 72 CREDIT : 4 TIME SCHEDULE UNIT TOPIC PERIODS 1. INTERNET FUNDAMENTALS & HTML Test 1

ITP 101 Project 3 - Dreamweaver

Web Hosting Features. Small Office Premium. Small Office. Basic Premium. Enterprise. Basic. General

International Journal of Engineering Technology, Management and Applied Sciences. November 2014, Volume 2 Issue 6, ISSN

Using The HomeVision Web Server

10CS73:Web Programming

Example. Represent this as XML

... Asbru Web Content Management System. Getting Started. Easily & Inexpensively Create, Publish & Manage Your Websites

Web Design Specialist

aspwebcalendar FREE / Quick Start Guide 1

CPE111 COMPUTER EXPLORATION

UQC103S1 UFCE Systems Development. uqc103s/ufce PHP-mySQL 1

Contents. Downloading the Data Files Centering Page Elements... 6

Hypercosm. Studio.

IAS Web Development using Dreamweaver CS4

Web Authoring. Module Descriptor

Application Servers G Session 2 - Main Theme Page-Based Application Servers. Dr. Jean-Claude Franchitti

Pemrograman Web. 1. Pengenalan Web Server. M. Udin Harun Al Rasyid, S.Kom, Ph.D

Basic tutorial for Dreamweaver CS5

SelectSurvey.NET Developers Manual

Other Language Types CMSC 330: Organization of Programming Languages

Intro to Web Development

OCS Training Workshop LAB13. Ethernet FTP and HTTP servers

A Manual on use of ABCD central and VHL-Site modules for Developing Library Information Discovery and Information Literacy Tools

Your Blueprint websites Content Management System (CMS).

How To Let A Lecturer Know If Someone Is At A Lecture Or If They Are At A Guesthouse

WEB& WEBSITE DESIGN TRAINING

SYSTEM DEVELOPMENT AND IMPLEMENTATION

Outline. CIW Web Design Specialist. Course Content

Designing and Implementing an Online Bookstore Website

IGW+ Certificate. I d e a l G r o u p i n W e b. International professional web design,

VP-ASP Shopping Cart Quick Start (Free Version) Guide Version 6.50 March

G563 Quantitative Paleontology. SQL databases. An introduction. Department of Geological Sciences Indiana University. (c) 2012, P.

How To Test Your Web Site On Wapt On A Pc Or Mac Or Mac (Or Mac) On A Mac Or Ipad Or Ipa (Or Ipa) On Pc Or Ipam (Or Pc Or Pc) On An Ip

How To Create A Website In Drupal 2.3.3

Manual pdf-recover Page 2

Checklist of Best Practices in Website

SQL Server Instance-Level Benchmarks with DVDStore

Dreamweaver Tutorial #1

WEB DESIGN COURSE CONTENT

Scoop Hosted Websites. USER MANUAL PART 4: Advanced Features. Phone: scoop@scoopdigital.com.au Website: scoopdigital.com.

THE XML TECHNOLOGY IMPLEMENTED IN MICROSOFT SQL SERVER

UH CMS Basics. Cascade CMS Basics Class. UH CMS Basics Updated: June,2011! Page 1

Business & Computing Examinations (BCE) LONDON (UK)

1.264 Lecture 19 Web database: Forms and controls

Enduring Understandings: Web Page Design is a skill that grows and develops throughout the careful planning and study of software and design.

Index. Page 1. Index

Online shopping store

LAMP Server A Brief Overview

Introducing our new Editor: Creator

Rich Internet Applications

WEB DATABASE PUBLISHING

Conjoint Survey Design Tool: Software Manual

INFORMATION BROCHURE Certificate Course in Web Design Using PHP/MySQL

WEBSITE CONTENT MANAGEMENT SYSTEM USER MANUAL CMS Version 2.0 CMS Manual Version

Digital Web Design Syllabus/Online Course Plan

CSCI110 Exercise 4: Database - MySQL

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Web Design in Nvu Workbook 1

How to Create a WordPress web site at

To use MySQL effectively, you need to learn the syntax of a new language and grow

Web Development Guide. Information Systems

ADOBE DREAMWEAVER CS3 TUTORIAL

Using Adobe Dreamweaver CS4 (10.0)

Lesson 7 - Website Administration

USER GUIDE MANTRA WEB EXTRACTOR.

Contents. Introduction Downloading the Data Files... 2

FileMaker Server 12. Custom Web Publishing with PHP

Module 6 Web Page Concept and Design: Getting a Web Page Up and Running

Site Store Pro. INSTALLATION GUIDE WPCartPro Wordpress Plugin Version

Web development... the server side (of the force)

5. At the Windows Component panel, select the Internet Information Services (IIS) checkbox, and then hit Next.

OPENTABLE GROUP SEARCH MODULE GETTING STARTED ADD RESERVATIONS TO YOUR WEBSITE

Creating Online Surveys with Qualtrics Survey Tool

Transcription:

TOOLBOX 2.2 Jean-Christophe (JC) Nebel j.nebel@kingston.ac.uk http://staffnet.kingston.ac.uk/~ku33185

Interested in starting up in business and/or developing enterprise skills Join the Enterprising Business Award scheme Enterprising Business Awards (Handbook) available on studentspace http://www.kingston.ac.uk/services-forbusiness/entrepreneurship/registration/ -Receive expert mentoring from the Entrepreneurship Team and our resident entrepreneur Simon Hulme, successful in business and now an Angel Investor. - There is the opportunity to receive financial support to get your idea, project or career off the ground. Presentation: Thursday 23 rd February 2pm http://www.youtube.com/watch?v=iswzu366qz0&feature=youtu.be

Activity 1.1: feedback Completions: 75! extremely poor Last year: ~200!

Activity 1.1: feedback Most people found the activity quite straight forward forgot to close tags did some research to find right syntax: including images or embedding videos (<embed >, not <a href >) -> Lecture video, http://www.w3schools.com, online tutorials

Activity 1.1: feedback How to deal with special characters? Why some headers smaller than text in Spring CSS?

Activity 1.1: feedback Interesting to see the different ways different browsers reacted to CSS style sheets Problem with list numbers http://msdn.microsoft.com/en-us/library/cc351024(v=vs.85).aspx http://www.w3schools.com/html/html_lists.asp Where can I change the background colour? see spring.css Is it possible to get a web development software for free, which is as good as CS5 Adobe Dreamweaver?

Activity 1.1: feedback About screen copy and image scaling (e.g. http://www.irfanview.com/) I tried to capture my webpage, but I got only a black screenshot for the video part The problem is usually due to graphics hardware acceleration being used to display the image: A solution is to disable the hardware acceleration (Control Panel) Image formats in html:.gif,.jpg,.jpeg,.bmp,.png

Activity 1.1: feedback Please if you can explain more about how to link the style and the exact code that we need to write as I didn't get it that much Here only link 1 CSS at a time, but LINK to several CSS is possible I didn't understand about what does 'minimal me' mean? How to centre a picture? : CSS, http://www.w3.org/style/examples/007/center.en.html Your mark is not affected by your question(s)

Activity 1.2: feedback Completions: 66! extremely poor Last year: ~150!

Activity 1.2: feedback Those who tried succeeded! -> Trial and error -> W3schools website + google + lecture video. Wordpad much better than Notepad (formatting) Some browsers do not handle well wobbly scripting vs programming languages JAVA applets <APPLET code="helloworld.class" WIDTH="200" HEIGHT="40"> This is where the aplet runs.</applet> Anchors?

Activity 1.2: feedback how to link two css together to html? LINK twice, however here I want you to merge the 2 files wobbly-spring style When I was creating my page to put a background colour was simply just background but when I went onto the help site I noticed they do background-color: does both these ways work? Colours? Predefined names (147) or RGB values background-color:#ff0000; background-color:red;

TOOLBOX 2.2 Jean-Christophe (JC) Nebel j.nebel@kingston.ac.uk http://staffnet.kingston.ac.uk/~ku33185

History Started as a Perl hack in 1994 by Rasmus Lerdorf (to maintain his homepage): "Personal Home Page Tools PHP Tools v1.0: released publicly - to accelerate bug location and improve the code - in 1995. Currently PHP v5.3: PHP Hypertext Preprocessor Free to download (open source): http://www.php.net/ PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.) PHP runs on Windows, Linux, Unix and Mac OSX. PHP is compatible with most servers, e.g. Apache & IIS

Usage (Dec 2010) PHP is a good example of a successful open source project: very widely used for websites Has a lot of community support http://phpadvent.org/2010/usage-statistics-by-ilia-alshanetsky

Features Procedural language: functions Syntax similar to C/C++ or Java: if (cond) {..} else { }, while (cond) {.. }, for(startcond; inc; endcond) { } Extensive Function Library Not fully object-oriented - classes are additional Hacky: developed by hackers Good Web-server integration Script embedded in HTML Easy access to form data and output of HTML pages Run-time interpreted by the web server

PHP and HTML HTML-embedded PHP scripts are essentially HTML pages with occasional sections of PHP script. PHP script is enclosed in tag pairs: <p> Today's day: <?php print date("l")?> <p> Today's date: <?php print date('l js \of F Y h:i:s A')?> stringdate(string$format[,int$timestamp= time()] ) http://php.net/manual/en/function.date.php

PHP (Client-server) Client side Server side.html,.css PHPembedded in an HTML file.html,.css,.php

Website template Create a file called header.php which will have the header HTML code. You can use FrontPage/Dreamweaver to create the header, but remember to remove the closing </BODY> and </HTML> tags. <html> <head> <title> My website</title> <link rel="stylesheet" type="text/css" href= mycssfile.css"> </head> <body> --- my cool header here Create a file called footer.php which will have the footer HTML code. --- my cool footer here </body> </html>

Website template This is the basic template that you will use on all of the pages. Make sure you name the files with a.php extension so that the server will process the PHP code. Here, we assume the header and footer files are located in the same directory. <?php?> // header include( header.php ); Insert content here! <?php?> // footer include( footer.php );

Website template Benefits: - Any changes to header or footer only require editing of a single file. - Helps separate the content and design This reduces the amount of work necessary for site maintenance and redesign. Header Page 1 Content Page 2 Content Page 3 Content Page 4 Content Page 5 Content Footer

Function library Basic tasks String Handling Mathematics random numbers, trig functions.. Regular Expressions Date and time handling File Input and Output And more specific functions for- Many are obvious to c programmers: strlen, printf, fprintf, strpos Database interaction: MySQL, Oracle, Postgres, Sybase, MSSQL... Encryption Text translation Spell-checking Image creation XML Hacky : addcslashes, explode, soundex, quotemeta http://www.php.net/manual/en/funcref.php

Variables In PHP, a variable does not need to be declared PHP automatically converts the variable to the correct data type, depending on its value. Variables start with $ Example: <?php $mydateofbirth=1980; $thisyear=date("y"); $myage= $thisyear-$mydateofbirth; if($myage"]>30) echo "You are not that young..."; else echo "You are still young.";?>

PHP Form handling HTML form with two input fields & a submit button: <html> <body> <form action="useformpost.php" method="post"> Name: <input type="text" name="fname" /> Age: <input type="text" name="age" /> <input type="submit" /> </form> </body> </html> When a user fills out the form above and click on the submit button, the form data is sent to a PHP file, called "useformpost.php.

PHP Form handling useformpost.php: recover inputs and use them <html> <body> Welcome <?php echo $_POST["fname"];?>!<br /> You are <?php echo $_POST["age"];?> years old. <?php $thisyear=date("y")?><br/> You were born in <?php echo $thisyear-$_post["age"];?>!<br/> <?php if($_post["age"]>30) echo "You are not that young..."; else echo "You are still young.";?> </body> </html>

PHP Form handling In PHP, there are 2 modes to send and retrieve information from forms: GET & POST <form action="useformpost.php method="post"> <?php echo $_POST["fname"];?> or <form action="useformget.php method= get"> <?php echo $_GET["fname"];?> Information sent with GET is visible to everyone (in the browser's address bar) & has a size limit (2000 characters): - DO NOT use when sending passwords or sensitive data! - URL can be bookmarked: /useformget.php?fname=jc&age=32 Information sent with POST is invisible & has no size limit

Example of File handling: web counter How to count how many times your webpage has been accessed? <?php $COUNTER_FILE = webcounter.txt"; if (file_exists($counter_file)) { $fp = fopen("$counter_file", "r+"); $hits = fread($fp, 1024); rewind($fp); $hits += 1; fwrite($fp, $hits); fclose($fp); echo "You are visitor $hits"; } else { echo "counter is not available"; }?> File with correct rights Return boolean value (TRUE or FALSE) File opening modes

Use of PHP with Databases PHP is compatible with many databases: MySQL, Oracle, Postgres, Sybase, MSSQL... We will study databases in a future lecture

Use MySQLwith PHP We can simply use PHP functions and mysql queries together: Connect to the database server and login (this is the PHP command to do so) mysql_connect("host","username","password"); Choose the database mysql_select_db("database"); Send SQL queries to the server to add, delete, and modify data mysql_query("query"); Close the connection to the database server (to ensure the information is stored properly) mysql_close();

PHP resources PHP Download http://www.php.net/ PHP Tutorial http://www.w3schools.com/php/default.asp PHP Programmers http://www.phpide.de/ Programmer's text editor (syntax highlighting for PHP ): JEdit http://www.jedit.org/ Hotscripts A large number of PHP scripts (15000+) can be found at: http://www.hotscripts.com/category/scripts/php/

Activity 2.2 - Create a webpage which allows converting units from the metric/imperial to the imperial/metric system, e.g. pounds to euros, kilometres to miles or pounds to kilos. http://calculator-converter.com/converter_miles_to_kilometers_mi_to_km_calculator.php - Integrate a cool and advanced script into your own webpage, e.g. calculator