Top Banner
Opera Education www.opera.com/education
79
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Uni Tour Germany 11.2009

Opera Education

www.opera.com/education

Page 2: Uni Tour Germany 11.2009

ComponentsUniversity seminars

Student representatives: Opera Campus Crew

Web Standards Curriculum

Summer Internships in Norway, India and Poland: Application will open in late February, selection process from mid-March

http://www.opera.com/company/jobs/internship/

Page 3: Uni Tour Germany 11.2009

Learn more

Email [email protected]

Check out www.opera.com/education for internships, student representatives program and forums

Page 4: Uni Tour Germany 11.2009

Open standards

Patrick H. Lauke / Opera University Tour / November 2009

EMERGING TECHNOLOGIES FOR DESKTOP, MOBILE, AND CROSS-DEVICE WEB DEVELOPMENT

Page 5: Uni Tour Germany 11.2009

web evangelist at Opera

Page 6: Uni Tour Germany 11.2009

Opera – one browser on many devices

Page 7: Uni Tour Germany 11.2009

One Web means making, as far as is reasonable, the same information and services available to users irrespective of the device they are using. However, it does not mean that exactly the same information is available in exactly the same representation across all devices.

W3C Mobile Web Best Practices http://www.w3.org/TR/mobile-bp/#OneWeb

Page 8: Uni Tour Germany 11.2009

Mobile web and why it matters

Page 9: Uni Tour Germany 11.2009

what are web standards?

Page 10: Uni Tour Germany 11.2009

old-school way of making pages:

● creating markup based on how things look● defining colours, widths, etc in your page● using tables for layout

Page 11: Uni Tour Germany 11.2009

<p><font size=“+3” color=”ff0000”><b>This is a heading</b></font></p><p><font color=“555555”>Blah blah blah</font></p><p><font size=“+2” color=”00ff00”><b>A sub-section</b></font></p><p><font color=“555555”>Blah blah blah</font></p><p><font size=“+2” color=”00ff00”><b>A sub-section</b></font></p><p><font color=“555555”>Blah blah blah</font></p>

Page 12: Uni Tour Germany 11.2009

HTML should define the meaning of content:

● <h1> … <h6> for headings● <p> paragraphs● <ul> unordered (bulletpoint) lists● <ol> ordered (numbered) lists● …

At this stage we don't care what it looks like…

Page 13: Uni Tour Germany 11.2009

separation of content, presentation, behaviourusing HTML, CSS, JavaScript

Page 14: Uni Tour Germany 11.2009

<h1>This is a heading</h1><p>Blah blah blah</p><h2>A sub-section</h2><p>Blah blah blah</p><h2>A sub-section</h2><p>Blah blah blah</p>

Page 15: Uni Tour Germany 11.2009

developersmaintainability and future proofing

site ownerssmaller pages, better SEO

end-userslight-weight, interoperable, accessible

Page 16: Uni Tour Germany 11.2009

it's not all about pleasing the validator

Page 17: Uni Tour Germany 11.2009

One Web that works on all browsers, all devices

Page 18: Uni Tour Germany 11.2009

new technologies you can start using today

Page 19: Uni Tour Germany 11.2009

HTML5<!DOCTYPE html>

Page 20: Uni Tour Germany 11.2009

history of HTML5:

● started at Opera – Web Applications 1.0● Mozilla and Apple joined● W3C HTML5● Microsoft involvement

Page 21: Uni Tour Germany 11.2009

HTML5 standardises current browser and authoring behaviour

Page 22: Uni Tour Germany 11.2009

HTML5 does not replace HTML 4.01

Page 23: Uni Tour Germany 11.2009

HTML5 has more bling!

Page 24: Uni Tour Germany 11.2009

“...extending the language to better support Web applications, since that is one of the directions the Web is going in and is one of the areas least well served by HTML so far. This puts HTML in direct competition with other technologies intended for applications deployed over the Web, in particular Flash and Silverlight.”

Ian Hickson, Editor of HTML5http://lists.w3.org/Archives/Public/public-html/2009Jan/0215.html

Page 25: Uni Tour Germany 11.2009

HTML5 is umbrella term for various technologies – new markup elements, new

JavaScript APIs

Page 26: Uni Tour Germany 11.2009

new elements for more accurate semantics

Page 27: Uni Tour Germany 11.2009

HTML5 elements for a typical blog

Page 28: Uni Tour Germany 11.2009
Page 29: Uni Tour Germany 11.2009
Page 30: Uni Tour Germany 11.2009

HTML5 – unambiguous and machine readable

Page 31: Uni Tour Germany 11.2009

current and old browsers “support” these new elements

(although some need a little extra help)

Page 32: Uni Tour Germany 11.2009

Webforms – more powerful form elements

Page 33: Uni Tour Germany 11.2009

standardise commonly-usedrich form elements – without JavaScript

Page 34: Uni Tour Germany 11.2009

built-in validation(of course you should still validate on the server)

Demonstration of webforms

Page 35: Uni Tour Germany 11.2009

<canvas>

Page 36: Uni Tour Germany 11.2009

canvas = “scriptable images”

Page 37: Uni Tour Germany 11.2009

canvas has standard API methods for drawing

ctx = canvas.getContext("2d");ctx.fillRect(x, y, width, height);ctx.beginPath();ctx.moveTo(x, y);ctx.lineTo(x, y);ctx.bezierCurveTo(x1, y1, x2, y2, c1, c2);…

Demonstration of basic canvas

Page 38: Uni Tour Germany 11.2009

canvas mixing things up with external graphics

ctx = canvas.drawImage(…)

Demonstration of drawing images on canvas

Page 39: Uni Tour Germany 11.2009

canvas accessibility concerns

Page 40: Uni Tour Germany 11.2009

canvas appropriate use for enhanced visuals, special effects – not pure content

Demonstration: http://www.filamentgroup.com/examples/charting_v2/

Page 41: Uni Tour Germany 11.2009

<video>

Page 42: Uni Tour Germany 11.2009

<object width="425" height="344"><param name="movie"

value="http://www.youtube.com/v/9sEI1AUFJKw&hl=en&fs=1&"></param>

<param name="allowFullScreen" value="true"></param>

<param name="allowscriptaccess" value="always"></param>

<embed src="http://www.youtube.com/v/9sEI1AUFJKw&hl=en&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

Page 43: Uni Tour Germany 11.2009

<video src="video.ogv" controls autoplay poster="poster.jpg" width="320" height="240"> <a href="video.ogv">Download movie</a></video>

Page 44: Uni Tour Germany 11.2009

video as native object...why is it important?

● “play nice” with rest of the page● keyboard accessibility built-in● API for controls

Demonstration of video in Presto 2.4

Page 45: Uni Tour Germany 11.2009

video format debates – MP4 vs OGG Theora

<video controls autoplay poster="…" width="…" height="…"><source src="movie.ogv" type="video/ogg" /><source src="movie.mp4" type="video/mp4" /><!-- fallback content -->

</video>

still include fallback for old browsershttp://camendesign.com/code/video_for_everybody

Page 46: Uni Tour Germany 11.2009

video on any device without plugins?

Page 47: Uni Tour Germany 11.2009

and many more...(geolocation, drag and drop, web workers, offline support, storage)

Page 48: Uni Tour Germany 11.2009

SVG scalable vector graphics

Page 49: Uni Tour Germany 11.2009

SVG can be written by hand (if you must)

<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN""http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" version="1.1">

<rect x="" y="" width="" height=""/><circle cx="" cy="" r=""/><ellipse cx="" cy="" rx="" ry=""/><line x1="" y1="" x2="" y2=""/><polyline points="x1,y1,x2,y2,..." /><polygon points="x1,y1,x2,y2,..." /></svg>

http://www.w3.org/TR/SVG11/

Page 50: Uni Tour Germany 11.2009

SVG complex images exportable from vector graphics apps (InkScape, Adobe Illustrator, ...)

Page 51: Uni Tour Germany 11.2009

SVG maintains its own DOM and is scriptable

Demonstration of SVG

Page 52: Uni Tour Germany 11.2009

SVG in OBJECT, CSS and IMG element*native inclusion in HTML5?

*only in Opera at the moment

Page 53: Uni Tour Germany 11.2009

SVG or canvas?

Page 54: Uni Tour Germany 11.2009

CSS3 for better design control

Page 55: Uni Tour Germany 11.2009

@font-face – good typography on the web

@font-face { font-family: "MyFont"; src: url(myfont.ttf)}…

body {font-family: "MyFont", … sans-serif;

}

Demonstration of webfonts

Page 56: Uni Tour Germany 11.2009

@font-face solves issue of making images of text, using image replacement, sIFR, …

Page 57: Uni Tour Germany 11.2009

@font-face still issues with font foundries – check licenses

Page 58: Uni Tour Germany 11.2009

mediaqueries – adaptable designs

Page 59: Uni Tour Germany 11.2009

CSS 2.1 Media Types:

<link rel="stylesheet" ... media="print, handheld" href="...">@import url("...") print;@media print { // insert CSS rules here}

Page 60: Uni Tour Germany 11.2009

CSS 3 Media Queries:

● Build and extend CSS 2.1 Media Types● More granular control of capabilities● width, height, orientation, color, resolution, …

http://www.w3.org/TR/css3-mediaqueries/

Page 61: Uni Tour Germany 11.2009

CSS 3 Media Queries:

@media screen and (max-device-width: 480px) { // insert CSS rules here

}Demonstration of Media Queries

Page 62: Uni Tour Germany 11.2009

and many more...

Page 63: Uni Tour Germany 11.2009
Page 64: Uni Tour Germany 11.2009

widgets reuse web standards

Page 65: Uni Tour Germany 11.2009

Widgets – standardised app development filled with web standards goodness

Page 66: Uni Tour Germany 11.2009

Vodafone

For a large catalogue of apps – the browser run-time is perfect...

Then you’re out of writing for Windows Mobile, Android, S60, each of which require testing...we want to abstract that.

All the cool innovation is happening inside the browser – you don’t need to write to the native operating system anymore.

Source: Mobile Entertainment Market (mocoNews), June, 2009

Page 67: Uni Tour Germany 11.2009

widgets on desktop, mobile...and on TV

Page 68: Uni Tour Germany 11.2009

Anatomy of a widget

index.html + config.xml

Page 69: Uni Tour Germany 11.2009

Configuration file

<widget> <widgetname>MyFirstWidget</widgetname> <description>A demo widget</description> <icon>images/widget.png</icon> <width>320</width> <height>240</height></widget>Demonstration of basic widget

Page 70: Uni Tour Germany 11.2009

Opera tools to help develop widgets:

Opera Dragonflyhttp://www.opera.com/dragonfly/

Widget emulatorhttp://dev.opera.com/articles/view/widget-emulator/

Opera LABS buildhttp://dev.opera.com/articles/view/opera-desktop-widgets-evolved/

Page 71: Uni Tour Germany 11.2009

Opera Unite

• Powerful platform that turns your Web browser into a Web server:

– Share content directly without having to upload anything to a Web site.

– Stream music, show photo galleries, share files and folders or even host your Web pages.

Page 72: Uni Tour Germany 11.2009

• Traditional data sharing

Sharing with Opera Unite is different

• Data sharing with Opera Unite

Page 73: Uni Tour Germany 11.2009

Opera Unite Applications

Media PlayerAccess your complete home music library from wherever you are.

File InboxAllow files to be uploaded to your computer, by you or your friends, from anywhere.

Photo SharingShare your personal photos with friends around the world without the need to upload them.

Web Server

Host your Web sites running from your own computer.

MessengerCommunicate with your friends in My Opera in a one-to-one, live session.

Fridge

Enjoy fun notes left on your computer by friends.

File SharingShare files directly from your computer easily and safely.

Invite your friends to a chat in The Lounge hosted on your computer.

The Lounge

Page 74: Uni Tour Germany 11.2009

Based on powerful APIs and open Web standards:

• Easy to create and accessible from every Web browsing platform:– Reuse your HTML, CSS and JavaScript skills

• Applications can be submitted to Opera’s online catalog– http://unite.opera.com/applications/

• Documentation– http://unite.opera.com/develop/

Write your own Opera Unite applications

Page 75: Uni Tour Germany 11.2009

Are YOU up to the challenge? Opera Software invites you to develop an Opera Unite application:

• Win mobile phones and Opera gear• Make a new Unite application or improve upon an existing application• Submit your application online and email [email protected] with:

– Name

– University

– Name of your application

Criteria, rules and resources to get started

http://unite.opera.com/develop

Opera Unite challenge!

Page 76: Uni Tour Germany 11.2009

call to arms action

Page 77: Uni Tour Germany 11.2009

Opera Web Standards Curriculum

Page 78: Uni Tour Germany 11.2009

Web Standards Curriculumwww.opera.com/wsc

University Tour blogmy.opera.com/universitytours/blog

Developer resourceswww.opera.com/developer