The road to professional web development


Published on

My presentation in Taiwan about the history of web development and what practices make sense and got followed in the YUI.

Published in: News & Politics, Technology
  • Learning Web App Development ---
    Are you sure you want to  Yes  No
    Your message goes here
  • Learning Web Design: A Beginner's Guide to HTML, CSS, JavaScript, and Web Graphics ---
    Are you sure you want to  Yes  No
    Your message goes here
  • Web Design with HTML, CSS, JavaScript and jQuery Set ---
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

The road to professional web development

  1. 1. The road to professional web development Christian Heilmann | | Taipeh, Taiwan, April 2009
  2. 2. Hello and thank you for being here.
  3. 3. I am Chris...
  4. 4. ...and today I will talk about the road to professional web development.
  5. 5. You cannot look forward without learning from the mistakes of the past.
  6. 6. Otherwise you are very likely to repeat them.
  7. 7. So let’s take a look at the past of web development.
  8. 8. The Dark Ages
  9. 9. In the beginning there was HTML.
  10. 10. It structured text into headings, lists and paragraphs and linked documents with each other using anchors.
  11. 11. This was good, and quite a revolution...
  12. 12. ...but also very, very boring.
  13. 13. People wanted colours, different types of text, borders and images.
  14. 14. Which lead to the next step.
  15. 15. The first mistake: Presentational Markup
  16. 16. Adding bgcolor, color, <font>, border, hspace, vspace,float and all other presentational HTML allowed us to style the document.
  17. 17. It doesn’t allow you to style a whole site though.
  18. 18. If the design of the site changes, you needed to change each document of it.
  19. 19. However, as sites were small this was not a problem – yet.
  20. 20. Design was still limited to a single column.
  21. 21. Until people realised that you can use the <table> element to create multi-column layouts.
  22. 22. And it was *so* easy.
  23. 23. ..if you knew all the problems that different browsers have with showing the table properly.
  24. 24. <table width=quot;500quot; border=quot;0quot;> <tr> <td width=quot;1quot; bgcolor=quot;blackquot;><img src=quot;spacer.gifquot; width=quot;1quot; height=quot;1quot; alt=quot;quot;></td> <td width=quot;10quot; bgcolor=quot;blackquot;><img src=quot;spacer.gifquot; width=quot;10quot; height=quot;1quot; alt=quot;quot;></td> <td width=quot;118quot; bgcolor=quot;blackquot;><img src=quot;spacer.gifquot; width=quot;118quot; height=quot;1quot; alt=quot;quot;></td> <td width=quot;10quot; bgcolor=quot;blackquot;><img src=quot;spacer.gifquot; width=quot;10quot; height=quot;1quot; alt=quot;quot;></td> <td width=quot;300quot; bgcolor=quot;blackquot;><img src=quot;spacer.gifquot; width=quot;350quot; height=quot;1quot; alt=quot;quot;></td> <td width=quot;10quot; bgcolor=quot;blackquot;><img src=quot;spacer.gifquot; width=quot;10quot; height=quot;1quot; alt=quot;quot;></td> <td width=quot;1quot; bgcolor=quot;blackquot;><img src=quot;spacer.gifquot; width=quot;1quot; height=quot;1quot; alt=quot;quot;></td> </tr> <tr> <td width=quot;1quot; rowspan=quot;3quot; bgcolor=quot;blackquot;><img src=quot;spacer.gifquot; width=quot;1quot; height=quot;1quot; alt=quot;quot;></td> <td width=quot;1quot; rowspan=quot;2quot;><img src=quot;spacer.gifquot; width=quot;10quot; height=quot;10quot; alt=quot;quot;></td> <td width=quot;1quot; colspan=quot;3quot;><img src=quot;spacer.gifquot; width=quot;1quot; height=quot;10quot; alt=quot;quot;></td> <td width=quot;1quot; rowspan=quot;2quot;><img src=quot;spacer.gifquot; width=quot;10quot; Navigation Content height=quot;10quot; alt=quot;quot;></td> <td width=quot;1quot; rowspan=quot;3quot; bgcolor=quot;blackquot;><img src=quot;spacer.gifquot; width=quot;1quot; height=quot;1quot; alt=quot;quot;></td> </tr> <tr> <td>Navigation</td> <td></td> <td>Content</td> </tr> <tr> <td colspan=quot;5quot;><img src=quot;spacer.gifquot; width=quot;1quot; height=quot;10quot; alt=quot;quot;></td> </tr> <tr> <td rowspan=quot;7quot;><img src=quot;spacer.gifquot; width=quot;1quot; height=quot;1quot; alt=quot;quot;></td> </tr> </table>
  25. 25. Also: what do you need to do when the navigation has to move to the right?
  26. 26. The solution was to separate the presentation from the structure.
  27. 27. CSS
  28. 28. CSS allowed you to define the look and feel in a much more detailed manner.
  29. 29. CSS is defined once and applied to as many documents as you want.
  30. 30. So moving a navigation meant changing a single file.
  31. 31. However, the problem was that developers wanted more and more and the standards took too long to agree on.
  32. 32. Browser Wars
  33. 33. As browser makers were in fierce competition this lead to non-standard extensions to both HTML and CSS.
  34. 34. This, together with more and more support for JavaScript in browsers lead to another dark period of web development.
  35. 35. DHTML Hell
  36. 36. Using DHTML (JavaScript controlling visual changes in the document) we went nuts.
  37. 37. Moving and scrolling and JavaScript dependent navigations.
  38. 38. Blink, Flicker, Crash.
  39. 39. The biggest issue was that we tried to support every browser the same way.
  40. 40. Which is why one group stood up and put a stake in the ground.
  41. 41. WaSP – to hell with bad browsers.
  42. 42. The work of the WaSP and many individual trainers, writers and developers made web standards a good idea to follow and understand.
  43. 43. Which made a lot of sense.
  44. 44. As the first .com bubble collapsed people spent much less money on silly web sites.
  45. 45. Instead, they wanted easy to maintain, extend and change web sites.
  46. 46. This meant also that people didn’t want JavaScript solutions any more.
  47. 47. We did our best to make people understand that – used the right way – JavaScript is not evil.
  48. 48. Unobtrusive JavaScript
  49. 49. unobtrusive-javascript/
  50. 50. However, the painful memories of DHTML hell were still hard to forget.
  51. 51. Until the next revolution came.
  52. 52. var request; try{ request = new XMLHttpRequest(); AJAX }catch(error){ try{ request = new ActiveXObject(quot;Microsoft.XMLHTTPquot;); }catch(error){ return true; } }'get',this.href,true); request.onreadystatechange=function(){ if(request.readyState == 1){ output.innerHTML='loading...'; } if(request.readyState == 4){ if (request.status && /200|304/.test(request.status)) { retrieved(request); } else{ failed(request); } } }
  53. 53. Ajax meant that web sites are fast, easy to use and highly interactive.
  54. 54. And it works by using JavaScript.
  55. 55. The new interest in JavaScript helped us go out to the world and tell it how you can use JavaScript together with web standards and create amazing experiences.
  56. 56. To make this work, we needed a buzzword for “new JavaScript”
  57. 57. DOM Scripting
  58. 58. However, the idea of unobtrusive scripting and web standards development became a bit forgotten because of yet another revolution.
  59. 59. WEB 2.0
  60. 60. WEB 2.0 meant that users are creating the web they use.
  61. 61. Everything had to be highly interactive and Ajax is not even a nice-to-have but a main goal.
  62. 62. So this is where we are.
  63. 63. The mess we have to deal with.
  64. 64. The Ajax revolution and the Web 2.0 move set high expectations.
  65. 65. Users expect web sites to be highly responsive and working like real applications.
  66. 66. However, we are still working in browsers and on the web.
  67. 67. Ajax driven web sites do not reload the whole document.
  68. 68. This breaks a lot of things.
  69. 69. No bookmarking. No back button. No interaction with assistive technology.
  70. 70. To make our products work, we need to know a lot of things:
  71. 71. the technologies how browsers fail supporting them how users interact with systems what people use
  72. 72. The problem is that most likely you won’t have the time to do all that.
  73. 73. The other problem is that as individuals we are likely to find solutions for our problems but not for all of the possible ones.
  74. 74. For this, we need to collaborate and compare our findings.
  75. 75. We also need to be careful not to repeat the mistakes of the past.
  76. 76. Working on a solid base
  77. 77. It is not about technology.
  78. 78. You do not work to satisfy browsers.
  79. 79. Standards only make sense when they offer an easier way of achieving a goal and if they have support in the real world.
  80. 80. As a developer, you should work first and foremost for the user of your products.
  81. 81. The second most important person to work for is the developer that takes over from you.
  82. 82. The easier the interface, the more people will use it.
  83. 83. In order to make web development a professional choice we need to act like professionals.
  84. 84. This means that instead of getting excited about hacks and quick solutions we should concentrate on other goals.
  85. 85. Does it work for everybody? Is it easy to change? Is it a smooth experience? Does it make it easier for users to do what they want to do?
  86. 86. Here’s the good news: we are almost there.
  87. 87. Web development libraries like jQuery, prototype, mootools, Dojo, YUI... are there to help you do your job.
  88. 88. These libraries are all open for you to feed back problems and contribute solutions.
  89. 89. They are a much sturdier base to build on than browsers and their current documentation.
  90. 90. One base to work from is YUI:
  91. 91.
  92. 92. The Yahoo User Interface library was build to make it easier for Yahoo developers to build our products.
  93. 93. Working with as many locations, products and people as Yahoo does it is the only way to keep a constant high quality.
  94. 94. With that many developers at hand we were able to build a great library based on solid principles.
  95. 95. When we build products, we test them with users and see what they want.
  96. 96. Analyzing this we came up with usage patterns, which are available to you.
  97. 97.
  98. 98. They even come with stencils for your designers.
  99. 99.
  100. 100. One thing we needed to do is to define what browsers to support and what “support” means.
  101. 101.
  102. 102. Support is not giving every browser the same experience.
  103. 103. It means using what the browser can reliably do and not making it reach what it cannot do.
  104. 104. This is the main principle of progressive enhancement.
  105. 105. We must build products that work, and only work more smoothly when the browser in use allows for it.
  106. 106. Without JavaScript With JavaScript
  107. 107. Without JavaScript With JavaScript
  108. 108. We used the design pattern information and built widgets that work this way.
  109. 109. We test them across the supported browsers to make sure they work.
  110. 110.
  111. 111. Using these, you can build applications that work across all the browsers supported by the GBS.
  112. 112. We provide the bricks, you build the product.
  113. 113. All of the widgets can be extended and styled the way you want them to.
  114. 114.
  115. 115. You can extend the widgets by listening for events that happen to them.
  116. 116. ac_basic_xhr_log.html
  117. 117. If you don’t want to use the widgets, you can use the helper libraries that we use to build the widgets.
  118. 118. These do the same thing, but on a code level. They make web standards work across browsers (DOM support, event handling).
  119. 119. If all you need is creating CSS layouts that work across browser land, there’s that, too.
  120. 120. Even for *very* lazy developers:
  121. 121. One other thing we do is make web development less random by providing testing tools.
  122. 122. All of this is open source, fully documented and you can either host it yourself or get it from a high speed distributed network (even Google’s).
  123. 123. Practices we follow: Progressive enhancement Standards compliance Code validation (JSLint) Extensibility Modularisation Documentation
  124. 124. Even if you don’t want to use anything we offer, these are good ideas to use in your work.
  125. 125. Don’t become a part of the group of developers that leave behind unmaintainable products.
  126. 126. Another thing to consider is how your products perform.
  127. 127. Fast and smooth products make users happy.
  128. 128. There’s a lot of good information available at the exceptional performance site.
  129. 129.
  130. 130. All of which can be tested using YSlow.
  131. 131. One final thing we’re working on a lot is accessibility.
  132. 132. This is all I have time for today, so thanks again. Check out the bookmarks on the last page for lots of good tutorials and documents.
  133. 133. Two of mine were even translated: enhancement-gracefully-degrade-82.html
  134. 134. Two of mine were even translated:
  135. 135. THANKS! Christian Heilmann