SlideShare a Scribd company logo
1 of 122
Javascript As A
Programming Language
IS
    Javascript As A
Programming Language
Versioning, Test Driven Development & Continuous Integration
Hello, who’s speaking?
Hello, who’s speaking?

           Marco Cedaro
             @cedmax
Hello, who’s speaking?

           Marco Cedaro
             @cedmax

           They said I am a...
            Frontend Cowboy
                              Nicola Vitto
Hello, who’s speaking?

           Marco Cedaro
             @cedmax

           They said I am a...
            Frontend Cowboy
                                   Nicola Vitto
            Javascript Pervert
                                 Roberto Felter
Hello, who’s speaking?

           Marco Cedaro
             @cedmax

           They said I am a...
            Frontend Cowboy
                                    Nicola Vitto
            Javascript Pervert
                                 Roberto Felter
            Perfect Stranger
                            basically anyone else
Hello, who’s speaking?

           Marco Cedaro
             @cedmax

           Actually I am:

            still a Platform Software
            Developer at Yoox Group,
            currently in charge of js
            architecture development
Hello, who’s speaking?

           Marco Cedaro
             @cedmax

           Actually I am:

            still a Platform Software
            Developer at Yoox Group,
            currently in charge of js
            architecture development

            Frontend Meetup organizer
            with From The Front
Hello, who’s speaking?

           Marco Cedaro
             @cedmax

           Actually I am:

            still a Platform Software
            Developer at Yoox Group,
            currently in charge of js
            architecture development

            Frontend Meetup organizer
            with From The Front
            and a javascript pervert
1. Disclaimer           2. You Need a Strategy   3. Continuous Integration




4. Choose Your Tools    5. The Environment       6. In The Wild




                       1. Disclaimer
1. Disclaimer           2. You Need a Strategy   3. Continuous Integration




4. Choose Your Tools    5. The Environment       6. In The Wild




                       1. Disclaimer
DISCLAIMER


Always code as if the guy who ends up
maintaining your code will be a violent
psychopath who knows where you live
                               Martin Golding
REAL DISCLAIMER


Javascript is not jQuery
  Let’s say it all together: “Javascript is not jQuery”
     What do you mean?
        I mean that Javascript is not just something you find
        online, cut and paste in a <script> just before the end
        of the </body>
Not jQuery’s fault


jQuery is extremely powerful

but...WITH GREAT POWER THERE
MUST ALSO COME - - GREAT
RESPONSABILITY! *




* original sentence from 1962 first spiderman story
The right tool in wrong hands


  but who cares? as long as interaction is held by:
    designers
    that aren’t exactly aware of what they are doing
    backend developers
    even worse: they mostly don’t even care about what’s
    happening clientside as long as everything works
Not a “merchant of complexity”


   we don’t need just to let stuff work
       we don’t need complexity either
         we need a strategy to let code be maintainable
         and reusable
is it about simplicity?


it isn't
   there’s a lot of people who hides their ignorance behind
   simplicity
       Front end developers have to claim their
       role in development roadmap and business
       strategy, because...
Javascript is a serious business
What's relying
on javascript?
What's relying
on javascript?
    performance
          ↓
   user experience
          ↓
     conversion
          ↓
       money
What's relying
on javascript?
What's relying
on javascript?
       ajax interaction
               ↓
less bandwith & server load
               ↓
   less infractucture costs
               ↓
            money
What's relying
on javascript?
What's relying
on javascript?
 cross platform animation
              ↓
      less tecnologies
              ↓
   less code duplication
              ↓
           money
1. Disclaimer          2. You Need a Strategy   3. Continuous Integration




4. Choose Your Tools   5. The Environment       6. In The Wild




                2.You Need a Strategy
1. Disclaimer          2. You Need a Strategy   3. Continuous Integration




4. Choose Your Tools   5. The Environment       6. In The Wild




                2.You Need a Strategy
YOU NEED A STRATEGY



  What's the use of running if you are
        not on the right road
                               German proverb
YOU NEED A STRATEGY


  Why do you need a strategy?
       you need a strategy because best practices and
       design patterns are the same in a 4 guys based
       company as well as in a large corporate.
It doesn’t really matter if you are working at facebook,
      soundcloud or by yourself in a small office.




  How many people code?
A real life example


          Small Web Agency

          1 designer, 2 developers and a
          lot of small website with low
          maintenance rate.
The designer
introduces a slider on 5
         websites:
”it’s cool on apple store”.
The developer gets a jQuery
       plugin online




                     a SLIDER’s Story
The designer
introduces a slider on 5        Major release of the
         websites:              most used browser.
”it’s cool on apple store”.        A small fix has been
                              released, they have to change
The developer gets a jQuery   5 files in 5 different projects.
       plugin online




                     a SLIDER’s Story
The designer                                             Oh damn! There’s no
introduces a slider on 5        Major release of the
                                                                   mouse wheel
         websites:              most used browser.
                                                                    integration!
”it’s cool on apple store”.        A small fix has been
                              released, they have to change     should they ask for support
The developer gets a jQuery   5 files in 5 different projects.    or should they change the
       plugin online                                                library by themself?




                     a SLIDER’s Story
Am I the only one or
there’s something wrong?
Just a spoonful of sugar...

               manage codebase just in
               one place

               continue development
               without regression

               use stable versions of our
               libraries
1. Disclaimer          2. You Need a Strategy   3. Continuous Integration




4. Choose Your Tools   5. The Environment       6. In The Wild




          3. Continuous Integration
1. Disclaimer          2. You Need a Strategy   3. Continuous Integration




4. Choose Your Tools   5. The Environment       6. In The Wild




          3. Continuous Integration
Continuous Integration

 A software development practice where members of
 a team integrate their work frequently.
 Each integration is verified by an automated build to
 detect integration errors as quickly as possible.
                                                     Martin Fowler




 CI is about the fundamentals. If we don’t focus on the
 fundamentals we’ll be forced to perform low-level
 tasks later, usually at the most inconvenient times
                                 Paul Duvall, Continuous Integration
I Build So Consistently
I Build So Consistently



identify
I Build So Consistently
                      build




identify
I Build So Consistently
                      build




identify




           share
I Build So Consistently
                               build




identify




           share   make it continuous
How does this fit our
     needs?
codebase just in one place


 setup an isolated repository for reusable libraries
 share the code through a CI process
 resolve dependency on websites
continue development
  without regression


validate the code
run tests against errors (both coding and logic)
version the shared code against interface changes
stable versions


use a declared semantic versioning
use a file system based pattern:
 //jsRepo/dist/yourscript-1.0.0/yourscript.js
 //jsRepo/dist/yourscript-1.0.0.js

never modify already released versions
  increase version number instead
Unit & Functional an overview
Unit & Functional an overview




 is it red? is it a 4x2 block?   is the roof red?
  is it made to fit                       is there a porch?
well other block?                 is there a door?
Unit vs Functional

                  test
                                      consistency
test cross   interaction    control
                                        against   execution     test
 browser       between       over
                                       external     time    integration
  issues      different    codebase
                                        changes
               libraries
Test Driven Development
You will, eventually..
Everyone should be happy
an advice



              Keep it Simple & Smart
Don’t over-engineer it: you will eventually regret every
single useless complexity you will introduce
1. Disclaimer          2. You Need a Strategy   3. Continuous Integration




4. Choose Your Tools   5. The Environment       6. In The Wild




                4. Choose Your Tools
1. Disclaimer          2. You Need a Strategy   3. Continuous Integration




4. Choose Your Tools   5. The Environment       6. In The Wild




                4. Choose Your Tools
CHOOSE YOUR TOOLS



 A man cannot be too careful in the
      choice of his enemies
                               Oscar Wilde
Another Neat Tool



Simply saying the documentation sucks
         doesn't do any good
                Larry V. Streepy - Ant Mailing List 06.06.2001
Another Neat Tool



Simply saying the documentation sucks
         doesn't do any good
                                  Larry V. Streepy - Ant Mailing List 06.06.2001



He was right: 10 years later ANT documentation still sucks but ANT is a solid
choice in build automation configuration.
ANT


XML driven: simple and straightforward
a standard
there are a lot of implementations and plugins
  every tool in this presentation is easily capable to be used
  in Ant build process
ANT - Alternatives



It's plenty of valuable Ant alternatives.
  Choose the one that fits better your needs
Code Base:
  UNIT TEST RUNNER




Websites:
  DEPENDENCY RESOLVER
Code Base:
  JS TEST DRIVER




Websites:
  DEPENDENCY RESOLVER
JS Test Driver

Js Test Driver is the most complete javascript unit test runner
available
  external api integration
  jasmine and qunit as well as its own api
  test report
  console return and junit compatible report
  smooth integration
  both locally and on a build machine
How does it work?


It runs a server
opens browsers
runs test suites
retrieves results on the console
creates a report in JUnit format
Pitfalls?



testing asynchronous execution is a mess
Sinon.js

a standalone javascript library with unit test utilities
   fake server
   manage server response in order to test ajax interaction
   fake timer
   in order to test timeouts, intervals, animation callbacks...
   spy, stub & mock
   in order to make advanced assertions on object interaction
JS Test Driver - Alternatives


Env.JS
a javascript DOM implementation in javascript engines: it is
possible to fake browser execution and run unit tests.


Yeti
it stands for Yahoo Easy Test Interface and it is a very promising
unit test runner, potentially the most suitable alternative.
Code Base:
  JS TEST DRIVER




Websites:
  DEPENDENCY RESOLVER
Code Base:
  JS TEST DRIVER




Websites:
  APACHE IVY
Apache Ivy


Ivy is a simple, powerful and well documented dependency
manager
It has a full integration in ANT build system
and, again, it’s really simple, especially if you keep a file system
based versioning.
Ivy Alternatives


Is there any alternative?
   I haven’t found anything simple enough to compete with Ivy
   straightforwardness: other solutions (ie. maven) drove me
   nuts
1. Disclaimer          2. You Need a Strategy   3. Continuous Integration




4. Choose Your Tools   5. The Environment       6. In The Wild




                  5. The Environment
1. Disclaimer          2. You Need a Strategy   3. Continuous Integration




4. Choose Your Tools   5. The Environment       6. In The Wild




                  5. The Environment
THE ENVIRONMENT



    I like boring things
                           Andy Warhol
Javascript Repository
Javascript Repository


/
    dist
    libs
    src
    tools
    build.xml
Javascript Repository


/
    dist
    libs
    src
    tools
    build.xml

                  /tools/
                    jslint
                    JsTestDriver-1.3.1
Javascript Repository


/                                        /src/
    dist                                   form-validator
    libs                                   slider
    src                                        src
    tools                                          slider.js
    build.xml                                  test
                                                   slider.test.js
                  /tools/
                                               jsTestDriver.conf
                    jslint
                                               version.prop
                    JsTestDriver-1.3.1
                                           twitter-widget
                                           ...
Javascript Repository
                                         /libs/
                                           jquery-1.5.1.min.js
                                           sinon-1.0.0.js

/                                        /src/
    dist                                   form-validator
    libs                                   slider
    src                                        src
    tools                                          slider.js
    build.xml                                  test
                                                   slider.test.js
                  /tools/
                                               jsTestDriver.conf
                    jslint
                                               version.prop
                    JsTestDriver-1.3.1
                                           twitter-widget
                                           ...
Javascript Repository
                                         /libs/
                                           jquery-1.5.1.min.js
                                           sinon-1.0.0.js

/                                        /src/
    dist                                   form-validator
    libs                                   slider
    src                                        src
    tools                                          slider.js
    build.xml                                  test
                                                   slider.test.js
                  /tools/
                                               jsTestDriver.conf
                    jslint
                                               version.prop
                    JsTestDriver-1.3.1
                                           twitter-widget
                                           ...
basepath: ../..
server: http://127.0.0.1:9876
load:
  - libs/sinon-1.0.0.js
  - libs/jquery-1.5.1.min.js
  - src/slider/src/slider.js
  - src/slider/test/slider.test.js




                                JsTestDriver.conf
Let's code
Test
var test = new TestCase("Slider.test", {
    setUp: function(){

      },
      tearDown: function(){

      }
});


                              Code
var slider;
Test
var test = new TestCase("Slider.test", {
    setUp: function(){
        /*:DOC += <ul id="foo"><li></li><li></li></ul> */
    },
      tearDown: function(){

      }
});


                              Code
var slider;
Test
var test = new TestCase("Slider.test", {
    setUp: function(){
        /*:DOC += <ul id="foo"><li></li><li></li></ul> */
    },
      testSliderIsAPlugin: function(){
          var test = function(){
              $("slidable").slider();
          };
          assertNoException(test);
      },
      tearDown: function(){

      }
});


                              Code
var slider;
JS Test Driver in action
Test
var test = new TestCase("Slider.test", {
    setUp: function(){
        /*:DOC += <ul id="foo"><li></li><li></li></ul> */
    },
      testSliderIsAPlugin: function(){
          var test = function(){
              $("slidable").slider();
          };
          assertNoException(test);
      },
      tearDown: function(){

      }
});


                              Code
var slider;
Test
var test = new TestCase("Slider.test", {
    setUp: function(){
        /*:DOC += <ul id="foo"><li></li><li></li></ul> */
    },
      testSliderIsAPlugin: function(){
          var test = function(){
              $("slidable").slider();
          };
          assertNoException(test);
      },
      tearDown: function(){

      }
});


                              Code
(function($){
    $.fn.slider = function(){};
}(jQuery));
JS Test Driver in action
Javascript Repository
                                         /libs/
                                           jquery-1.5.1.min.js
                                           sinon-1.0.0.js

/                                        /src/
    dist                                   form-validator
    libs                                   slider
    src                                        src
    tools                                          slider.js
    build.xml                                  test
                                                   slider.test.js
                  /tools/
                                               jsTestDriver.conf
                    jslint
                                               version.prop
                    JsTestDriver-1.3.1
                                           twitter-widget
                                           ...
Javascript Repository
                  /dist/                   /libs/
                    form-validator-1.0.0     jquery-1.5.1.min.js
                    form-validator-1.1.0     sinon-1.0.0.js
                    slider-1.0.0
/                                          /src/
    dist                slider.min.js        form-validator
    libs            twitter-widget-1.0.0
                                             slider
    src             twitter-widget-1.0.1
                                                 src
    tools           twitter-widget-2.0.0             slider.js
    build.xml       ...                          test
                                                     slider.test.js
                  /tools/
                                                 jsTestDriver.conf
                    jslint
                                                 version.prop
                    JsTestDriver-1.3.1
                                             twitter-widget
                                             ...
Test Ajax Call

var test = new TestCase("mylib.test", {
  testAjaxCallSuccess: function(){
        var server = sinon.useFakeServer();

          server.respondWith("GET", "/some/article/comments.json",
                        [200, {"Content-Type":"application/json"},
                        '[{ id:12, comment:"Hello"}]']);

          var callback = sinon.spy();

          myLib.getCommentsFor("/some/article", callback);

          server.respond();

          assert(callback.calledWith([{ id:12, comment:"Hello"}]));

          server.restore();
      }
});
Test Ajax Timeout
var test = new TestCase("mylib.test", {
  testAjaxCallTimeout: function(){
        var server = sinon.useFakeServer();

          server.respondWith("GET", "/some/article/comments.json",
                        [200, {"Content-Type":"application/json"},
                        '[{ id:12, comment:"Hello"}]']);

          var timeoutCallback = sinon.spy();
          var clock = sinon.useFakeTimers();

          myLib.getCommentsFor("/some/article", function(){},
                              {onTimeout: timeoutCallback,
                               timeout:2500});
          clock.tick(2500);

          assert(timeoutCallback.called());

          server.restore();
      }
});
Website Solution
Website Solution


/
    css
    img
    inc
    scripts
    .htaccess
    index.php
Website Solution

                      /scripts/
                        public
/
    css                 src
    img                 tools
    inc                     apache-ivy-2.2.0
    scripts                 yui-compressor-2.4.6
    .htaccess               ivy-settings.xml
    index.php           mywebapp.xml
                        ivy.xml
Website Solution

                      /scripts/
                        public
/
    css                 src
    img                 tools
    inc                     apache-ivy-2.2.0
    scripts                 yui-compressor-2.4.6
    .htaccess               ivy-settings.xml
    index.php           mywebapp.xml
                        ivy.xml
<ivysettings>
   <settings defaultResolver="JSResolver"/>

    <resolvers>
        <url name="JSResolver" checkmodified="true">
           <artifact

   
 
 
 pattern="//jsRepo/dist/[module]-[revision]/[module].js"

   
 
 />
        </url>
    </resolvers>

    <caches

   
 defaultCacheDir="${basedir}/.artifacts"

   
 artifactPattern="[organization]/[module]-[revision].js"

   />


   <property

   
 name="ivy.artifactproperty.name"

   
 value="[organization].[module]"

   />

   <property

 
 name="ivy.artifactproperty.value"

 
 value="[organization]/[module]-[revision].js"

 />
</ivysettings>
<ivysettings>
   <settings defaultResolver="JSResolver"/>

    <resolvers>
        <url name="JSResolver" checkmodified="true">
           <artifact

   
 
 
 pattern="//jsRepo/dist/[module]-[revision]/[module].js"

   
 
 />
        </url>
    </resolvers>

    <caches

   
 defaultCacheDir="${basedir}/.artifacts"

   
 artifactPattern="[organization]/[module]-[revision].js"

   />


   <property

   
 name="ivy.artifactproperty.name"

   
 value="[organization].[module]"

   />

   <property

 
 name="ivy.artifactproperty.value"

 
 value="[organization]/[module]-[revision].js"

 />
</ivysettings>
<ivy-module version="2.0">
    <info organisation="libs" module="myWebSite" />
    <dependencies>
        <dependency org="libs" name="slider" rev="1.0.0"/>
        <dependency org="libs" name="twitter-widget" rev="2.0.0"/>
        <dependency org="libs" name="form-validator" rev="1.1.0"/>
    </dependencies>
</ivy-module>




                                                           ivy.xml
<ivy-module version="2.0">
    <info organisation="libs" module="myWebSite" />
    <dependencies>
        <dependency org="libs" name="slider" rev="1.0.0"/>
        <dependency org="libs" name="twitter-widget" rev="2.0.0"/>
        <dependency org="libs" name="form-validator" rev="1.1.0"/>
    </dependencies>
</ivy-module>




                                                           ivy.xml
1. Disclaimer           2. You Need a Strategy   3. Continuous Integration




4. Choose Your Tools    5. The Environment       6. In The Wild




                       6. In The Wild
1. Disclaimer           2. You Need a Strategy   3. Continuous Integration




4. Choose Your Tools    5. The Environment       6. In The Wild




                       6. In The Wild
IN THE WILD



In the wild, there is no health care.
                           Dwight Schrute (the office)
so? what is it about?



 control & knowledge
Inversion of control freakness                                                   1




                                     2
      I am not a control freak.

Gain control and then leave to the
machine the responsibility to check
 everything; focus on knowledge.




1) Inspired (and I mean copied) by http://blog.jonathanoliver.com/ - Inversion of Control Freak:
Dependency Injection, Domain-Driven Design, Test-Driven Development techniques
2) actually I am
LOOKING FORWARD


Javascript had several springs
  buzzwords: DHTML before and Ajax after
  big frameworks: from Prototype+Scriptaculous to jQuery
  future: HTML5
LOOKING FORWARD

Javascript had several springs
  buzzwords: DHTML before and Ajax after
  big frameworks: from Prototype+Scriptaculous to jQuery
  future: HTML5
LOOKING FORWARD

Javascript had several springs
  buzzwords: DHTML before and Ajax after
  big frameworks: from Prototype+Scriptaculous to jQuery
  future: HTML5
on browser
LOOKING FORWARD

Javascript had several springs
  buzzwords: DHTML before and Ajax after
  big frameworks: from Prototype+Scriptaculous to jQuery
  future: HTML5
on browser
  then there’s a brand new world on server: node.js,
  noSQL databases (couchdb, mongodb..)
LOOKING FORWARD



    the further we look at,
  the more control we need
LOOKING FORWARD

    the further we look at,
  the more control we need
LOOKING FORWARD

    the further we look at,
  the more control we need
  javascript is a programming language
LOOKING FORWARD

     the further we look at,
   the more control we need
  javascript is a programming language

 javascript is a serious business.
LOOKING FORWARD

     the further we look at,
   the more control we need
  javascript is a programming language

 javascript is a serious business.
              and, most of all...
javascript kicks asses
javascript is money
marco@fromthefront.it
https://github.com/cedmax
@cedmax
One last word..
 YOOX Launch & Learn - Javascript as a programming language

More Related Content

What's hot

The Death of Lorem Ipsum and Pixel-Perfect Content (MinneWebCon version)
The Death of Lorem Ipsum and Pixel-Perfect Content (MinneWebCon version)The Death of Lorem Ipsum and Pixel-Perfect Content (MinneWebCon version)
The Death of Lorem Ipsum and Pixel-Perfect Content (MinneWebCon version)Dave Olsen
 
Do Try This At Home
Do Try This At HomeDo Try This At Home
Do Try This At Homebdillard
 
Stop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping Mistakes
Stop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping MistakesStop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping Mistakes
Stop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping MistakesHannah Flynn
 
Stop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping Mistakes
Stop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping MistakesStop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping Mistakes
Stop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping MistakesAggregage
 
Devoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
Devoxx2010 - Mobile Development Choices: Native Apps vs Web AppsDevoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
Devoxx2010 - Mobile Development Choices: Native Apps vs Web AppsMax Katz
 
Creating Android Apps with PhoneGap
Creating Android Apps with PhoneGapCreating Android Apps with PhoneGap
Creating Android Apps with PhoneGapDean Peters
 
AgilePT'10 - Evolving Software: Five powerful metaphors to explain change
AgilePT'10 - Evolving Software: Five powerful metaphors to explain changeAgilePT'10 - Evolving Software: Five powerful metaphors to explain change
AgilePT'10 - Evolving Software: Five powerful metaphors to explain changeFilipe Correia
 
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in ActionBill Scott
 
Progressing JavaScript and Apps the Web way…
 Progressing JavaScript and Apps the Web way…  Progressing JavaScript and Apps the Web way…
Progressing JavaScript and Apps the Web way… Christian Heilmann
 
Web Frameworks of the Future
Web Frameworks of the FutureWeb Frameworks of the Future
Web Frameworks of the Futureelliando dias
 
How to discover contribution item ?
How to discover contribution item ?How to discover contribution item ?
How to discover contribution item ?Gyuyoung Kim
 
Creating and Distributing Mobile Web Applications with PhoneGap
Creating and Distributing Mobile Web Applications with PhoneGapCreating and Distributing Mobile Web Applications with PhoneGap
Creating and Distributing Mobile Web Applications with PhoneGapJames Pearce
 
Engineering culture
Engineering cultureEngineering culture
Engineering culturePamela Fox
 
Ruby and iOS: An inside look
Ruby and iOS: An inside lookRuby and iOS: An inside look
Ruby and iOS: An inside lookJeanine Jue
 
Software Craftsmanship - 1 Meeting
Software Craftsmanship - 1 MeetingSoftware Craftsmanship - 1 Meeting
Software Craftsmanship - 1 MeetingUri Lavi
 
Solutions for when documentation fails
Solutions for when documentation fails Solutions for when documentation fails
Solutions for when documentation fails Martijn Dashorst
 
Scrum secrets for integrating UX, design & development
Scrum secrets for integrating UX, design & developmentScrum secrets for integrating UX, design & development
Scrum secrets for integrating UX, design & developmentPieter Jongerius
 
Fearless Internationalization and Localization Across the Nations
Fearless Internationalization and Localization Across the NationsFearless Internationalization and Localization Across the Nations
Fearless Internationalization and Localization Across the NationsSiena Aguayo
 

What's hot (20)

The Death of Lorem Ipsum and Pixel-Perfect Content (MinneWebCon version)
The Death of Lorem Ipsum and Pixel-Perfect Content (MinneWebCon version)The Death of Lorem Ipsum and Pixel-Perfect Content (MinneWebCon version)
The Death of Lorem Ipsum and Pixel-Perfect Content (MinneWebCon version)
 
Do Try This At Home
Do Try This At HomeDo Try This At Home
Do Try This At Home
 
Stop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping Mistakes
Stop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping MistakesStop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping Mistakes
Stop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping Mistakes
 
Stop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping Mistakes
Stop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping MistakesStop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping Mistakes
Stop Guessing, Start Knowing: The Top 5 Most Common Rapid Prototyping Mistakes
 
Documenting First
Documenting FirstDocumenting First
Documenting First
 
Devoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
Devoxx2010 - Mobile Development Choices: Native Apps vs Web AppsDevoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
Devoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
 
Creating Android Apps with PhoneGap
Creating Android Apps with PhoneGapCreating Android Apps with PhoneGap
Creating Android Apps with PhoneGap
 
AgilePT'10 - Evolving Software: Five powerful metaphors to explain change
AgilePT'10 - Evolving Software: Five powerful metaphors to explain changeAgilePT'10 - Evolving Software: Five powerful metaphors to explain change
AgilePT'10 - Evolving Software: Five powerful metaphors to explain change
 
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
 
Progressing JavaScript and Apps the Web way…
 Progressing JavaScript and Apps the Web way…  Progressing JavaScript and Apps the Web way…
Progressing JavaScript and Apps the Web way…
 
Web Frameworks of the Future
Web Frameworks of the FutureWeb Frameworks of the Future
Web Frameworks of the Future
 
How to discover contribution item ?
How to discover contribution item ?How to discover contribution item ?
How to discover contribution item ?
 
Creating and Distributing Mobile Web Applications with PhoneGap
Creating and Distributing Mobile Web Applications with PhoneGapCreating and Distributing Mobile Web Applications with PhoneGap
Creating and Distributing Mobile Web Applications with PhoneGap
 
Engineering culture
Engineering cultureEngineering culture
Engineering culture
 
Adobemax2009na
Adobemax2009naAdobemax2009na
Adobemax2009na
 
Ruby and iOS: An inside look
Ruby and iOS: An inside lookRuby and iOS: An inside look
Ruby and iOS: An inside look
 
Software Craftsmanship - 1 Meeting
Software Craftsmanship - 1 MeetingSoftware Craftsmanship - 1 Meeting
Software Craftsmanship - 1 Meeting
 
Solutions for when documentation fails
Solutions for when documentation fails Solutions for when documentation fails
Solutions for when documentation fails
 
Scrum secrets for integrating UX, design & development
Scrum secrets for integrating UX, design & developmentScrum secrets for integrating UX, design & development
Scrum secrets for integrating UX, design & development
 
Fearless Internationalization and Localization Across the Nations
Fearless Internationalization and Localization Across the NationsFearless Internationalization and Localization Across the Nations
Fearless Internationalization and Localization Across the Nations
 

Similar to YOOX Launch & Learn - Javascript as a programming language

Paris Web - Javascript as a programming language
Paris Web - Javascript as a programming languageParis Web - Javascript as a programming language
Paris Web - Javascript as a programming languageMarco Cedaro
 
Preparing for the WebGeek DevCup
Preparing for the WebGeek DevCupPreparing for the WebGeek DevCup
Preparing for the WebGeek DevCupbryanbibat
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteChristian Heilmann
 
10 practices that every developer needs to start right now
10 practices that every developer needs to start right now10 practices that every developer needs to start right now
10 practices that every developer needs to start right nowCaleb Jenkins
 
“High performance teams" - Marco Cecconi
“High performance teams" - Marco Cecconi“High performance teams" - Marco Cecconi
“High performance teams" - Marco CecconiSpeck&Tech
 
JsWorld Conference Online - Improving developer collaboration with CodeSandbox
JsWorld Conference Online - Improving developer collaboration with CodeSandbox JsWorld Conference Online - Improving developer collaboration with CodeSandbox
JsWorld Conference Online - Improving developer collaboration with CodeSandbox Abati Adewale
 
Do Try This At Home Ajax Bookmarking, Cross Site Scripting, And Other Web 2 ...
Do Try This At Home  Ajax Bookmarking, Cross Site Scripting, And Other Web 2 ...Do Try This At Home  Ajax Bookmarking, Cross Site Scripting, And Other Web 2 ...
Do Try This At Home Ajax Bookmarking, Cross Site Scripting, And Other Web 2 ...jward5519
 
Common Missteps in Cross-Platform Development.pdf
Common Missteps in Cross-Platform Development.pdfCommon Missteps in Cross-Platform Development.pdf
Common Missteps in Cross-Platform Development.pdfPridesys IT Ltd.
 
Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date. Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date. Christian Heilmann
 
Breaking out of the endless callback look - #jsday Italy keynote
Breaking out of the endless callback look - #jsday Italy keynoteBreaking out of the endless callback look - #jsday Italy keynote
Breaking out of the endless callback look - #jsday Italy keynoteChristian Heilmann
 
Innovation vs. Impatience - keynote at JSOpenDay London 2015
Innovation vs. Impatience - keynote at JSOpenDay London 2015Innovation vs. Impatience - keynote at JSOpenDay London 2015
Innovation vs. Impatience - keynote at JSOpenDay London 2015Christian Heilmann
 
The Coming Earthquake in WebSphere Application Server Configuration Management
The Coming Earthquake in WebSphere Application Server Configuration ManagementThe Coming Earthquake in WebSphere Application Server Configuration Management
The Coming Earthquake in WebSphere Application Server Configuration ManagementDeborah Schalm
 
The Coming Earthquake in WebSphere Application Server Configuration Management
The Coming Earthquake in WebSphere Application Server Configuration Management The Coming Earthquake in WebSphere Application Server Configuration Management
The Coming Earthquake in WebSphere Application Server Configuration Management DevOps.com
 
Improving developer collaboration with CodeSandbox
Improving developer collaboration with CodeSandboxImproving developer collaboration with CodeSandbox
Improving developer collaboration with CodeSandboxAbati Adewale
 
The Coming Earthquake in IIS and SQL Configuration Management
The Coming Earthquake  in IIS and SQL Configuration ManagementThe Coming Earthquake  in IIS and SQL Configuration Management
The Coming Earthquake in IIS and SQL Configuration ManagementJules Pierre-Louis
 

Similar to YOOX Launch & Learn - Javascript as a programming language (20)

Paris Web - Javascript as a programming language
Paris Web - Javascript as a programming languageParis Web - Javascript as a programming language
Paris Web - Javascript as a programming language
 
Preparing for the WebGeek DevCup
Preparing for the WebGeek DevCupPreparing for the WebGeek DevCup
Preparing for the WebGeek DevCup
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynote
 
10 practices that every developer needs to start right now
10 practices that every developer needs to start right now10 practices that every developer needs to start right now
10 practices that every developer needs to start right now
 
Developers survival-guide
Developers survival-guideDevelopers survival-guide
Developers survival-guide
 
“High performance teams" - Marco Cecconi
“High performance teams" - Marco Cecconi“High performance teams" - Marco Cecconi
“High performance teams" - Marco Cecconi
 
JsWorld Conference Online - Improving developer collaboration with CodeSandbox
JsWorld Conference Online - Improving developer collaboration with CodeSandbox JsWorld Conference Online - Improving developer collaboration with CodeSandbox
JsWorld Conference Online - Improving developer collaboration with CodeSandbox
 
Do Try This At Home Ajax Bookmarking, Cross Site Scripting, And Other Web 2 ...
Do Try This At Home  Ajax Bookmarking, Cross Site Scripting, And Other Web 2 ...Do Try This At Home  Ajax Bookmarking, Cross Site Scripting, And Other Web 2 ...
Do Try This At Home Ajax Bookmarking, Cross Site Scripting, And Other Web 2 ...
 
Common Missteps in Cross-Platform Development.pdf
Common Missteps in Cross-Platform Development.pdfCommon Missteps in Cross-Platform Development.pdf
Common Missteps in Cross-Platform Development.pdf
 
How to write bad code using C#
How to write bad code using C#How to write bad code using C#
How to write bad code using C#
 
Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date. Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date.
 
Breaking out of the endless callback look - #jsday Italy keynote
Breaking out of the endless callback look - #jsday Italy keynoteBreaking out of the endless callback look - #jsday Italy keynote
Breaking out of the endless callback look - #jsday Italy keynote
 
Jsday
JsdayJsday
Jsday
 
Innovation vs. Impatience - keynote at JSOpenDay London 2015
Innovation vs. Impatience - keynote at JSOpenDay London 2015Innovation vs. Impatience - keynote at JSOpenDay London 2015
Innovation vs. Impatience - keynote at JSOpenDay London 2015
 
The Coming Earthquake in WebSphere Application Server Configuration Management
The Coming Earthquake in WebSphere Application Server Configuration ManagementThe Coming Earthquake in WebSphere Application Server Configuration Management
The Coming Earthquake in WebSphere Application Server Configuration Management
 
The Coming Earthquake in WebSphere Application Server Configuration Management
The Coming Earthquake in WebSphere Application Server Configuration Management The Coming Earthquake in WebSphere Application Server Configuration Management
The Coming Earthquake in WebSphere Application Server Configuration Management
 
TxJS 2011
TxJS 2011TxJS 2011
TxJS 2011
 
Agile iOS
Agile iOSAgile iOS
Agile iOS
 
Improving developer collaboration with CodeSandbox
Improving developer collaboration with CodeSandboxImproving developer collaboration with CodeSandbox
Improving developer collaboration with CodeSandbox
 
The Coming Earthquake in IIS and SQL Configuration Management
The Coming Earthquake  in IIS and SQL Configuration ManagementThe Coming Earthquake  in IIS and SQL Configuration Management
The Coming Earthquake in IIS and SQL Configuration Management
 

Recently uploaded

MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 

Recently uploaded (20)

MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 

YOOX Launch & Learn - Javascript as a programming language

  • 2. IS Javascript As A Programming Language Versioning, Test Driven Development & Continuous Integration
  • 4. Hello, who’s speaking? Marco Cedaro @cedmax
  • 5. Hello, who’s speaking? Marco Cedaro @cedmax They said I am a... Frontend Cowboy Nicola Vitto
  • 6. Hello, who’s speaking? Marco Cedaro @cedmax They said I am a... Frontend Cowboy Nicola Vitto Javascript Pervert Roberto Felter
  • 7. Hello, who’s speaking? Marco Cedaro @cedmax They said I am a... Frontend Cowboy Nicola Vitto Javascript Pervert Roberto Felter Perfect Stranger basically anyone else
  • 8. Hello, who’s speaking? Marco Cedaro @cedmax Actually I am: still a Platform Software Developer at Yoox Group, currently in charge of js architecture development
  • 9. Hello, who’s speaking? Marco Cedaro @cedmax Actually I am: still a Platform Software Developer at Yoox Group, currently in charge of js architecture development Frontend Meetup organizer with From The Front
  • 10. Hello, who’s speaking? Marco Cedaro @cedmax Actually I am: still a Platform Software Developer at Yoox Group, currently in charge of js architecture development Frontend Meetup organizer with From The Front and a javascript pervert
  • 11. 1. Disclaimer 2. You Need a Strategy 3. Continuous Integration 4. Choose Your Tools 5. The Environment 6. In The Wild 1. Disclaimer
  • 12. 1. Disclaimer 2. You Need a Strategy 3. Continuous Integration 4. Choose Your Tools 5. The Environment 6. In The Wild 1. Disclaimer
  • 13. DISCLAIMER Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live Martin Golding
  • 14. REAL DISCLAIMER Javascript is not jQuery Let’s say it all together: “Javascript is not jQuery” What do you mean? I mean that Javascript is not just something you find online, cut and paste in a <script> just before the end of the </body>
  • 15. Not jQuery’s fault jQuery is extremely powerful but...WITH GREAT POWER THERE MUST ALSO COME - - GREAT RESPONSABILITY! * * original sentence from 1962 first spiderman story
  • 16. The right tool in wrong hands but who cares? as long as interaction is held by: designers that aren’t exactly aware of what they are doing backend developers even worse: they mostly don’t even care about what’s happening clientside as long as everything works
  • 17. Not a “merchant of complexity” we don’t need just to let stuff work we don’t need complexity either we need a strategy to let code be maintainable and reusable
  • 18. is it about simplicity? it isn't there’s a lot of people who hides their ignorance behind simplicity Front end developers have to claim their role in development roadmap and business strategy, because...
  • 19. Javascript is a serious business
  • 21. What's relying on javascript? performance ↓ user experience ↓ conversion ↓ money
  • 23. What's relying on javascript? ajax interaction ↓ less bandwith & server load ↓ less infractucture costs ↓ money
  • 25. What's relying on javascript? cross platform animation ↓ less tecnologies ↓ less code duplication ↓ money
  • 26. 1. Disclaimer 2. You Need a Strategy 3. Continuous Integration 4. Choose Your Tools 5. The Environment 6. In The Wild 2.You Need a Strategy
  • 27. 1. Disclaimer 2. You Need a Strategy 3. Continuous Integration 4. Choose Your Tools 5. The Environment 6. In The Wild 2.You Need a Strategy
  • 28. YOU NEED A STRATEGY What's the use of running if you are not on the right road German proverb
  • 29. YOU NEED A STRATEGY Why do you need a strategy? you need a strategy because best practices and design patterns are the same in a 4 guys based company as well as in a large corporate.
  • 30. It doesn’t really matter if you are working at facebook, soundcloud or by yourself in a small office. How many people code?
  • 31. A real life example Small Web Agency 1 designer, 2 developers and a lot of small website with low maintenance rate.
  • 32. The designer introduces a slider on 5 websites: ”it’s cool on apple store”. The developer gets a jQuery plugin online a SLIDER’s Story
  • 33. The designer introduces a slider on 5 Major release of the websites: most used browser. ”it’s cool on apple store”. A small fix has been released, they have to change The developer gets a jQuery 5 files in 5 different projects. plugin online a SLIDER’s Story
  • 34. The designer Oh damn! There’s no introduces a slider on 5 Major release of the mouse wheel websites: most used browser. integration! ”it’s cool on apple store”. A small fix has been released, they have to change should they ask for support The developer gets a jQuery 5 files in 5 different projects. or should they change the plugin online library by themself? a SLIDER’s Story
  • 35. Am I the only one or there’s something wrong?
  • 36. Just a spoonful of sugar... manage codebase just in one place continue development without regression use stable versions of our libraries
  • 37. 1. Disclaimer 2. You Need a Strategy 3. Continuous Integration 4. Choose Your Tools 5. The Environment 6. In The Wild 3. Continuous Integration
  • 38. 1. Disclaimer 2. You Need a Strategy 3. Continuous Integration 4. Choose Your Tools 5. The Environment 6. In The Wild 3. Continuous Integration
  • 39. Continuous Integration A software development practice where members of a team integrate their work frequently. Each integration is verified by an automated build to detect integration errors as quickly as possible. Martin Fowler CI is about the fundamentals. If we don’t focus on the fundamentals we’ll be forced to perform low-level tasks later, usually at the most inconvenient times Paul Duvall, Continuous Integration
  • 40. I Build So Consistently
  • 41. I Build So Consistently identify
  • 42. I Build So Consistently build identify
  • 43. I Build So Consistently build identify share
  • 44. I Build So Consistently build identify share make it continuous
  • 45. How does this fit our needs?
  • 46. codebase just in one place setup an isolated repository for reusable libraries share the code through a CI process resolve dependency on websites
  • 47. continue development without regression validate the code run tests against errors (both coding and logic) version the shared code against interface changes
  • 48. stable versions use a declared semantic versioning use a file system based pattern: //jsRepo/dist/yourscript-1.0.0/yourscript.js //jsRepo/dist/yourscript-1.0.0.js never modify already released versions increase version number instead
  • 49. Unit & Functional an overview
  • 50. Unit & Functional an overview is it red? is it a 4x2 block? is the roof red? is it made to fit is there a porch? well other block? is there a door?
  • 51. Unit vs Functional test consistency test cross interaction control against execution test browser between over external time integration issues different codebase changes libraries
  • 55. an advice Keep it Simple & Smart Don’t over-engineer it: you will eventually regret every single useless complexity you will introduce
  • 56. 1. Disclaimer 2. You Need a Strategy 3. Continuous Integration 4. Choose Your Tools 5. The Environment 6. In The Wild 4. Choose Your Tools
  • 57. 1. Disclaimer 2. You Need a Strategy 3. Continuous Integration 4. Choose Your Tools 5. The Environment 6. In The Wild 4. Choose Your Tools
  • 58. CHOOSE YOUR TOOLS A man cannot be too careful in the choice of his enemies Oscar Wilde
  • 59. Another Neat Tool Simply saying the documentation sucks doesn't do any good Larry V. Streepy - Ant Mailing List 06.06.2001
  • 60. Another Neat Tool Simply saying the documentation sucks doesn't do any good Larry V. Streepy - Ant Mailing List 06.06.2001 He was right: 10 years later ANT documentation still sucks but ANT is a solid choice in build automation configuration.
  • 61. ANT XML driven: simple and straightforward a standard there are a lot of implementations and plugins every tool in this presentation is easily capable to be used in Ant build process
  • 62. ANT - Alternatives It's plenty of valuable Ant alternatives. Choose the one that fits better your needs
  • 63. Code Base: UNIT TEST RUNNER Websites: DEPENDENCY RESOLVER
  • 64. Code Base: JS TEST DRIVER Websites: DEPENDENCY RESOLVER
  • 65. JS Test Driver Js Test Driver is the most complete javascript unit test runner available external api integration jasmine and qunit as well as its own api test report console return and junit compatible report smooth integration both locally and on a build machine
  • 66. How does it work? It runs a server opens browsers runs test suites retrieves results on the console creates a report in JUnit format
  • 68. Sinon.js a standalone javascript library with unit test utilities fake server manage server response in order to test ajax interaction fake timer in order to test timeouts, intervals, animation callbacks... spy, stub & mock in order to make advanced assertions on object interaction
  • 69. JS Test Driver - Alternatives Env.JS a javascript DOM implementation in javascript engines: it is possible to fake browser execution and run unit tests. Yeti it stands for Yahoo Easy Test Interface and it is a very promising unit test runner, potentially the most suitable alternative.
  • 70. Code Base: JS TEST DRIVER Websites: DEPENDENCY RESOLVER
  • 71. Code Base: JS TEST DRIVER Websites: APACHE IVY
  • 72. Apache Ivy Ivy is a simple, powerful and well documented dependency manager It has a full integration in ANT build system and, again, it’s really simple, especially if you keep a file system based versioning.
  • 73. Ivy Alternatives Is there any alternative? I haven’t found anything simple enough to compete with Ivy straightforwardness: other solutions (ie. maven) drove me nuts
  • 74. 1. Disclaimer 2. You Need a Strategy 3. Continuous Integration 4. Choose Your Tools 5. The Environment 6. In The Wild 5. The Environment
  • 75. 1. Disclaimer 2. You Need a Strategy 3. Continuous Integration 4. Choose Your Tools 5. The Environment 6. In The Wild 5. The Environment
  • 76. THE ENVIRONMENT I like boring things Andy Warhol
  • 78. Javascript Repository / dist libs src tools build.xml
  • 79. Javascript Repository / dist libs src tools build.xml /tools/ jslint JsTestDriver-1.3.1
  • 80. Javascript Repository / /src/ dist form-validator libs slider src src tools slider.js build.xml test slider.test.js /tools/ jsTestDriver.conf jslint version.prop JsTestDriver-1.3.1 twitter-widget ...
  • 81. Javascript Repository /libs/ jquery-1.5.1.min.js sinon-1.0.0.js / /src/ dist form-validator libs slider src src tools slider.js build.xml test slider.test.js /tools/ jsTestDriver.conf jslint version.prop JsTestDriver-1.3.1 twitter-widget ...
  • 82. Javascript Repository /libs/ jquery-1.5.1.min.js sinon-1.0.0.js / /src/ dist form-validator libs slider src src tools slider.js build.xml test slider.test.js /tools/ jsTestDriver.conf jslint version.prop JsTestDriver-1.3.1 twitter-widget ...
  • 83. basepath: ../.. server: http://127.0.0.1:9876 load: - libs/sinon-1.0.0.js - libs/jquery-1.5.1.min.js - src/slider/src/slider.js - src/slider/test/slider.test.js JsTestDriver.conf
  • 85. Test var test = new TestCase("Slider.test", { setUp: function(){ }, tearDown: function(){ } }); Code var slider;
  • 86. Test var test = new TestCase("Slider.test", { setUp: function(){ /*:DOC += <ul id="foo"><li></li><li></li></ul> */ }, tearDown: function(){ } }); Code var slider;
  • 87. Test var test = new TestCase("Slider.test", { setUp: function(){ /*:DOC += <ul id="foo"><li></li><li></li></ul> */ }, testSliderIsAPlugin: function(){ var test = function(){ $("slidable").slider(); }; assertNoException(test); }, tearDown: function(){ } }); Code var slider;
  • 88. JS Test Driver in action
  • 89. Test var test = new TestCase("Slider.test", { setUp: function(){ /*:DOC += <ul id="foo"><li></li><li></li></ul> */ }, testSliderIsAPlugin: function(){ var test = function(){ $("slidable").slider(); }; assertNoException(test); }, tearDown: function(){ } }); Code var slider;
  • 90. Test var test = new TestCase("Slider.test", { setUp: function(){ /*:DOC += <ul id="foo"><li></li><li></li></ul> */ }, testSliderIsAPlugin: function(){ var test = function(){ $("slidable").slider(); }; assertNoException(test); }, tearDown: function(){ } }); Code (function($){ $.fn.slider = function(){}; }(jQuery));
  • 91. JS Test Driver in action
  • 92. Javascript Repository /libs/ jquery-1.5.1.min.js sinon-1.0.0.js / /src/ dist form-validator libs slider src src tools slider.js build.xml test slider.test.js /tools/ jsTestDriver.conf jslint version.prop JsTestDriver-1.3.1 twitter-widget ...
  • 93. Javascript Repository /dist/ /libs/ form-validator-1.0.0 jquery-1.5.1.min.js form-validator-1.1.0 sinon-1.0.0.js slider-1.0.0 / /src/ dist slider.min.js form-validator libs twitter-widget-1.0.0 slider src twitter-widget-1.0.1 src tools twitter-widget-2.0.0 slider.js build.xml ... test slider.test.js /tools/ jsTestDriver.conf jslint version.prop JsTestDriver-1.3.1 twitter-widget ...
  • 94. Test Ajax Call var test = new TestCase("mylib.test", { testAjaxCallSuccess: function(){ var server = sinon.useFakeServer(); server.respondWith("GET", "/some/article/comments.json", [200, {"Content-Type":"application/json"}, '[{ id:12, comment:"Hello"}]']); var callback = sinon.spy(); myLib.getCommentsFor("/some/article", callback); server.respond(); assert(callback.calledWith([{ id:12, comment:"Hello"}])); server.restore(); } });
  • 95. Test Ajax Timeout var test = new TestCase("mylib.test", { testAjaxCallTimeout: function(){ var server = sinon.useFakeServer(); server.respondWith("GET", "/some/article/comments.json", [200, {"Content-Type":"application/json"}, '[{ id:12, comment:"Hello"}]']); var timeoutCallback = sinon.spy(); var clock = sinon.useFakeTimers(); myLib.getCommentsFor("/some/article", function(){}, {onTimeout: timeoutCallback, timeout:2500}); clock.tick(2500); assert(timeoutCallback.called()); server.restore(); } });
  • 97. Website Solution / css img inc scripts .htaccess index.php
  • 98. Website Solution /scripts/ public / css src img tools inc apache-ivy-2.2.0 scripts yui-compressor-2.4.6 .htaccess ivy-settings.xml index.php mywebapp.xml ivy.xml
  • 99. Website Solution /scripts/ public / css src img tools inc apache-ivy-2.2.0 scripts yui-compressor-2.4.6 .htaccess ivy-settings.xml index.php mywebapp.xml ivy.xml
  • 100. <ivysettings> <settings defaultResolver="JSResolver"/> <resolvers> <url name="JSResolver" checkmodified="true"> <artifact pattern="//jsRepo/dist/[module]-[revision]/[module].js" /> </url> </resolvers> <caches defaultCacheDir="${basedir}/.artifacts" artifactPattern="[organization]/[module]-[revision].js" /> <property name="ivy.artifactproperty.name" value="[organization].[module]" /> <property name="ivy.artifactproperty.value" value="[organization]/[module]-[revision].js" /> </ivysettings>
  • 101. <ivysettings> <settings defaultResolver="JSResolver"/> <resolvers> <url name="JSResolver" checkmodified="true"> <artifact pattern="//jsRepo/dist/[module]-[revision]/[module].js" /> </url> </resolvers> <caches defaultCacheDir="${basedir}/.artifacts" artifactPattern="[organization]/[module]-[revision].js" /> <property name="ivy.artifactproperty.name" value="[organization].[module]" /> <property name="ivy.artifactproperty.value" value="[organization]/[module]-[revision].js" /> </ivysettings>
  • 102. <ivy-module version="2.0"> <info organisation="libs" module="myWebSite" /> <dependencies> <dependency org="libs" name="slider" rev="1.0.0"/> <dependency org="libs" name="twitter-widget" rev="2.0.0"/> <dependency org="libs" name="form-validator" rev="1.1.0"/> </dependencies> </ivy-module> ivy.xml
  • 103. <ivy-module version="2.0"> <info organisation="libs" module="myWebSite" /> <dependencies> <dependency org="libs" name="slider" rev="1.0.0"/> <dependency org="libs" name="twitter-widget" rev="2.0.0"/> <dependency org="libs" name="form-validator" rev="1.1.0"/> </dependencies> </ivy-module> ivy.xml
  • 104. 1. Disclaimer 2. You Need a Strategy 3. Continuous Integration 4. Choose Your Tools 5. The Environment 6. In The Wild 6. In The Wild
  • 105. 1. Disclaimer 2. You Need a Strategy 3. Continuous Integration 4. Choose Your Tools 5. The Environment 6. In The Wild 6. In The Wild
  • 106. IN THE WILD In the wild, there is no health care. Dwight Schrute (the office)
  • 107. so? what is it about? control & knowledge
  • 108. Inversion of control freakness 1 2 I am not a control freak. Gain control and then leave to the machine the responsibility to check everything; focus on knowledge. 1) Inspired (and I mean copied) by http://blog.jonathanoliver.com/ - Inversion of Control Freak: Dependency Injection, Domain-Driven Design, Test-Driven Development techniques 2) actually I am
  • 109. LOOKING FORWARD Javascript had several springs buzzwords: DHTML before and Ajax after big frameworks: from Prototype+Scriptaculous to jQuery future: HTML5
  • 110. LOOKING FORWARD Javascript had several springs buzzwords: DHTML before and Ajax after big frameworks: from Prototype+Scriptaculous to jQuery future: HTML5
  • 111. LOOKING FORWARD Javascript had several springs buzzwords: DHTML before and Ajax after big frameworks: from Prototype+Scriptaculous to jQuery future: HTML5 on browser
  • 112. LOOKING FORWARD Javascript had several springs buzzwords: DHTML before and Ajax after big frameworks: from Prototype+Scriptaculous to jQuery future: HTML5 on browser then there’s a brand new world on server: node.js, noSQL databases (couchdb, mongodb..)
  • 113. LOOKING FORWARD the further we look at, the more control we need
  • 114. LOOKING FORWARD the further we look at, the more control we need
  • 115. LOOKING FORWARD the further we look at, the more control we need javascript is a programming language
  • 116. LOOKING FORWARD the further we look at, the more control we need javascript is a programming language javascript is a serious business.
  • 117. LOOKING FORWARD the further we look at, the more control we need javascript is a programming language javascript is a serious business. and, most of all...

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n
  103. \n
  104. \n
  105. \n
  106. \n
  107. \n
  108. \n
  109. \n
  110. \n
  111. \n
  112. \n
  113. \n
  114. \n
  115. \n
  116. \n
  117. \n
  118. \n
  119. \n
  120. \n
  121. \n
  122. \n
  123. \n
  124. \n
  125. \n
  126. \n
  127. \n
  128. \n
  129. \n
  130. \n
  131. \n
  132. \n
  133. \n
  134. \n
  135. \n
  136. \n
  137. \n
  138. \n
  139. \n
  140. \n
  141. \n
  142. \n
  143. \n
  144. \n
  145. \n
  146. \n
  147. \n
  148. \n
  149. \n
  150. \n
  151. \n
  152. \n
  153. \n
  154. \n
  155. \n
  156. \n
  157. \n
  158. \n
  159. \n