Suche senden
Hochladen
ParisJS #10 : RequireJS
•
14 gefällt mir
•
2,817 views
Julien Cabanès
Folgen
Technologie
Business
Melden
Teilen
Melden
Teilen
1 von 36
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
ChtiJUG - Introduction à Angular2
ChtiJUG - Introduction à Angular2
Demey Emmanuel
Technozaure - Angular2
Technozaure - Angular2
Demey Emmanuel
Resource and view
Resource and view
Papp Laszlo
JavaScript Patterns and Principles
JavaScript Patterns and Principles
Aaronius
Beyond AngularJS: Best practices and more
Beyond AngularJS: Best practices and more
Ari Lerner
AngularJS best-practices
AngularJS best-practices
Henry Tao
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Frost
From Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) Again
jonknapp
Empfohlen
ChtiJUG - Introduction à Angular2
ChtiJUG - Introduction à Angular2
Demey Emmanuel
Technozaure - Angular2
Technozaure - Angular2
Demey Emmanuel
Resource and view
Resource and view
Papp Laszlo
JavaScript Patterns and Principles
JavaScript Patterns and Principles
Aaronius
Beyond AngularJS: Best practices and more
Beyond AngularJS: Best practices and more
Ari Lerner
AngularJS best-practices
AngularJS best-practices
Henry Tao
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Frost
From Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) Again
jonknapp
Refactoring JavaScript Applications
Refactoring JavaScript Applications
Jovan Vidić
CFUGbe talk about Angular JS
CFUGbe talk about Angular JS
Alwyn Wymeersch
Why angular js Framework
Why angular js Framework
Sakthi Bro
Modular and Event-Driven JavaScript
Modular and Event-Driven JavaScript
Eduardo Shiota Yasuda
Arquitetura de Front-end em Aplicações de Larga Escala
Arquitetura de Front-end em Aplicações de Larga Escala
Eduardo Shiota Yasuda
Creating Alloy Widgets
Creating Alloy Widgets
Mobile Data Systems Ltd.
Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator
Alessio Ricco
Effectively Testing Services - Burlington Ruby Conf
Effectively Testing Services - Burlington Ruby Conf
neal_kemp
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
Fwdays
Intro to AngularJS
Intro to AngularJS
Aaronius
An introduction to Ember.js
An introduction to Ember.js
codeofficer
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
Wim Selles
Architecture, Auth, and Routing with uiRouter
Architecture, Auth, and Routing with uiRouter
Christopher Caplinger
Angular JS - Introduction
Angular JS - Introduction
Sagar Acharya
Extend sdk
Extend sdk
Harsha Nagaraj
Intro to Ember.JS 2016
Intro to Ember.JS 2016
Sandino Núñez
Intro to Ember.js
Intro to Ember.js
Jay Phelps
Styling recipes for Angular components
Styling recipes for Angular components
Nir Kaufman
Testing C# and ASP.net using Ruby
Testing C# and ASP.net using Ruby
Ben Hall
IndexedDB - Querying and Performance
IndexedDB - Querying and Performance
Parashuram N
A gently introduction to AngularJS
A gently introduction to AngularJS
Gregor Woiwode
Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)
Spike Brehm
Weitere ähnliche Inhalte
Was ist angesagt?
Refactoring JavaScript Applications
Refactoring JavaScript Applications
Jovan Vidić
CFUGbe talk about Angular JS
CFUGbe talk about Angular JS
Alwyn Wymeersch
Why angular js Framework
Why angular js Framework
Sakthi Bro
Modular and Event-Driven JavaScript
Modular and Event-Driven JavaScript
Eduardo Shiota Yasuda
Arquitetura de Front-end em Aplicações de Larga Escala
Arquitetura de Front-end em Aplicações de Larga Escala
Eduardo Shiota Yasuda
Creating Alloy Widgets
Creating Alloy Widgets
Mobile Data Systems Ltd.
Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator
Alessio Ricco
Effectively Testing Services - Burlington Ruby Conf
Effectively Testing Services - Burlington Ruby Conf
neal_kemp
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
Fwdays
Intro to AngularJS
Intro to AngularJS
Aaronius
An introduction to Ember.js
An introduction to Ember.js
codeofficer
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
Wim Selles
Architecture, Auth, and Routing with uiRouter
Architecture, Auth, and Routing with uiRouter
Christopher Caplinger
Angular JS - Introduction
Angular JS - Introduction
Sagar Acharya
Extend sdk
Extend sdk
Harsha Nagaraj
Intro to Ember.JS 2016
Intro to Ember.JS 2016
Sandino Núñez
Intro to Ember.js
Intro to Ember.js
Jay Phelps
Styling recipes for Angular components
Styling recipes for Angular components
Nir Kaufman
Testing C# and ASP.net using Ruby
Testing C# and ASP.net using Ruby
Ben Hall
IndexedDB - Querying and Performance
IndexedDB - Querying and Performance
Parashuram N
Was ist angesagt?
(20)
Refactoring JavaScript Applications
Refactoring JavaScript Applications
CFUGbe talk about Angular JS
CFUGbe talk about Angular JS
Why angular js Framework
Why angular js Framework
Modular and Event-Driven JavaScript
Modular and Event-Driven JavaScript
Arquitetura de Front-end em Aplicações de Larga Escala
Arquitetura de Front-end em Aplicações de Larga Escala
Creating Alloy Widgets
Creating Alloy Widgets
Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator
Effectively Testing Services - Burlington Ruby Conf
Effectively Testing Services - Burlington Ruby Conf
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
Intro to AngularJS
Intro to AngularJS
An introduction to Ember.js
An introduction to Ember.js
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
Architecture, Auth, and Routing with uiRouter
Architecture, Auth, and Routing with uiRouter
Angular JS - Introduction
Angular JS - Introduction
Extend sdk
Extend sdk
Intro to Ember.JS 2016
Intro to Ember.JS 2016
Intro to Ember.js
Intro to Ember.js
Styling recipes for Angular components
Styling recipes for Angular components
Testing C# and ASP.net using Ruby
Testing C# and ASP.net using Ruby
IndexedDB - Querying and Performance
IndexedDB - Querying and Performance
Ähnlich wie ParisJS #10 : RequireJS
A gently introduction to AngularJS
A gently introduction to AngularJS
Gregor Woiwode
Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)
Spike Brehm
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
Api development with rails
Api development with rails
Edwin Cruz
Building Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJS
Antonio Peric-Mazar
AngularJS - Services
AngularJS - Services
Nir Kaufman
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
Gunnar Hillert
A Story about AngularJS modularization development
A Story about AngularJS modularization development
Johannes Weber
Telerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT Conference
Jen Looper
Angular1x and Angular 2 for Beginners
Angular1x and Angular 2 for Beginners
Oswald Campesato
Introducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and server
Spike Brehm
Python Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - Appengine
Python Ireland
using Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API's
Antônio Roberto Silva
Angular server side rendering - Strategies & Technics
Angular server side rendering - Strategies & Technics
Eliran Eliassy
SharePoint Framework, Angular and Azure Functions
SharePoint Framework, Angular and Azure Functions
Sébastien Levert
Containers & Dependency in Ember.js
Containers & Dependency in Ember.js
Matthew Beale
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
Wim Selles
Angular 4 for Java Developers
Angular 4 for Java Developers
Yakov Fain
Drupal 8, Where Did the Code Go? From Info Hook to Plugin
Drupal 8, Where Did the Code Go? From Info Hook to Plugin
Acquia
20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev
Frank Rousseau
Ähnlich wie ParisJS #10 : RequireJS
(20)
A gently introduction to AngularJS
A gently introduction to AngularJS
Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Api development with rails
Api development with rails
Building Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJS
AngularJS - Services
AngularJS - Services
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
A Story about AngularJS modularization development
A Story about AngularJS modularization development
Telerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT Conference
Angular1x and Angular 2 for Beginners
Angular1x and Angular 2 for Beginners
Introducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and server
Python Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - Appengine
using Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API's
Angular server side rendering - Strategies & Technics
Angular server side rendering - Strategies & Technics
SharePoint Framework, Angular and Azure Functions
SharePoint Framework, Angular and Azure Functions
Containers & Dependency in Ember.js
Containers & Dependency in Ember.js
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
Angular 4 for Java Developers
Angular 4 for Java Developers
Drupal 8, Where Did the Code Go? From Info Hook to Plugin
Drupal 8, Where Did the Code Go? From Info Hook to Plugin
20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev
Kürzlich hochgeladen
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
sammart93
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Remote DBA Services
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
apidays
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
Pixlogix Infotech
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Enterprise Knowledge
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Antenna Manufacturer Coco
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
The Digital Insurer
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
Khem
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc
Kürzlich hochgeladen
(20)
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
ParisJS #10 : RequireJS
1.
Dependency Management
with RequireJS http://requirejs.org/
2.
Who ? Julien Cabanès Front
End Developper mail : julien@zeeagency.com twitter : @JulienCabanes github : github.com/ZeeAgency
3.
What are we
talkin’ about? • RequireJS.org : Script Module Loader • Browsers && Node && Rhino • Dependencies • Global Pollution • Optimization
4.
Context Libs of choice
jQuery Backbone
5.
Context Libs of choice
Plugins jQuery Backbone
6.
Context Libs of choice
Plugins Your Code jQuery Backbone
7.
Bad Context Libs of
choice Plugins Your Code jQuery Backbone
8.
Good Context Libs of
choice Plugins Your Code jQuery Backbone
9.
Dependencies Libs of choice
Plugins Your Code jQuery Backbone
10.
Solution ? <script
src="jquery.min.js"></script> <script src="backbone.min.js"></script> ... <script src="jquery.plugin.js"></script> <script src="jquery.plugin.js"></script> ... <script src="my-code.js"></script> <script src="my-code.js"></script> <script src="my-code.js"></script> <script src="my-code.js"></script> <script src="my-code.js"></script> ...
11.
Async Solution ? <script
src="LAB.js"></script> <script type="text/javascript"> $LAB .script('jquery.min.js') .script('backbone.min.js') ... .script('jquery.plugin.js') .script('jquery.plugin.js') .script('jquery.plugin.js') ... .script('my-code.js') .script('my-code.js') .script('my-code.js'); </script>
12.
Namespace ? var MyNamespace
= {}; MyNamespace.Config = {…}; MyNamespace.Product = function() {…}; MyNamespace.Video = function() {…}; MyNamespace.Audio = function() {…}; MyNamespace.Mail = function() {…};
13.
AMD Not your CPU... Asynchronous
Module Definition https://github.com/amdjs/amdjs-api/wiki/AMD
14.
define() API define(id?, dependencies?, factory); Usage define('My-Module',
['Another-Module'], function(AnotherModule) { // Do Something } );
15.
Example // App/Conf.js define(function() {
return { path: '...', debug: true, ... }; });
16.
Example // App/Conf.js define(function() {
return { path: '...', debug: true, ... }; });
17.
Example // App/Controller/Product.js define(['App/Conf', 'App/Models/Product',
'App/Views/Product'], function(Conf, Model, View) { // Locale & Private Vars !!! var myPrivateVar = {...}; // API return { show: function(productId) { console.log(Conf.path); var productView = new View(); productView.setModel(Model.getById(productId)); return productView.render(); }, ... }; });
18.
Example // App/Controller/Product.js define(['App/Conf', 'App/Models/Product',
'App/Views/Product'], function(Conf, Model, View) { // Locale & Private Vars !!! var myPrivateVar = {...}; // API return { show: function(productId) { console.log(Conf.path); var productView = new View(); productView.setModel(Model.getById(productId)); return productView.render(); }, ... }; });
19.
Example // App/Controller/Product.js define(['App/Conf', 'App/Models/Product',
'App/Views/Product'], function(Conf, Model, View) { // Locale & Private Vars !!! var myPrivateVar = {...}; // API return { show: function(productId) { console.log(Conf.path); var productView = new View(); productView.setModel(Model.getById(productId)); return productView.render(); }, ... }; });
20.
Example // App/Controller/Product.js define(['App/Conf', 'App/Models/Product',
'App/Views/Product'], function(Conf, Model, View) { // Locale & Private Vars !!! var myPrivateVar = {...}; // API return { show: function(productId) { console.log(Conf.path); var productView = new View(); productView.setModel(Model.getById(productId)); return productView.render(); }, ... }; });
21.
Example // App/Controller/Product.js define(['App/Conf', 'App/Models/Product',
'App/Views/Product'], function(Conf, Model, View) { // Locale & Private Vars !!! var myPrivateVar = {...}; // API return { show: function(productId) { console.log(Conf.path); var productView = new View(); productView.setModel(Model.getById(productId)); return productView.render(); }, ... }; });
22.
Scope vs. Global
Pollution // App/Controller/Product.js define(['App/Conf', 'App/Models/Product', 'App/Views/Product'], function(Conf, Model, View) { // Locale & Private Vars !!! var myPrivateVar = {...}; // API return { show: function(productId) { console.log(Conf.path); var productView = new View(); productView.setModel(Model.getById(productId)); return productView.render(); }, ... }; });
23.
Plugins Example // App/View/Product.js define([
'order!FirstModule', 'order!SecondModule', 'i18n!fr/some-i18n-bundle', 'text!some-text-file.txt', 'cs!some-coffee', 'tpl!App/View/Product.tpl' ], function(First, Second, bundle, text, coffee, productTpl) { // API return Backbone.View.extend({ render: function() { return productTpl({ model: this.model.toJSON() }); } }); });
24.
Order Plugin // App/View/Product.js define([
'order!FirstModule', // Keep execution order 'order!SecondModule', // requirejs.org/docs/api.html#order 'i18n!fr/some-i18n-bundle', 'text!some-text-file.txt', 'cs!some-coffee', 'tpl!App/View/Product.tpl' ], function(First, Second, bundle, text, coffee, productTpl) { // API return Backbone.View.extend({ render: function() { return productTpl({ model: this.model.toJSON() }); } }); });
25.
i18n Plugin // App/View/Product.js define([
'order!FirstModule', 'order!SecondModule', 'i18n!fr/some-i18n-bundle', // Load i18n bundle 'text!some-text-file.txt', // requirejs.org/docs/api.html#i18n 'cs!some-coffee', 'tpl!App/View/Product.tpl' ], function(First, Second, bundle, text, coffee, productTpl) { // API return Backbone.View.extend({ render: function() { return productTpl({ model: this.model.toJSON() }); } }); });
26.
Text Plugin // App/View/Product.js define([
'order!FirstModule', 'order!SecondModule', 'i18n!fr/some-i18n-bundle', 'text!some-text-file.txt', // Guess what ? 'cs!some-coffee', // requirejs.org/docs/api.html#text 'tpl!App/View/Product.tpl' ], function(First, Second, bundle, text, coffee, productTpl) { // API return Backbone.View.extend({ render: function() { return productTpl({ model: this.model.toJSON() }); } }); });
27.
CoffeeScript Plugin // App/View/Product.js define([
'order!FirstModule', 'order!SecondModule', 'i18n!fr/some-i18n-bundle', 'text!some-text-file.txt', 'cs!some-coffee', // returns compiled CoffeeScript ! 'tpl!App/View/Product.tpl' // github.com/jrburke/require-cs ], function(First, Second, bundle, text, coffee, productTpl) { // API return Backbone.View.extend({ render: function() { return productTpl({ model: this.model.toJSON() }); } }); });
28.
Template Plugin // App/View/Product.js define([
'order!FirstModule', 'order!SecondModule', 'i18n!fr/some-i18n-bundle', 'text!some-text-file.txt', // My Favorite Plugin ! (mine...) 'cs!some-coffee', // Returns a compiled template ! 'tpl!App/View/Product.tpl' // github.com/ZeeAgency/requirejs-tpl ], function(First, Second, bundle, text, coffee, productTpl) { // API return Backbone.View.extend({ render: function() { return productTpl({ model: this.model.toJSON() }); } }); });
29.
Optimization node r.js -o
name=bootstrap out=built.js baseUrl=js http://requirejs.org/docs/optimization.html
30.
Remember ? Libs of
choice Plugins Your Code jQuery Backbone
31.
Optimized ! Libs of
choice Ready for Production jQuery
32.
Optimized ! Libs of
choice Ready for Production jQuery CoffeeScript ?
33.
Optimized ! Libs of
choice Ready for Production jQuery CoffeeScript ? Templates ?
34.
Optimized ! Libs of
choice Ready for Production jQuery CoffeeScript ? Templates ? Compiled & Minified so browser doesn’t need to...
35.
Optimized ! Libs of
choice Ready for Production jQuery CoffeeScript ? Templates ? Compiled & Minified
36.
Thx !
Jetzt herunterladen