Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Falling in love with AMD & RequireJS

Primoz
April 02, 2014

Falling in love with AMD & RequireJS

The talk for the Spring JS meetup Ljubljana, Slovenia.

Primoz

April 02, 2014

Transcript

37 slides
  1. Scuba diving Knife Sharpening Astrophysics Business & Management Photography Windsurfing

    Kiting Astronomy Travelling Astrophotography Free diving & snorkeling Archery Skiing Snowboarding Fishing Pool
  2. @primozcigler define(['jquery', 'dep2', 'dep3'], function ($, dep2) { /** *

    Init of the class, setting up the options */ var MyClass = function(options) { this.defaults = $.extend({}, MyClass.DEFAULTS, options); }; /* … */ return MyClass; });
  3. @primozcigler Umm, why again? • no global variables • single

    entry point to JS • more reusable blocks of code • easy to start • easy to build minified code

More Decks by Primoz

Other Decks in Programming