Creating User Interfaces Font example. Server issues. Present video/audio examples. Discuss video and audio value-add. Stakeholders. HTML5 localStorage.

Slides:



Advertisements
Similar presentations
Introduction to HTML & CSS
Advertisements

Gdes2000 Graphic Design for Internet & Multimedia An Introduction to Dreamweaver CS5 + Adding Text Overview of palettes and DW working environment. Creation.
JavaScript Part 6. Calling JavaScript functions on an event JavaScript doesn’t have a main function like other programming languages but we can imitate.
MMDE5011 – INTERACTIVE MEDIA PRACTICE 1 WEEK 1: INTRODUCTION TO HTML5
Programming games More drawing. Text. Radian measure. Faces. Homework: Do your own drawings. Create index.html file. Upload work.
Chapter 16 Dynamic HTML and Animation The Web Warrior Guide to Web Design Technologies.
1 The World Wide Web. 2  Web Fundamentals  Pages are defined by the Hypertext Markup Language (HTML) and contain text, graphics, audio, video and software.
Chapter 15 HTML 5 Video and Audio Intro to HTML5 1.
Chapter 14 Introduction to HTML
Creating Databases applications for the Web Reprise. Basic HTML review, forms Preview: Server side vs client side Classwork: create HTML forms and check.
Forms, Validation Week 7 INFM 603. Announcements Try placing today’s example in htdocs (XAMPP). This will allow you to execute examples that rely on PHP.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Browser Comparisons - Convenience Internet Explorer 8 & 9, Chrome 11 and Firefox 4 Searching, Convenience & Add-ons.
Programming Games Computer science big ideas. Computer Science jargon. Show virtual dog Homework: [Catch up: dice game, credit card or other form.] Plan.
HTML5. What is HTML5? HTML5 will be the new standard for HTML. HTML5 is the next generation of HTML. HTML5 is still a work in progress. However, the major.
HTML 5 New Standardization of HTML. I NTRODUCTION HTML5 is The New HTML Standard, New Elements New Attributes Full CSS3 Support Video and Audio 2D/3D.
Week 6.  Browser DOCTYPE switching What it means for you  – now is the time  CSS3 Web design for the 21 st Century.
Create Interfaces College exercise. Continue HTML5: HTML5 logo, drawing images. Coin toss. Homework: acquire video & audio.
JavaScript Form Validation
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.
JavaScript & jQuery the missing manual Chapter 11
Build a Free Website1 Build A Website For Free 2 ND Edition By Mark Bell.
Create Your Own Webpage. Fun with images Today we’ll cover –Working with images Including an image on your page Making the image a link Editing images.
Programming Games Basic HTML5 audio example. Catch-up. Work on basic video. Homework: Complete basic video.
Programming Games Show your cannonball. HTML5 video. Miro. Classwork/Homework: Acquire video, convert to multiple formats, and produce simple (just html)
Getting Started with Canvas IDIA Spring 2013 Bridget M. Blodgett.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
Programming Games Show your simple video. More video examples. Audio. Classwork/Homework: Produce more complex video program.
MIS 425 Lecture 3 – HTML 5 and CSS Instructor: Martin Neuhard
Chapter 8 Cookies And Security JavaScript, Third Edition.
Lecture 8 – Cookies & Sessions SFDV3011 – Advanced Web Development 1.
Programming Games Show project. Refresher on coordinates. Scaling, translation. HTML5 logo. Refresher on animation. Bouncing ball. Homework: Do your own.
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
Programming games Examples. Classwork: work and show something of your final project. Homework: (finish…)
Creating Databases CSS example. One-way encryption. Passwords. Security issues. Work session.. Homework: Making unique posting on encryption, passwords,
Creating User Interfaces Recap HTML/HTML5 JavaScript features Homework: keep working on user observation studies. Review JavaScript.
Creating Databases Local storage. join & split Classwork: show 1 table application. Share designs for oscars application. Adaptive select. Homework: [Catch.
UPLOAD / DOWNLOAD april  HTML5 is just the next iteration of HTML  Previous version was technically HTML 4.01, which incorporated XHTML 1.0.
Introduction to JavaScript CS101 Introduction to Computing.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
CHAPTER 15 HTML 5 VIDEO AND AUDIO Intro to HTML5 1.
Programming games Problems. Schedule Various examples. Homework: rps, bo (don't go back to do this), cannonball, Video or Audio should be complete. Now.
Reading Flash. Training target: Read the following reading materials and use the reading skills mentioned in the passages above. You may also choose some.
Creating Interfaces Show form validation examples, Hangman. HTML5 with Google Maps API. Add in localStorage. Design pitfalls. Homework: Make proposal for.
Programming games Context of what we are doing. Drawing on canvas. Homework: [Complete coin toss examples.] Do your own drawings. Upload files to website.
Creating Databases One-way encryption. Passwords. Security issues. Data normalization. Integrity and Robustness. Homework: Finalize teams & projects. Making.
HTML Forms.
Creating Animations, Working with Graphics, and Accessing Data Lesson 9.
Creating User Interfaces HTML5 video & audio. Role of video and audio. Homework: Complete your own [small/simple] HTML5 video and audio projects.
IS2802 Introduction to Multimedia Applications for Business Lecture 8: JavaScript and Cookies Rob Gleasure
Rich Internet Applications 9. HTML 5 and RIAs. HTML 5 Standard currently under development by W3C Aims to improve the language with support for the latest.
PHP Form Processing * referenced from
PHP: Further Skills 02 By Trevor Adams. Topics covered Persistence What is it? Why do we need it? Basic Persistence Hidden form fields Query strings Cookies.
Lecture 9: Extra Features and Web Design Tarik Booker CS 120 California State University, Los Angeles.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
Chapter 9 HTML 5 Video and Audio
Advanced HTML Tags:.
Introduction to HTML.
Pre-Production Meet with the client to create a project plan:
Creating Databases Local storage. join & split
HTML5 and Local Storage.
CSc 337 Lecture 27: Cookies.
HTML5 and Local Storage.
Catchup. Work on project.
Creating User Interfaces
CSc 337 Lecture 25: Cookies.
Presentation transcript:

Creating User Interfaces Font example. Server issues. Present video/audio examples. Discuss video and audio value-add. Stakeholders. HTML5 localStorage Homework: Make postings on usability heuristics.

Example of fonts You can acquire, upload to your site, and reference a { font-family: "Nevis"; src: url(nevis.ttf) format("truetype"); } Issue: you do need to wait for font to download. –alternate event Example uses text in h1 element (where there is a fallback font) and writing on canvas Example works on Firefox, not Chrome, not Windows Safari –I assume it works on Opera… canvas-font.htmlhttp://faculty.purchase.edu/jeanine.meyer/html5/ canvas-font.html

canvas { border:solid 1px red; display:block; { font-family: "Nevis"; src: url(nevis.ttf) format("truetype"); } h1 { font-family: "Nevis", sans-serif } window.addEventListener('load', function() { var canvas = document.querySelector("canvas"); var ctx = canvas.getContext("2d"); var text = 'HTML'; ctx.font = 'bold 102px Nevis, sans-serif'; ctx.fillText(text, 102, 75); }, false); Canvas font test Canvas font test Fall back font

Notes The querySelector is more general than getElementById and can be used for all CSS type categories. The onload in body appears to work just as well…. html5/canvasfont3.htmlhttp://faculty.purchase.edu/jeanine.meyer/ html5/canvasfont3.html Note: the quotations in the url("nevis.ttf") seem to be optional.

Not graceful degradation… Look at html5/defaultfont.html html5/defaultfont.html Browser can't find the "Boo" font and so goes directly to the fall-back. In contrast, Browser trying to get Nevis font may or may not use the default font. –See program in Windows Safari: goes to the default: sans-serif.

Server Server computer must be set up with a designated MIME type for each type of files. This is NOW done on students.purchase.edu for the video fonts. Please report on anything that works on local computer and not on server –MAKE SURE everything is uploaded!

Rotating star This star program uses an angle and so making it rotate was relatively easy. onepreciserotatingstar.htmlhttp://faculty.purchase.edu/jeanine.meyer/html5/ onepreciserotatingstar.html Note use of setInterval. This code generalizable to other shapes, including polygons. –See memory polygons game in book. orypolygons2.html orypolygons2.html

Alternate HTML5 has coordinate system for the canvas context. You can –save a coordinate system. –translate –rotate –scale –transform (full matrix transformation) –restore Note: I used translate and scale in html5logoscale: – ale.htmlhttp://faculty.purchase.edu/jeanine.meyer/html5logosc ale.html

Present video and audio Discussion: HTML5 video and audio versus –Flash –link to YouTube –Quick Time movie –etc.

Discussion What is 'value add' of video and of audio to an application? [Note: I asked for you to do video and audio.] ??? Name place where video is essential / useful / helpful

Old conventional wisdom Do not put text on (OVER) screen. People would not accept … –small and smaller screens –tweets –requirement to type –Long download times This may be true. Techniques to let user know … –? Note: acceptance of asynchronous communication (e.g., ) came…Has it gone? – versus texting

Stakeholders Traditional division system owners system designers system builders system users Each has different goals/objectives.

Now More complex –layers of builders –layers of ownership –users doing much content generation but still necessary to recognize distinct objectives between owners and users and multiple, distinct classes of users. The ad model (grabbing eyeballs) is not new. Technologies support refined selection of target market.

Behavioral marketing Use of cookies, Web beacons, Flash sharedObject, and HTML5 localStorage means you can tracked based on behaviors. Do you mind?

Persistent storage Normal situation: no changes to client computer beyond downloaded files. cookies invented (with a pleasing name) to be files associated with each browser to be used only by same server site. –convenience: IDs and passwords, preferences, etc. –behavioral marketing! Early HTML supported cookies. localStorage is a new variation. CAUTION: Firefox requires the program to run on a server! Chrome allows running locally. p/wkshoplocalstoragetimes.htmlhttp://faculty.purchase.edu/jeanine.meyer/html5worksho p/wkshoplocalstoragetimes.html

General idea localStorage items stored as name-value pairs of text. Stays around (persists) even when browser is closed. AGAIN: associated with browser and with specific website. Do time calculation using the getTime method on Date objects. Do calculation to round to seconds. Use typeOf and also try and catch to catch errors. –No time being stored is a situation that should be detected gracefully.

Local Storage test function compute() {…} function store() {…} function remove() {…} Store time. Compute elapsed time. Remove time stored.

function compute() { var oldinfo; var newdate = new Date(); var newtime = newdate.getTime(); var elapsed; if (typeof(localStorage) == "undefined") { alert("Browser does not recognize HTML local storage."); } else { try { oldinfo= localStorage.getItem("lastused"); if (oldinfo==null) { alert("No time stored");} else { elapsed = Number(newtime)-Number(oldinfo); elapsed = Math.floor(.5+elapsed/1000); alert("Time difference: "+elapsed+" seconds.");} } catch(e) { alert("Error with use of local storage: "+e);} } return false; }

function store() { var olddate; var oldtime; if (typeof(localStorage) == "undefined") { alert("Browser does not recognize HTML local storage."); } else { try { olddate = new Date(); oldtime = olddate.getTime(); localStorage.setItem("lastused",oldtime); alert("Stored: "+oldtime+" milliseconds."); } catch(e) { alert("Error with use of local storage: "+e);} } return false; }

function remove() { if (typeof(localStorage) == "undefined") { alert("Browser does not recognize HTML local storage."); } else { localStorage.removeItem('lastused'); alert("Removed time stored."); } return false; }

More complex data Can use multiple name-value pairs. Can combine data: –use String to turn number into a string –use join to combine arrays of strings into one big string separated by a specified symbol onewall = w.join("+"); –THEN use split to take a string and split at specified symbol into array of pieces. wallstgs = swalls.split(";"); –use Number to turn string into number –See Building and storing mazes in book.

Classwork Using Chrome (or use Firefox and upload files), create your own simple localStorage application. Example (common pun on cookies): record name and name of favorite cookie.

Homework Post to Usability forum link to an article on usability check list, usability for the web, usability for mobile devices, usability heuristics AND your summary and opinion. Must be unique. Post a response to someone else's posting.