Kingston University HTML Programming and Internet Tools module introduction

83
HTML Programming and Internet Tools CO1052 / CO2052 Feb 2010 | [email protected] | www.twitter.com/petterw

description

 

Transcript of Kingston University HTML Programming and Internet Tools module introduction

Page 1: Kingston University HTML Programming and Internet Tools module introduction

HTML Programming and Internet Tools CO1052 / CO2052

Feb 2010 | [email protected] | www.twitter.com/petterw

Page 2: Kingston University HTML Programming and Internet Tools module introduction

http://www.linkedin.com/in/petterw

Petter Warnsberg

Page 3: Kingston University HTML Programming and Internet Tools module introduction

3

Contact me

• Contact me– I live in Room SB318 (Sopwith Building)– email: [email protected]

and include “HTML” in the subject line– “office hours” Mondays 11:00-12:30,

– www.petterw.com

• For Course URL:– http://sites.google.com/site/kuhtml/

Page 4: Kingston University HTML Programming and Internet Tools module introduction

4

Contact Module leaderVincent Lau

• Contact Dr Lau– Live in Room SB215 (Sopwith Building)– email: [email protected]

and include “HTML” in the subject line

Page 5: Kingston University HTML Programming and Internet Tools module introduction

5

A Few Administrative Points

• In StudySpace, you can find information such as:– Module Guide– Lecture notes– Practical exercises– Assignments

• Outline marking schemes

– Useful links and references– Discussion Boards

Page 6: Kingston University HTML Programming and Internet Tools module introduction

Structure of the CourseDay Time Class type Room Week nos.

Thursday 9:00-10:00 Lecture CLT

Teaching weeks

1,2,3,7,11 and 12

Week 9 is

“enhancement

week”, activities

TBC ...

Thursday 10:15-11:00 Lecture JG1009Teaching weeks

1,2,3,7,11 and 12

Thursday 11:00-12:00 Practical JG1009Teaching weeks

1,2,3,7,11 and 12

Thursday 10:15-12:00 Practical JG1009Teaching weeks

4, 5, 6, 8 and 10

Page 7: Kingston University HTML Programming and Internet Tools module introduction

7

2008/9 (Semester 1) results

• 45 students – Passed at first attempt: 30 ( 67%)– Average mark 46%

• Highest mark 94% (3 students > 90%)

• Seek helps asap if needed

Page 8: Kingston University HTML Programming and Internet Tools module introduction

Week No Date Session

1 4th Feb 10 Lecture 1 & Workshop: Module introduction, Introduction to HTML/XHTML

2 11th FebLecture 2: Tags

Workshop: Exercise set 1: Tags

3 18th FebLecture 3 : CSS and CSS Layouts, Introduce individual coursework Part 1

Workshop: Exercise set 2: Tables and lists

4 25th Feb Workshop: Exercise set 3: CSS

5 4th Mar Workshop: Exercise set 4: CSS Layouts

6 11th MarWorkshop: Exercise set 5: Images

Test 1 (on first part of the module, during practical class), Part 1 individual coursework folder submission (on 15/Mar)

7 18th Mar

Lecture 4: Best practice

Test Results & Discussion, Introduce individual coursework Part 2

Workshop: Exercise set 6: Validation

8 25th Mar Workshop: Exercise set 7: Forms

9 15th Apr Enhancement Week – No Lectures or Practical

10 22nd Apr Workshop: Exercise set 8: Build a Webpage

11 29th AprLecture 5: JavaScript and jQuery

Workshop: Exercise set 9: JavaScript

12 6th May

Lecture 6: Web design

Test 2 (on all part of the module, during practical class), Part 2 individual coursework folder submission (on 10/May)

Workshop clinic

10th May – 14th May Revision week – No Lectures or Practical

17/May/10 Group Project Submission

Page 9: Kingston University HTML Programming and Internet Tools module introduction

9

Assessments

• Please READ Module Guide– Penalty for late submissions!– If needed, negotiate an extension in advance

• In-class tests 30%– Test 1 11th March– Test 2 6th May

Page 10: Kingston University HTML Programming and Internet Tools module introduction

10

Assessments

• Individual Work folder 40%– Part 1 submit on 15th March

– Part 2 submit on 10th May

• Group Mini-Project 30%– Submit on 17th May

Page 11: Kingston University HTML Programming and Internet Tools module introduction

11

Plagiarism

• Guidelines can be found at: http://student.kingston.ac.uk/C6/Plagiarism/default.aspx

• Formal Hearing– If found guilty

• First offence – 0 given, FZ grade recorded• Second offence – may terminate registration

Page 12: Kingston University HTML Programming and Internet Tools module introduction

12

Reading list

For this module:

P. Carey, “Creating Web Pages with HTML, XHTML, and XML”, Thomson Course Technology, 2006.

D. Gosselin, "Introductory XHTML", Thomson Course Technology, 2003.

Page 13: Kingston University HTML Programming and Internet Tools module introduction

13

Reading list

D. Oliver and M. Morrison, "Teach Yourself HTML and XHTML in 24 Hours", SAMS, 2003.

Good reference book in the subject matter (applications based):

P. K. Yuen and V. Lau, "Practical Web Technologies", Addison-Wesley, 2003.

Page 14: Kingston University HTML Programming and Internet Tools module introduction

14

Web Resources

Good internet resources: World Wide Web Consortium

http://www.w3c.org/ W3 Schools

http://www.w3schools.com/ Tutorials

http://net.tutsplus.com

Page 15: Kingston University HTML Programming and Internet Tools module introduction

This is digital media

Page 16: Kingston University HTML Programming and Internet Tools module introduction

The technology that drives digital media

Page 17: Kingston University HTML Programming and Internet Tools module introduction

evolution

Page 18: Kingston University HTML Programming and Internet Tools module introduction

Each generation of online technology builds on previous generations

Page 19: Kingston University HTML Programming and Internet Tools module introduction

Example:

Page 20: Kingston University HTML Programming and Internet Tools module introduction
Page 21: Kingston University HTML Programming and Internet Tools module introduction

physical network layer:

Page 22: Kingston University HTML Programming and Internet Tools module introduction

hardware layer: servers & computers

Page 23: Kingston University HTML Programming and Internet Tools module introduction

network layer: TCP/IP

Page 24: Kingston University HTML Programming and Internet Tools module introduction

protocols layer: HTTP

Page 25: Kingston University HTML Programming and Internet Tools module introduction

server software layer: Apache, IIS

Page 26: Kingston University HTML Programming and Internet Tools module introduction

data layer: databases, XML

Page 27: Kingston University HTML Programming and Internet Tools module introduction

browser layer:

Page 28: Kingston University HTML Programming and Internet Tools module introduction

content structure layer: XHTML

Page 29: Kingston University HTML Programming and Internet Tools module introduction

content style layer: CSS

Page 30: Kingston University HTML Programming and Internet Tools module introduction

dynamic layer: Document Object Model + JavaScript

Page 31: Kingston University HTML Programming and Internet Tools module introduction

extension layer: Media (Video, audio)

Interactivity (Flash, Silverlight)Functionality (Add-Ins,

Extensions)

Page 32: Kingston University HTML Programming and Internet Tools module introduction
Page 33: Kingston University HTML Programming and Internet Tools module introduction

1. HTML/CSS2. Frontend scripting3. Backend development4. Content management5. Server administration6. Flash development7. Content and assets

Web development

Page 34: Kingston University HTML Programming and Internet Tools module introduction

Content of module

HTML

Describe the content so that machines knows what it is

CSS

Style the content so that humans can easily take it in

JavaScript

Make it interactive so that it becomes more intuitive, faster and obvious to humans

Best practice

Make it great:-Usability-Accessibility-Production workflow-Validation-Debugging -Web design

Page 35: Kingston University HTML Programming and Internet Tools module introduction

35

Example 1

• A typical web page contains:– HTML instructions– Style sheets

• Colors, fonts, sizes, styles etc.

• Images, animated GIF images, objects, …

– Javascriptshtml_example.htm

Page 36: Kingston University HTML Programming and Internet Tools module introduction

36

Example 1 – HTML code (see example on StudySpace)

<?xml version="1.0" encoding="iso-8859-1"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head><title> A Shooting Game - ex09-09.htm </title></head>

<style>

.tx01St={font-family:arial;font-size:18pt;font-weight:bold}

.butSt{background-color:#dddddd;font-family:arial;font-weight:bold;

font-size:18pt;color:#880000;width:60px;height:40px}

.butSt1{background-color:#aaffaa;font-family:arial;font-weight:bold;

font-size:18pt;color:#880000;width:110px;height:40px}

</style>

<body style="background:#dddddd;font-family:arial;font-size:20pt;

color:#000088;font-weight:bold">

<div style="position:absolute;top:15px;left:150px">HTML Example - A Shooting Game</div>

<img src="line1.gif" style="position:absolute;

top:50px;left:150px;width:380px;height:6px" />, ....

……

Page 37: Kingston University HTML Programming and Internet Tools module introduction

E-commerce: Amazon.co.uk

Page 38: Kingston University HTML Programming and Internet Tools module introduction

Communitites: last.fm/user/petterww

Page 39: Kingston University HTML Programming and Internet Tools module introduction

39

Example 2 – Flash movies

• A Flash Movie that runs within a Web browser plug-in embedded with HTML– Flash Movies written separately– A Flash SWF file is downloaded along with a

Web page from a Web server, but the Flash itself runs on the user’s computer

Page 40: Kingston University HTML Programming and Internet Tools module introduction

40Campaigns: Get the glass

Page 41: Kingston University HTML Programming and Internet Tools module introduction

41

Example 3 – Dynamic HTML

• Manipulating the HTML and browser with JavaScript– Rich interfaces and AJAX– Enabled web applications

Page 42: Kingston University HTML Programming and Internet Tools module introduction

Web applications: Google calendar

Page 44: Kingston University HTML Programming and Internet Tools module introduction

The Cloud

Page 45: Kingston University HTML Programming and Internet Tools module introduction

New type of services

Page 46: Kingston University HTML Programming and Internet Tools module introduction

Prosumer

Page 47: Kingston University HTML Programming and Internet Tools module introduction

Data portability

Page 49: Kingston University HTML Programming and Internet Tools module introduction

Intelligent web – APIs

Page 50: Kingston University HTML Programming and Internet Tools module introduction

Intelligent web – Mashups

Page 51: Kingston University HTML Programming and Internet Tools module introduction

New platforms

Page 52: Kingston University HTML Programming and Internet Tools module introduction

Game console integrationNew platforms

Page 53: Kingston University HTML Programming and Internet Tools module introduction

Android, Wave, Chrome OS, Friend connect

New platforms

Page 54: Kingston University HTML Programming and Internet Tools module introduction

Augmented reality + Profile

Page 55: Kingston University HTML Programming and Internet Tools module introduction

Mobile trends

1. Features that make sense in a Mobile phone.2. Move towards applications (away from pages.)

Page 56: Kingston University HTML Programming and Internet Tools module introduction

Learning, creating, testing and sharing

...in a fragmented ubiquitous digital landscape that builds on top of existing layers of technology.

Page 57: Kingston University HTML Programming and Internet Tools module introduction

From browser to server return

Page 58: Kingston University HTML Programming and Internet Tools module introduction

58

What is the Internet?

• A computer network is a collection of computers that can exchange data via a telecommunication mechanism

• An internet is a network of computer networks

• The Internet (capital ”I”) is one large, globally accessible internet

Page 59: Kingston University HTML Programming and Internet Tools module introduction

59

HTTP versus HTML

• HTTP governs how files move over the web• HTML defines structure of Web documents

Web Servere.g. www.kingston.ac.uk

User’s Web Browsere.g. k123456.kingston.ac.uk

The Internet

HTTP session

HTML docu-ments

Page 60: Kingston University HTML Programming and Internet Tools module introduction

60

Why is the Internet important?

• The third most important invention in the computing history– The Computer, the Microprocessor, The

Internet

• Worldwide communication, access to info, to people and business

• Easy to use

Page 61: Kingston University HTML Programming and Internet Tools module introduction

61

History

• 1960 ARPAnet• 1990 World Wide Web, Tim Berners-Lee created a

set of technologies that allowed information to be linked together through links in documents (HTML)

• 1992 Mark Andreessen created the first Web browser Mosaic

• 1994 World Wide Web Consortium

Page 62: Kingston University HTML Programming and Internet Tools module introduction

62

Web Browsers• Web browsers are software programs that allow users to

access certain types of Internet files in an interactive environment

• Microsoft’s Internet Explorer and Netscape’s Communicator

• The Uniform Resource Locator (URL) is the unique address associated with the Web page and is displayed in the browser window, e.g. (http://www.kingston.ac.uk/index.html)

• Navigation through hyperlinks which can reference other Web pages, e-mail addresses and files

Page 63: Kingston University HTML Programming and Internet Tools module introduction

63

Web Server

• A computer, running special software, which is always connected to the Internet

• Typing and URL in the Web browser or clicking in a link sends a request to the server that hosts this information

• The server sends back the requested files and displays them in the Web browser

Page 64: Kingston University HTML Programming and Internet Tools module introduction

64

Document Formatting

• WYSIWYG– “What You See Is What You Get”– Use visual tools to format the document

e.g. Word for Windows

• Mark-up Languages– Use special ‘codes’ to specify the functionality

of the content in a document

Page 65: Kingston University HTML Programming and Internet Tools module introduction

65

HTML

• Stands for Hyper-Text Mark-up Language• It is a Mark-up language and the files are

compiled and presented on demand, usually by a web browser

• However it is not a programming language– Note: there are Mark-up languages that are also

programming languages

Page 66: Kingston University HTML Programming and Internet Tools module introduction

66

HTML (cont…)

• HTML documents are plain text (not case sensitive) files with embedded markup codes (tags)

• Any simple text editor could be used to create and edit HTML file

• The file should be saved with extension .htm or .html

Page 67: Kingston University HTML Programming and Internet Tools module introduction

67

HTML versions

• Originally developed at CERN as part of the WWW project managed by Tim-Berners-Lee

• The first browser was Mosaic, by Marc Andreessen who went on to found Netscape

• The grey days of incompatibility followed until recently...

Page 68: Kingston University HTML Programming and Internet Tools module introduction

68

XHTML 1.1

• stands for EXtensible HyperText Markup Language

• Largely based on HTML 4.01

• Defines HTML as an XML application

Page 69: Kingston University HTML Programming and Internet Tools module introduction

69

What is a Tag?

• The mark-up ‘codes’ in HTML are called tags

• A tag may be used to describe an element of a list or the heading of a section

• Actually their functionality is much wider and we will attempt to introduce the most basic ones today

Page 70: Kingston University HTML Programming and Internet Tools module introduction

70

Just one Second !

• Is there any point in writing plain HTML when Microsoft Frontpage is out in the wild ?

• It produces very wasteful code

• It doesn’t always give you exactly what you want.

Page 71: Kingston University HTML Programming and Internet Tools module introduction

71

What do these tags look like? (1)

• Tag names are included in < >

• The text to be formatted is included in <tagname> text </tagname>

• Tags can be nested <b><i>text</i></b>

Page 72: Kingston University HTML Programming and Internet Tools module introduction

72

What do these tags look like?

• They may also have attributes<img id="flower" />

• Tags must always have a matching closing tag

Page 73: Kingston University HTML Programming and Internet Tools module introduction

73

Structure of a Tag

<p id="title">Welcome to CO1052</p>

tag attribute attribute endname name value tag

Page 74: Kingston University HTML Programming and Internet Tools module introduction

74

The Mother of all Tags

• Tags in XHTML are case sensitive– BUT not in HTML

• The most basic tag is the one that specifies the document type.

• The whole of an HTML document must be included between

<html>and

</html>

Page 75: Kingston University HTML Programming and Internet Tools module introduction

75

The Document Type

• To adhere to the XHTML 1.1 standard, the first line of the document must be the appropriate document declaration

e.g. (see next week lecture)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Page 76: Kingston University HTML Programming and Internet Tools module introduction

76

Inside the document

• A document must have a head and title element given by the nested tags:

<head><title>Here goes the title</title>

</head>

• The head section is followed by the body <body> everything happens here </body> section.

• The body is where everything happens

Page 77: Kingston University HTML Programming and Internet Tools module introduction

77

HTML/XHTML Document - example

<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>

<head>

<title> Example of a title </title>

</head>

<body>

<h1>This is an example of h1 heading</h1>

</body>

</html>

Page 78: Kingston University HTML Programming and Internet Tools module introduction

78

So How to Type your HTML Code then?

• Use simple ‘text’ editors, such as notepad– And don’t forget to save file with file extension

.htm or .html

• Use ‘HTML Editor’ such as HTML-Kit• Use WYSIWYG authoring software such as

Dreamweaver from Macromedia

Page 79: Kingston University HTML Programming and Internet Tools module introduction

79

Using notepad

• Follow start > All programs > Accessories > Notepad

Page 80: Kingston University HTML Programming and Internet Tools module introduction

80

Using HTML-Kit

• HTML Editor

Page 81: Kingston University HTML Programming and Internet Tools module introduction

81

Using Dreamweaver• WYSIWYG authoring software

Page 82: Kingston University HTML Programming and Internet Tools module introduction

Publish your own index.html page

http://sites.google.com/site/kuhtml

Page 83: Kingston University HTML Programming and Internet Tools module introduction

Keep on trucking

[email protected] | http://twitter.com/petterw