Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Jsday

760 views

Published on

  • Be the first to comment

  • Be the first to like this

Jsday

  1. 1. BREAKING OUT OF THE ENDLESS CALLBACK LOOP CHRIS HEILMANN (@CODEPO8), JSDAY 2015, VERONA, ITALY
  2. 2. @codepo8 Chris Heilmann
  3. 3. @codepo8 Chris Heilmann• Web Developer since ~1997 • Wrote first book about JavaScript *and* AJAX ten years ago. • Delivered many large projects, including Yahoo Search, Maps • Worked on YUI • Worked on Firefox OS • Now working at Microsoft helping with the most important change the web needs
  4. 4. BACK TO MY OLD HAUNTS…
  5. 5. JAVASCRIPT IS THE HOT THING RIGHT NOW! SO, WELL DONE, YOU CHOSE THE RIGHT EVENT. (PROMOTIONS ALL AROUND)
  6. 6. BEING WANTED IS A GREAT FEELING.
  7. 7. WITH A LOT OF EXCITEMENT AND DEMAND ALSO COMES A LOT OF STRESS.
  8. 8. IT IS EASY TO GET THE IMPRESSION THAT YOU’RE FALLING BEHIND.
  9. 9. ++CALM;
  10. 10. --WORRY;
  11. 11. JAVASCRIPT IS… • An incredibly versatile language • Available web-wide and across many platforms • Toolset independent • Forgiving and inviting
  12. 12. YOU CAN USE JAVASCRIPT… • In browsers on the web • On the server • In applications • To access services • As a data format (JSON) • On hardware • … your turn, surprise me :)
  13. 13. ALLOW ME TO TAKE YOU BACK IN TIME FOR A MOMENT…
  14. 14. WHEN CHRIS MET JAVASCRIPT… • Form validation • Image rollovers • Popup windows (with dynamic framesets and inter-window communication) • DHTML (document.all or document.layers?)
  15. 15. !PLAYTIME http://www.onlinetools.org/articles/unobtrusivejavascript/
  16. 16. WHEN THINGS GOT INTERESTING… • Standardised DOM • Event Model • Development Tools (Firebug, Error Console)
  17. 17. WHEN WE STARTED BREAKING THE WEB PROPERLY… • AJAX • Library Wars • Framework Dependencies • Fixing browser problems with shims and libraries
  18. 18. THINGS THAT NEVER CHANGED… (AND STILL ARE THE SAME) • JavaScript is *not* fault tolerant like CSS or HTML are • JavaScript should be used as an enhancement of sturdy, semantically valuable and working web content • JavaScript can not be trusted to be available • Not all browsers are born equal.
  19. 19. BACK TO THE NOW…
  20. 20. OUR DEVELOPMENT ENVIRONMENT IS INCREDIBLE! • Developer tools in browsers are outstanding and give us incredible insights. • We can debug across devices and even convert HTML5 to native apps for closed systems (manifold.js/ volon.js). • Editors have linting, build integration, and some are even written in JavaScript and run in the browser. • We share code on GitHub and help debug problems using JSFiddle, JSBin and others…
  21. 21. ALAS…
  22. 22. ON THE CLIENT, PROGRESSIVE ENHANCEMENT IS STILL YOUR BEST BET!
  23. 23. CAPABILITY TESTING MEANS YOU NEVER DELIVER BROKEN EXPERIENCES.
  24. 24. “CUTTING THE MUSTARD” https://justmarkup.com/log/2015/02/26/cut-the-mustard-revisited/
  25. 25. SETTING YOUR BASELINE…
  26. 26. EXTENDING THE BASELINE
  27. 27. CAPABILITY TESTING ALSO ISN’T BULLET PROOF… • False positives are possible • You can’t assume that support of one feature means another also works • Experimental technology is hard to test for • You need to stay up-to-date
  28. 28. WHAT ABOUT POLYFILLS?
  29. 29. POLYFILLS ARE GREAT… • Building solutions now using tech of tomorrow • Allowing developers to write code now without waiting for standards bodies to catch up • Fixing browser inconsistencies during the adoption period • Allowing developers to concentrate on the solutions rather than the tech that enables them
  30. 30. POLYFILLS ARE NOT SO GREAT…
  31. 31. POLYFILLS ARE NOT SO GREAT… • We become dependent on them • They give performance hungry functionality to outdated environments • They need to keep up with changes in the specs, too. • They tend to stay in non-maintained projects and add to the landfill of unnecessary JS.
  32. 32. POLYFILLS AS A SERVICE! https://cdn.polyfill.io/v1/docs/
  33. 33. IF YOU’RE NOT ON THE WILD, WILD WEB IN A CLIENT - GO NUTS! • JavaScript in a fixed, defined environment (app platform, add-ons, plugins) • JavaScript server-side • JavaScript as a conversion target
  34. 34. BUT, WHAT ABOUT THE FUTURE OF JAVASCRIPT?
  35. 35. “JAVASCRIPT HAS A HYPE-FUELLED COMMUNITY.” https://www.youtube.com/watch?v=6tgbrN0vyec ES6 vs Today by Andrea Giammarchi @ FEDLondon
  36. 36. WE’RE VERY EXCITED ABOUT EVERYTHING… • If it is new, it must be better! • We want to have it now, maybe even yesterday. • A use case will come, let’s just build the thing first. • If there isn’t a problem, let’s come up with one.
  37. 37. https://medium.com/@PitaJ/the-most-convoluted-api-40d8f7bc4176
  38. 38. THIS IS TOTALLY OK AND VERY NECESSARY. (AND THIS EVENT IS FULL OF CONTENT LIKE THIS)
  39. 39. LET’S BE INSPIRED INSTEAD OF FRUSTRATED BY THESE THINGS… WE’RE PREPARING FOR THE FUTURE.
  40. 40. WHAT IF CAPABILITY TESTING IS NOT ENOUGH?
  41. 41. ES6 AND NEWER VERSIONS OF THE LANGUAGE HAVE SYNTAX CHANGES.
  42. 42. ES6 SUPPORT IN THE WILD… http://kangax.github.io/compat-table/es6/
  43. 43. HELP TESTING! https://github.com/tc39/test262 http://test262.ecmascript.org/
  44. 44. WE COULD START WITH A LANGUAGE THAT CONVERTS TO ES5…
  45. 45. WE CAN ALSO TRANSPILE TO ES5…
  46. 46. FORCING THE FUTURE? • We can use all kind of tricks to make the JS capabilities of tomorrow available today. • The issue is that we’re leapfrogging innovation - and in some cases even slow down native adoption.
  47. 47. FORCING THE FUTURE? • We run the danger of turning our patches into dependencies. • We make resource hungry code run in outdated environments.
  48. 48. WHAT IF WE COULD APPLY CAPABILITY TESTING AND TRANSPILE ON DEMAND?
  49. 49. TESTING FEATURES, DELIVERING WIN. https://featuretests.io/
  50. 50. BEST OF BOTH WORLDS? AND THAT FROM A MAN WHO IS GOING TO TELL YOU TO “BREAK THE BROKEN WEB” !
  51. 51. HERE’S THE THING… • The unknown client web is what brought us here. • It isn’t going to go away - it would be terrible if it did. • This doesn’t stop us from innovating the language as we have dozens of new paths to use it.
  52. 52. THE TRICK IS TO EMBRACE THE FACT THAT DESPITE USING ONE LANGUAGE…
  53. 53. …WE WORK IN DIFFERENT ENVIRONMENTS AND TOWARDS DIFFERENT GOALS. • Adaptive and responsive web sites • Games • Apps • Servers • Robots • Drones • …
  54. 54. IN THE END, WE ALL DELIVER TO OUR USERS…
  55. 55. AS FOR ME…
  56. 56. BY FAR THE #1 REASON I GOT FROM WEB DEVELOPERS NOT EMBRACING NEW WEB TECHNOLOGY: WE NEED TO SUPPORT INTERNET EXPLORER!
  57. 57. AND I AM HAPPY TO REPORT, THAT WE ARE WELL ON THE WAY OF MAKING THIS ISSUE GO AWAY. DEV.MODERN.IE
  58. 58. CLEANING UP IS A VERY REWARDING THING…
  59. 59. DO WHAT MAKES YOU HAPPY - WITHOUT HINDERING OTHERS IN THE SAME ENDEAVOUR
  60. 60. Chris Heilmann christianheilmann.com @codepo8 GRAZIE!

×