developing web applications in 2010

65
Developing web applications in 2010 Ignacio Coloma - [email protected] http://extrema-sistemas.com

Upload: ignacio-coloma

Post on 20-Jan-2015

1.780 views

Category:

Technology


1 download

DESCRIPTION

This is an introductory talk we delivered at Universidad Europea de Madrid for the International Week of Technological Innovation. We introduce concepts such as accessibility and performance in modern web development, current browser market state and evolution, and some approaches to introduce CSS3.

TRANSCRIPT

Page 1: Developing web applications in 2010

Developing web applications in 2010

Ignacio Coloma - [email protected]://extrema-sistemas.com

Page 2: Developing web applications in 2010

What?Enumerate changes and best practices

in the last ten years of web development

Page 3: Developing web applications in 2010

Why?Because your application

will be judged solely by its presentation layer.

Page 4: Developing web applications in 2010

PC specs, circa 1999

Page 5: Developing web applications in 2010

http://en.wikipedia.org/wiki/Moore's_law

Page 6: Developing web applications in 2010

Average PC 98/99

500 mHz PII / K664 MB RAM10 GB HDD

Page 7: Developing web applications in 2010

10 GB ?iPod nano: 8-16 GBiPod classic: 160 GB

http://store.apple.com

Page 8: Developing web applications in 2010

500 MHz + 64MB RAM?iPhone 3GS: 600 MHz + 256 MB RAM

Page 9: Developing web applications in 2010

HTML 4.0-4.1Developed between Apr 98 – Dec 99

Page 10: Developing web applications in 2010

Select multi

<select name="toppings" multiple="multiple" size="5"><option value="mushrooms">mushrooms</option><option value="greenpeppers">green peppers</option><option value="onions">onions</option><option value="tomatoes">tomatoes</option><option value="olives">olives</option>

</select>

Page 11: Developing web applications in 2010

Checkboxes<label><input type="checkbox" name="mushrooms"> mushrooms</label><label><input type="checkbox" name="greenpeppers"> green peppers</label><label><input type="checkbox" name="onions"> onions</label><label><input type="checkbox" name="tomatoes"> tomatoes</label><label><input type="checkbox" name="olives"> olives</label>

Page 12: Developing web applications in 2010

Two selects

Page 13: Developing web applications in 2010

Multiple Autocompleter

Page 14: Developing web applications in 2010

JavascriptJavascript in the browser is a reality

Page 15: Developing web applications in 2010

BUT

Page 16: Developing web applications in 2010

SEOGoogle can index HTML, but

it will not execute your javascript code

Page 17: Developing web applications in 2010

Browser historyUsers are familiar with the “back” button.

Page 18: Developing web applications in 2010

http://www.cenzic.com/downloads/Cenzic_AppSecTrends_Q3-Q4-2009.pdf

Security

Page 19: Developing web applications in 2010

AccessibilityWAI-ARIA: Accessible Rich Internet Applications Suite

http://www.w3.org/WAI/intro/aria

Page 20: Developing web applications in 2010

Size of the accessible market? 45 million blind people worldwide

314 million people with significant vision loss87% in developing countries

http://www.who.int/mediacentre/factsheets/fs282/en/

Page 21: Developing web applications in 2010

5 Million blind peopleAs much as the total population of Madrid

Page 22: Developing web applications in 2010

40 million vision loss31th country in the world

(bigger than Argentina, Canada, Greece or Australia)

http://en.wikipedia.org/wiki/List_of_countries_by_population

Page 23: Developing web applications in 2010

How many of you are planning to get old?

Page 24: Developing web applications in 2010

Spanish pop. > 65 compared to 15-64

http://www.oecd.org/dataoecd/17/18/35379092.pdf

Page 25: Developing web applications in 2010

Javascript librariesPrototype, JQuery, Mootools, YUI, Ext

Page 26: Developing web applications in 2010

Progressive enhancementDesign HTML onlyAdd javascript later

Page 27: Developing web applications in 2010

Old<input onchange=”foo()”>

Page 28: Developing web applications in 2010

New<input id=”price”> <script>

$('price').on('change', foo); </script>

Page 29: Developing web applications in 2010

Browser Server

Server produces this:Javascript transforms into this:

Page 30: Developing web applications in 2010

Old

<head><link type=”text/css”><script type=”text/javascript”>

</head>

<html>

</html>

<body> <div>My contents</div></body>

Page 31: Developing web applications in 2010

New

<head><link type=”text/css”>

</head>

<html>

</html>

<body> <div>My contents</div>

<script type=”text/javascript”></body>

Page 32: Developing web applications in 2010

Performance.1 to 1 sec: no feedback necessary

1 to 10 sec: add some feedback (spinners)> 10 sec: the user is no longer here

http://www.useit.com/papers/responsetime.html

Page 33: Developing web applications in 2010

Impact on revenueGoogle: +500 ms -20% traffic→

Yahoo: +400 ms -5-9% full-page traffic→Amazon: +100 ms -1% sales→

Firefox: +2 seg -15% downloads→

Evaluation performed on the front page.http://stevesouders.com/docs/wordcamp-20090530.ppthttp://blog.mozilla.com/metrics/2010/04/05/firefox-page-load-speed-–-part-ii/

Page 34: Developing web applications in 2010

Still not convinced?Starting 2010, Google has added performance

to the PageRank algorithm

http://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html

Page 35: Developing web applications in 2010

Improve performanceBy following 14 rules

http://stevesouders.com/hpws/rules.php

Page 36: Developing web applications in 2010

Measure, don't guessWhat's faster, Facebook or LinkedIn?

Page 37: Developing web applications in 2010

Measure, don't guess

http://webpagetest.org

Page 38: Developing web applications in 2010

Other toolsGoogle PageSpeed

YSlow! Firebug net tab

Page 39: Developing web applications in 2010

Best thing for performanceAim for simplicity

Page 40: Developing web applications in 2010

http://stuffthathappens.com/blog/2008/03/05/simplicity/

Page 41: Developing web applications in 2010

CSS

Photo: http://www.flickr.com/photos/cassidy/46518700/

We will talk about that, too

Page 42: Developing web applications in 2010

CSS 2.1Sept 2009

Page 43: Developing web applications in 2010

CSS 3Still a working draft

-moz-* -webkit-*

-o-*

Page 44: Developing web applications in 2010

New pseudo-classes:first-child (all but IE6):last-child (all but IE):nth-child(odd|even) (all but IE)

...maybe you see a pattern here...

http://www.quirksmode.org/css/contents.html

Page 45: Developing web applications in 2010

New attribute selectors[att=value] (all but IE6)

Page 46: Developing web applications in 2010

Rounded borders

.mystyle { border: 2px solid #888; -mox-border-radius: 16px; -webkit-border-radius: 16px; border-radius: 16px;}

Page 47: Developing web applications in 2010

box-shadow

.mystyle { -moz-box-shadow: 0 0 10px #000; -webkit-box-shadow: 0 0 10px #000; box-shadow: 0 0 10px #000;}

Page 48: Developing web applications in 2010

Lots of new selectorsborder-image, CSS transitions, text-shadow,

@font-face, CSS transforms...

http://a.deveria.com/caniuse/#agents=All&eras=All&cats=CSS3&statuses=AllPhoto: http://www.flickr.com/photos/dailypic/2168453083/

Page 49: Developing web applications in 2010

Browser market share

Page 50: Developing web applications in 2010

Chrome

http://ajaxian.com/archives/getting-users-to-upgrade-their-browsers

Page 51: Developing web applications in 2010

Internet Explorer

http://ajaxian.com/archives/getting-users-to-upgrade-their-browsers

Page 52: Developing web applications in 2010

Firefox

http://ajaxian.com/archives/getting-users-to-upgrade-their-browsers

Page 53: Developing web applications in 2010

Safari

http://ajaxian.com/archives/getting-users-to-upgrade-their-browsers

Page 54: Developing web applications in 2010

Trends

http://marketshare.hitslink.com/browser-market-share.aspx?qprid=1#

Page 55: Developing web applications in 2010

Pay attention to your audience

http://royal.pingdom.com/2010/04/16/does-internet-explorer-have-more-than-a-billion-users/http://ejohn.org/blog/determining-browser-market-share/

Stats for jquery.com (29/3/2009)

Page 56: Developing web applications in 2010

IE6 on the way out37signals, youtube, google apps, apple

Page 57: Developing web applications in 2010

Hacks for IE

Page 58: Developing web applications in 2010

IE-specific stylesheets<!--[if IE 7]><link type="text/css" href="/ie_hacks7.css" rel="stylesheet"><![endif]-->

<!--[if lte IE 6]><link type="text/css" href="/ie_hacks6.css" rel="stylesheet"><![endif]-->

http://www.quirksmode.org/css/condcom.html

Page 59: Developing web applications in 2010

IE-specific selectors/* IE 6 and below */

* html #uno { color: red }#once { _color:blue }

/* IE 7 and below */*:first-child+html #dos { color: red }#doce { *color: blue } /* or #color:blue */

/* IE 7 and above */html >body #tres { color: red }

/* IE 8 and above */html >/**/body #cuatro { color: red }

http://ajaxian.com/archives/css-browser-hacks

Page 60: Developing web applications in 2010

IE7.jsby Dean Edwardsie7.js, ie8.js, ie9.js

http://code.google.com/p/ie7-js/

Page 61: Developing web applications in 2010

HTML5<canvas>

<svg><video>, <audio>GeoLocation API

Offline applicationsClient-side storage

Web workers...etc...

Page 62: Developing web applications in 2010

FlashPoor SEONot open

Not supported on iPadOpen alternatives (HTML5, CSS3, SVG, Canvas)

Page 63: Developing web applications in 2010

Things are changingYoutube supports <video>

Google Maps 3 uses Geolocation APIGoogle Gears stalled waiting for HTML 5

http://www.flickr.com/photos/cooldesignz/1794226846/

Page 64: Developing web applications in 2010

Questions?

Page 65: Developing web applications in 2010

Thanks!

Ignacio Coloma - [email protected]://extrema-sistemas.comhttp://icoloma.blogspot.com