SlideShare a Scribd company logo
10 Years of JavaScript
what I’ve learnt so far
10 Years of Javascript
                 Brief introduction of me personally, where
                 I started (PHP), accomplishments and
                 professional career errata

 Who am I?              A run-through the history of professional Javascript usage
                        and the evolution of the Web Developer profession. From
                        browsers to ECMA to Ajax to libraries and commercialisation
 10 Years Ago...                                 Main pattern is the continuous struggle on delegation of logic;
                                                 what should be done on the client side and what on the ser ver?
                                                 Discussion goes BEYOND processing power of clients
 Frontend vs. Backend
                                              Dive deeper in more patterns that are more technical
 Other Recurring Patterns
 End of Part I   Conclusion about what I’ve really learnt the past ten yrs,
                 including me being happy about community growth!
                 #amsterdamjs rules!
Who am I?

                                    Small joke about definitely not being a nerd ;)
Geek
                                          Talk about ZMG, big for Mambo and J!, no JS at that
Started with PHP                          time, only small DHTML stuff



Landed a job (quit school!)                          Talk about university - art, sociology, psychology, etc. and future
                                                     prospects in that area :(
                                                     Learnt that there’s never enough time!

A very happy man :)
                                                     Job at eBuddy and first serious JS work, built clients, framework,
                                                     Javeline, Ajax.org



     Girlfriend
     Sailing whenever I can
     Made profession out of hobby
     Doing puzzles > 40hrs a week
No dashes, because it screws up my presentation! :P




Frontend vs. Backend
                         Describe evolving systems in hardware/ computing power


Power struggle                     Flash leads the way - clients can do a lot
                                   Sandboxing holds back innovation
                                   Delay: dotcom boom slowed down innovation
Richer clients                     Browser wars back on track (finally...)!!


                                                                                           Describe transition
Backend: from power horse to data cloud                                                    Dissimulation of MVC pattern -
                                                                                           exemplify!


Frontend: from dumb terminal to rich platform
Driven by innovation
            Innovation (re)sets the balance
            cloud? rich client? parallel computing? JIT’ed JS?
Other Recurring Patterns

                                       Javascript vs. ECMA vs. JScript and x-browser incompatibilities


Fixing the browser
                                         Lots of talk about it, blogosphere hot about it AFTER Ajax was coined.
Object Oriented JS
Big Boom of the ‘frameworks’                                    Combine the above 2 points: frameworks are born.



WTFJS.com
      Nice display and proof why frameworks exist and
      are still needed.
      With HTML5 even more pressure will be on
O.R.P. - Fixing the browser
                       Extending native objects - decorator pattern
                       Bringing Ruby to JS
                       OO pattern implementation

 PrototypeJS           Scriptaculous made it big




 MochiKit
               Don’t know much about it, it was big enough


             Odd one out - proprietary UI-centric client-side framework with a
 Backbase    declarative API (XML)
             Tries to fix a whole other spectrum of problems


 NO, not JQuery...not yet...
O.R.P. - Object Oriented JS
                                      What’s so nice about OO? Scholars-programmers were taught to think
                                      in terms of objects
                                      Inheritance considerations (classes, modules, packages, namespaces)
                                      Big server-side and desktop app languages are OO

 Paradigm: getting OO features in JS  Prototypal inheritance not often understood - odd bite to it




 Edwards’ Base.js           Show example



 Stephenson’s Prototype
 Crockford: “I now see my early attempts to support the classical model in
 JavaScript as a mistake”

 NO, still not JQuery...not yet...                         Hehe...
O.R.P. - Object Oriented JS
   var Animal = Base.extend({
     constructor: function(name) {
       this.name = name;
     },
     
     name: "",
     
     eat: function() {
       this.say("Yum!");
     },
     
     say: function(message) {
       alert(this.name + ": " + message);
     }
   });
   var Cat = Animal.extend({
     eat: function(food) {
       if (food instanceof Mouse) this.base();
       else this.say("Yuk! I only eat mice.");
     }
   });
     
   var Mouse = Animal.extend();
O.R.P. - Object Oriented JS
                                   What’s so nice about OO? Scholars-programmers were taught to think
                                   in terms of objects
                                   Inheritance considerations (classes, modules, packages, namespaces)
                                   Big server-side and desktop app languages are OO

 Paradigm: getting OO features in JS
                                   Prototypal inheritance not often understood - odd bite to it




 Edwards’ Base.js
 Stephenson’s Prototype              Show example



 Crockford: “I now see my early attempts to support the classical model in
 JavaScript as a mistake”

 NO, still not JQuery...not yet...                      Hehe...
O.R.P. - Object Oriented JS
  var Person = Class.create();
  Person.prototype = {
     initialize: function(name) {
        this.name = name;
     },
     say: function(message) {
        return this.name + ': ' + message;
     }
  };

  var guy = new Person('Miro');
  guy.say('hi');
  // -> "Miro: hi"

  var Pirate = Class.create();
  // inherit from Person class:
  Pirate.prototype = Object.extend(new Person(), {
    // redefine the speak method
    say: function(message) {
      return this.name + ': ' + message + ', yarr!';
    }
  });

  var john = new Pirate('Long John');
  john.say('ahoy matey');
  // -> "Long John: ahoy matey, yarr!"
O.R.P. - Object Oriented JS             What’s so nice about OO? Scholars-programmers were taught to think
                                        in terms of objects
                                        Inheritance considerations (classes, modules, packages, namespaces)
                                        Big server-side and desktop app languages are OO
                                        Prototypal inheritance not often understood - odd bite to it



 Paradigm: getting OO features in JS
 Edwards’ Base.js
 Stephenson’s Prototype
 Crockford: “I now see my early attempts to support the classical model in
 JavaScript as a mistake”

 NO, still not JQuery...not yet...                    Hehe...
O.R.P. - Big Boom of ‘frameworks’
                                                           Combination of Fixing the browser and OO in JS
                                                           DOMReady
                                                           CSS3 Selectors
                                                           Widgets - ready-made packages of functionality: OpenRico
                                                           Dojo, Qooxdoo as Open Source
                                                           Bindows, Backbase, Tibco as proprietary


 No list here, ‘cause it’s infinite...almost
 Reasoning
 YES, now JQuery is among us!
                                                  Explain JQuery’s success
 The power of extensibility                       Is it a framework?



 Performance      Separate slide on Performance
                  (stuff I’ve learnt about it)
Performance

Minimize the AMOUNT of HTTP requests
Modularize
              Show next slide (example)




Function calls are expensive/ avoid recursion
Lookups are expensive
Performance
 fab = {};

 (function(global) {
     var a = 1,
         b = 2;

     global.fab.newModule = {
         getA: function() {
             return a;
         },
         setA: function(newA) {
             a = newA;
         },
         getB: function() {
             return b;
         },
         setB: function(newB) {
             b = newB;
         },
         getSum: function() {
             return a + b;
         }
     };
 })(this);
Performance

Minimize the AMOUNT of HTTP requests
Modularize
Function calls are expensive/ avoid recursion
Lookups are expensive
End of Part 1

 Conclusion
 Questions?
 Follow me @mikedeboer
 Find me @amsterdamjs ;)
Ad

Recommended

Your java script library
Your java script library
jasfog
 
Simply - OOP - Simply
Simply - OOP - Simply
Thomas Bahn
 
Dependency Injection
Dependency Injection
ColdFusionConference
 
All of Javascript
All of Javascript
Togakangaroo
 
All of javascript
All of javascript
Togakangaroo
 
Ruby object model
Ruby object model
mbeizer
 
Everything You Were Taught About Java Is Wrong
Everything You Were Taught About Java Is Wrong
Tim Boudreau
 
Oop Article Jan 08
Oop Article Jan 08
Ganesh Samarthyam
 
Lapurdi Fisikoa
Lapurdi Fisikoa
gandabost
 
Araba Fisikoa
Araba Fisikoa
gandabost
 
Araba Kulturala
Araba Kulturala
gandabost
 
Lapurdi Kulturala
Lapurdi Kulturala
gandabost
 
2010 Winter Olympics and Signiant
2010 Winter Olympics and Signiant
Signiant
 
Real Cost of Physical Media Distribution
Real Cost of Physical Media Distribution
Signiant
 
Euskalerria, Bizkaia Eta Zuberoa
Euskalerria, Bizkaia Eta Zuberoa
gandabost
 
Araba Fisikoa
Araba Fisikoa
gandabost
 
Euskalerria, Bizkaia Eta Zuberoa
Euskalerria, Bizkaia Eta Zuberoa
gandabost
 
Jungleanimals
Jungleanimals
lauvio
 
Euskal Herria (Gipuzkoak Eta Nafarroa)Poli Fisikoa Eta Kulturala
Euskal Herria (Gipuzkoak Eta Nafarroa)Poli Fisikoa Eta Kulturala
gandabost
 
Optimizing Your WAN Bandwidth Has Immediate ROI
Optimizing Your WAN Bandwidth Has Immediate ROI
Signiant
 
Signiant Overview Fall 2010
Signiant Overview Fall 2010
Signiant
 
Signiant Overview
Signiant Overview
Signiant
 
Signiant Overview
Signiant Overview
Signiant
 
Content Supply Chain Management White Paper
Content Supply Chain Management White Paper
Signiant
 
Ajax Tutorial
Ajax Tutorial
oscon2007
 
Choosing Javascript Libraries to Adopt for Development
Choosing Javascript Libraries to Adopt for Development
Edward Apostol
 
Architecting non-trivial browser applications (Jazoon 2012)
Architecting non-trivial browser applications (Jazoon 2012)
Marc Bächinger
 
Women Who Code, Ground Floor
Women Who Code, Ground Floor
Katie Weiss
 
Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)
Addy Osmani
 
Building Rich User Experiences Without JavaScript Spaghetti
Building Rich User Experiences Without JavaScript Spaghetti
Jared Faris
 

More Related Content

Viewers also liked (16)

Lapurdi Fisikoa
Lapurdi Fisikoa
gandabost
 
Araba Fisikoa
Araba Fisikoa
gandabost
 
Araba Kulturala
Araba Kulturala
gandabost
 
Lapurdi Kulturala
Lapurdi Kulturala
gandabost
 
2010 Winter Olympics and Signiant
2010 Winter Olympics and Signiant
Signiant
 
Real Cost of Physical Media Distribution
Real Cost of Physical Media Distribution
Signiant
 
Euskalerria, Bizkaia Eta Zuberoa
Euskalerria, Bizkaia Eta Zuberoa
gandabost
 
Araba Fisikoa
Araba Fisikoa
gandabost
 
Euskalerria, Bizkaia Eta Zuberoa
Euskalerria, Bizkaia Eta Zuberoa
gandabost
 
Jungleanimals
Jungleanimals
lauvio
 
Euskal Herria (Gipuzkoak Eta Nafarroa)Poli Fisikoa Eta Kulturala
Euskal Herria (Gipuzkoak Eta Nafarroa)Poli Fisikoa Eta Kulturala
gandabost
 
Optimizing Your WAN Bandwidth Has Immediate ROI
Optimizing Your WAN Bandwidth Has Immediate ROI
Signiant
 
Signiant Overview Fall 2010
Signiant Overview Fall 2010
Signiant
 
Signiant Overview
Signiant Overview
Signiant
 
Signiant Overview
Signiant Overview
Signiant
 
Content Supply Chain Management White Paper
Content Supply Chain Management White Paper
Signiant
 
Lapurdi Fisikoa
Lapurdi Fisikoa
gandabost
 
Araba Fisikoa
Araba Fisikoa
gandabost
 
Araba Kulturala
Araba Kulturala
gandabost
 
Lapurdi Kulturala
Lapurdi Kulturala
gandabost
 
2010 Winter Olympics and Signiant
2010 Winter Olympics and Signiant
Signiant
 
Real Cost of Physical Media Distribution
Real Cost of Physical Media Distribution
Signiant
 
Euskalerria, Bizkaia Eta Zuberoa
Euskalerria, Bizkaia Eta Zuberoa
gandabost
 
Araba Fisikoa
Araba Fisikoa
gandabost
 
Euskalerria, Bizkaia Eta Zuberoa
Euskalerria, Bizkaia Eta Zuberoa
gandabost
 
Jungleanimals
Jungleanimals
lauvio
 
Euskal Herria (Gipuzkoak Eta Nafarroa)Poli Fisikoa Eta Kulturala
Euskal Herria (Gipuzkoak Eta Nafarroa)Poli Fisikoa Eta Kulturala
gandabost
 
Optimizing Your WAN Bandwidth Has Immediate ROI
Optimizing Your WAN Bandwidth Has Immediate ROI
Signiant
 
Signiant Overview Fall 2010
Signiant Overview Fall 2010
Signiant
 
Signiant Overview
Signiant Overview
Signiant
 
Signiant Overview
Signiant Overview
Signiant
 
Content Supply Chain Management White Paper
Content Supply Chain Management White Paper
Signiant
 

Similar to 10 Years of JavaScript (20)

Ajax Tutorial
Ajax Tutorial
oscon2007
 
Choosing Javascript Libraries to Adopt for Development
Choosing Javascript Libraries to Adopt for Development
Edward Apostol
 
Architecting non-trivial browser applications (Jazoon 2012)
Architecting non-trivial browser applications (Jazoon 2012)
Marc Bächinger
 
Women Who Code, Ground Floor
Women Who Code, Ground Floor
Katie Weiss
 
Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)
Addy Osmani
 
Building Rich User Experiences Without JavaScript Spaghetti
Building Rich User Experiences Without JavaScript Spaghetti
Jared Faris
 
FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...
FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...
Marco Cedaro
 
JavaScript: Creative Coding for Browsers
JavaScript: Creative Coding for Browsers
noweverywhere
 
Modern UI Architecture_ Trends and Technologies in Web Development
Modern UI Architecture_ Trends and Technologies in Web Development
Suresh Patidar
 
CT presentatie JQuery 7.12.11
CT presentatie JQuery 7.12.11
virtualsciences41
 
Kann JavaScript elegant sein?
Kann JavaScript elegant sein?
jbandi
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight Guy
David Padbury
 
What's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovation
Marakana Inc.
 
Best practices for JavaScript RIAs
Best practices for JavaScript RIAs
Carlos Ble
 
JavaScript - Introduction
JavaScript - Introduction
Tomasz Masternak
 
Node.js #digpen presentation
Node.js #digpen presentation
GOSS Interactive
 
JavaScript: the who, what, when, where, why, & how
JavaScript: the who, what, when, where, why, & how
Monty Dickerson
 
A call to JS Developers - Let’s stop trying to impress each other and start b...
A call to JS Developers - Let’s stop trying to impress each other and start b...
Christian Heilmann
 
Session at Oredev 2016.
Session at Oredev 2016.
Geertjan Wielenga
 
Building with JavaScript - write less by using the right tools
Building with JavaScript - write less by using the right tools
Christian Heilmann
 
Ajax Tutorial
Ajax Tutorial
oscon2007
 
Choosing Javascript Libraries to Adopt for Development
Choosing Javascript Libraries to Adopt for Development
Edward Apostol
 
Architecting non-trivial browser applications (Jazoon 2012)
Architecting non-trivial browser applications (Jazoon 2012)
Marc Bächinger
 
Women Who Code, Ground Floor
Women Who Code, Ground Floor
Katie Weiss
 
Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)
Addy Osmani
 
Building Rich User Experiences Without JavaScript Spaghetti
Building Rich User Experiences Without JavaScript Spaghetti
Jared Faris
 
FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...
FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...
Marco Cedaro
 
JavaScript: Creative Coding for Browsers
JavaScript: Creative Coding for Browsers
noweverywhere
 
Modern UI Architecture_ Trends and Technologies in Web Development
Modern UI Architecture_ Trends and Technologies in Web Development
Suresh Patidar
 
CT presentatie JQuery 7.12.11
CT presentatie JQuery 7.12.11
virtualsciences41
 
Kann JavaScript elegant sein?
Kann JavaScript elegant sein?
jbandi
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight Guy
David Padbury
 
What's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovation
Marakana Inc.
 
Best practices for JavaScript RIAs
Best practices for JavaScript RIAs
Carlos Ble
 
Node.js #digpen presentation
Node.js #digpen presentation
GOSS Interactive
 
JavaScript: the who, what, when, where, why, & how
JavaScript: the who, what, when, where, why, & how
Monty Dickerson
 
A call to JS Developers - Let’s stop trying to impress each other and start b...
A call to JS Developers - Let’s stop trying to impress each other and start b...
Christian Heilmann
 
Building with JavaScript - write less by using the right tools
Building with JavaScript - write less by using the right tools
Christian Heilmann
 
Ad

Recently uploaded (20)

2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
Edge AI and Vision Alliance
 
You are not excused! How to avoid security blind spots on the way to production
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
Lessons Learned from Developing Secure AI Workflows.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Safe Software
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
 
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
Edge AI and Vision Alliance
 
You are not excused! How to avoid security blind spots on the way to production
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
Lessons Learned from Developing Secure AI Workflows.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Safe Software
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
 
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
Ad

10 Years of JavaScript

  • 1. 10 Years of JavaScript what I’ve learnt so far
  • 2. 10 Years of Javascript Brief introduction of me personally, where I started (PHP), accomplishments and professional career errata Who am I? A run-through the history of professional Javascript usage and the evolution of the Web Developer profession. From browsers to ECMA to Ajax to libraries and commercialisation 10 Years Ago... Main pattern is the continuous struggle on delegation of logic; what should be done on the client side and what on the ser ver? Discussion goes BEYOND processing power of clients Frontend vs. Backend Dive deeper in more patterns that are more technical Other Recurring Patterns End of Part I Conclusion about what I’ve really learnt the past ten yrs, including me being happy about community growth! #amsterdamjs rules!
  • 3. Who am I? Small joke about definitely not being a nerd ;) Geek Talk about ZMG, big for Mambo and J!, no JS at that Started with PHP time, only small DHTML stuff Landed a job (quit school!) Talk about university - art, sociology, psychology, etc. and future prospects in that area :( Learnt that there’s never enough time! A very happy man :) Job at eBuddy and first serious JS work, built clients, framework, Javeline, Ajax.org Girlfriend Sailing whenever I can Made profession out of hobby Doing puzzles > 40hrs a week
  • 4. No dashes, because it screws up my presentation! :P Frontend vs. Backend Describe evolving systems in hardware/ computing power Power struggle Flash leads the way - clients can do a lot Sandboxing holds back innovation Delay: dotcom boom slowed down innovation Richer clients Browser wars back on track (finally...)!! Describe transition Backend: from power horse to data cloud Dissimulation of MVC pattern - exemplify! Frontend: from dumb terminal to rich platform Driven by innovation Innovation (re)sets the balance cloud? rich client? parallel computing? JIT’ed JS?
  • 5. Other Recurring Patterns Javascript vs. ECMA vs. JScript and x-browser incompatibilities Fixing the browser Lots of talk about it, blogosphere hot about it AFTER Ajax was coined. Object Oriented JS Big Boom of the ‘frameworks’ Combine the above 2 points: frameworks are born. WTFJS.com Nice display and proof why frameworks exist and are still needed. With HTML5 even more pressure will be on
  • 6. O.R.P. - Fixing the browser Extending native objects - decorator pattern Bringing Ruby to JS OO pattern implementation PrototypeJS Scriptaculous made it big MochiKit Don’t know much about it, it was big enough Odd one out - proprietary UI-centric client-side framework with a Backbase declarative API (XML) Tries to fix a whole other spectrum of problems NO, not JQuery...not yet...
  • 7. O.R.P. - Object Oriented JS What’s so nice about OO? Scholars-programmers were taught to think in terms of objects Inheritance considerations (classes, modules, packages, namespaces) Big server-side and desktop app languages are OO Paradigm: getting OO features in JS Prototypal inheritance not often understood - odd bite to it Edwards’ Base.js Show example Stephenson’s Prototype Crockford: “I now see my early attempts to support the classical model in JavaScript as a mistake” NO, still not JQuery...not yet... Hehe...
  • 8. O.R.P. - Object Oriented JS var Animal = Base.extend({   constructor: function(name) {     this.name = name;   },      name: "",      eat: function() {     this.say("Yum!");   },      say: function(message) {     alert(this.name + ": " + message);   } }); var Cat = Animal.extend({   eat: function(food) {     if (food instanceof Mouse) this.base();     else this.say("Yuk! I only eat mice.");   } });    var Mouse = Animal.extend();
  • 9. O.R.P. - Object Oriented JS What’s so nice about OO? Scholars-programmers were taught to think in terms of objects Inheritance considerations (classes, modules, packages, namespaces) Big server-side and desktop app languages are OO Paradigm: getting OO features in JS Prototypal inheritance not often understood - odd bite to it Edwards’ Base.js Stephenson’s Prototype Show example Crockford: “I now see my early attempts to support the classical model in JavaScript as a mistake” NO, still not JQuery...not yet... Hehe...
  • 10. O.R.P. - Object Oriented JS var Person = Class.create(); Person.prototype = { initialize: function(name) { this.name = name; }, say: function(message) { return this.name + ': ' + message; } }; var guy = new Person('Miro'); guy.say('hi'); // -> "Miro: hi" var Pirate = Class.create(); // inherit from Person class: Pirate.prototype = Object.extend(new Person(), { // redefine the speak method say: function(message) { return this.name + ': ' + message + ', yarr!'; } }); var john = new Pirate('Long John'); john.say('ahoy matey'); // -> "Long John: ahoy matey, yarr!"
  • 11. O.R.P. - Object Oriented JS What’s so nice about OO? Scholars-programmers were taught to think in terms of objects Inheritance considerations (classes, modules, packages, namespaces) Big server-side and desktop app languages are OO Prototypal inheritance not often understood - odd bite to it Paradigm: getting OO features in JS Edwards’ Base.js Stephenson’s Prototype Crockford: “I now see my early attempts to support the classical model in JavaScript as a mistake” NO, still not JQuery...not yet... Hehe...
  • 12. O.R.P. - Big Boom of ‘frameworks’ Combination of Fixing the browser and OO in JS DOMReady CSS3 Selectors Widgets - ready-made packages of functionality: OpenRico Dojo, Qooxdoo as Open Source Bindows, Backbase, Tibco as proprietary No list here, ‘cause it’s infinite...almost Reasoning YES, now JQuery is among us! Explain JQuery’s success The power of extensibility Is it a framework? Performance Separate slide on Performance (stuff I’ve learnt about it)
  • 13. Performance Minimize the AMOUNT of HTTP requests Modularize Show next slide (example) Function calls are expensive/ avoid recursion Lookups are expensive
  • 14. Performance fab = {}; (function(global) { var a = 1, b = 2; global.fab.newModule = { getA: function() { return a; }, setA: function(newA) { a = newA; }, getB: function() { return b; }, setB: function(newB) { b = newB; }, getSum: function() { return a + b; } }; })(this);
  • 15. Performance Minimize the AMOUNT of HTTP requests Modularize Function calls are expensive/ avoid recursion Lookups are expensive
  • 16. End of Part 1 Conclusion Questions? Follow me @mikedeboer Find me @amsterdamjs ;)