SlideShare a Scribd company logo
1 of 21
Download to read offline
AngularJS with RequireJS
in practice
@jowe
Johannes Weber
Mayflower GmbH
Preview Take-aways
‣ AngularJS injects instances
‣ RequireJS injects classes
‣ Keep testing in mind when organizing your app structure
Is RequireJS really needed?
‣ Simple & small apps
‣ The whole code in one file
‣ Load all packages manually <script src=“…“></script
What about large apps…
… like apps with more classes?
http://andrewgelman.com/2009/06/30/visualizing_tab/
Schrift in weiß oder grau. Darauf achten, dass Text auf Motiv
lesbar bleibt.
Thema
It’s time for…
$ bower install requirejs
3 RequireJS APIs which you need to know
‣ define() 

define & register dependencies
‣ require() 

callback function invoked when all defines() have completed
‣ config() 

configure source paths, shims and aliases
define([dep1], function(dep1) {})
All your files are wrapped in a define()
define() must return a Object which is cached in a registry
require([dep1], function(dep1) {})
Act as initialization or root of the dependency tree
Starts the cascade of dependency checks and script loading
Starts the cascade of define() triggers
require.config()
RequireJS configuration (path to sources, caching, etc.)
Configuration or aliases and shims
„RequireJS is a JavaScript file and
module loader.“

(load and runtime dependency)
„AngularJS comes with a built-in
dependency injection mechanism.“

(construction and ng module dependency)
Hot to use it with AngularJS?
‣ Use define() around all your code
‣ Use require.config() to set your paths & config
‣ Use require() to launch your initialize your App
https://github.com/tnajdek/angular-requirejs-seed
Organize the app
Example: Modules main.js & index.js
Controller Example
Example: Controller
Example on Github
‣ https://github.com/feibeck/StarshipMayflower
r.js - the RequireJS Optimizer
‣ Build & deploy RequireJS Apps
‣ Deploy uncompressed
‣ Deploy concatenate & uglified
‣ Plugins available for
‣ grunt (grunt-requirejs)
‣ gulp(gulp-requirejs)
‣ broccoli (broccoli-requirejs)
Challenges on huge apps
‣ AMD is not just JavaScript, also CSS and Templates

RequireJS provides plugins for that
‣ Growing app size from trivial to complex

could be solved by partitioned modules
‣ On-demand load and unload modules

Currently very difficult
‣ AngularJS 2.0 - deferred loading with ES6 annonations
Lazy load approaches
‣ https://github.com/ifyio/angularjs-lazy-loading-with-requirejs
‣ https://github.com/szhanginrhythm/angular-require-lazyload
‣ https://github.com/stu-salsbury/angular-couch-potato/
@jowe
Let’s talk!
Johannes Weber

More Related Content

What's hot

Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slidessamhelman
 
AngularJS Introduction
AngularJS IntroductionAngularJS Introduction
AngularJS IntroductionCarlos Morales
 
AngularJS introduction
AngularJS introductionAngularJS introduction
AngularJS introductionTania Gonzales
 
Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014Stéphane Bégaudeau
 
Workshop 9: BackboneJS y patrones MVC
Workshop 9: BackboneJS y patrones MVCWorkshop 9: BackboneJS y patrones MVC
Workshop 9: BackboneJS y patrones MVCVisual Engineering
 
Angularjs architecture
Angularjs architectureAngularjs architecture
Angularjs architectureMichael He
 
Introduction to Angular js 2.0
Introduction to Angular js 2.0Introduction to Angular js 2.0
Introduction to Angular js 2.0Nagaraju Sangam
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework Sakthi Bro
 
The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014Matt Raible
 
ReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparisonReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparison500Tech
 
AngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UXAngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UXJWORKS powered by Ordina
 
Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSSimon Guest
 
Introduction to VueJS & Vuex
Introduction to VueJS & VuexIntroduction to VueJS & Vuex
Introduction to VueJS & VuexBernd Alter
 
Integrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationIntegrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationAndrew Rota
 
Workshop 2: JavaScript Design Patterns
Workshop 2: JavaScript Design PatternsWorkshop 2: JavaScript Design Patterns
Workshop 2: JavaScript Design PatternsVisual Engineering
 
Node, express & sails
Node, express & sailsNode, express & sails
Node, express & sailsBrian Shannon
 
Introduction to single page application with angular js
Introduction to single page application with angular jsIntroduction to single page application with angular js
Introduction to single page application with angular jsMindfire Solutions
 

What's hot (20)

AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
 
Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slides
 
AngularJS Introduction
AngularJS IntroductionAngularJS Introduction
AngularJS Introduction
 
AngularJS introduction
AngularJS introductionAngularJS introduction
AngularJS introduction
 
Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014
 
Workshop 9: BackboneJS y patrones MVC
Workshop 9: BackboneJS y patrones MVCWorkshop 9: BackboneJS y patrones MVC
Workshop 9: BackboneJS y patrones MVC
 
Angularjs architecture
Angularjs architectureAngularjs architecture
Angularjs architecture
 
Introduction to Angular js 2.0
Introduction to Angular js 2.0Introduction to Angular js 2.0
Introduction to Angular js 2.0
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework
 
The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
ReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparisonReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparison
 
AngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UXAngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UX
 
Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JS
 
Introduction to VueJS & Vuex
Introduction to VueJS & VuexIntroduction to VueJS & Vuex
Introduction to VueJS & Vuex
 
Integrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationIntegrating React.js Into a PHP Application
Integrating React.js Into a PHP Application
 
Workshop 2: JavaScript Design Patterns
Workshop 2: JavaScript Design PatternsWorkshop 2: JavaScript Design Patterns
Workshop 2: JavaScript Design Patterns
 
Node, express & sails
Node, express & sailsNode, express & sails
Node, express & sails
 
Introduction to single page application with angular js
Introduction to single page application with angular jsIntroduction to single page application with angular js
Introduction to single page application with angular js
 
5 angularjs features
5 angularjs features5 angularjs features
5 angularjs features
 

Viewers also liked

Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0 Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0 Sumanth Chinthagunta
 
2010-08-26-mongodb-step-by-step-by-hexnova
2010-08-26-mongodb-step-by-step-by-hexnova2010-08-26-mongodb-step-by-step-by-hexnova
2010-08-26-mongodb-step-by-step-by-hexnovaccdaisy
 
CONCEPT OF DISPARITIES AMONG WOMEN
CONCEPT OF DISPARITIES AMONG WOMENCONCEPT OF DISPARITIES AMONG WOMEN
CONCEPT OF DISPARITIES AMONG WOMENPooja Patil
 
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)Hexagonal architecture - message-oriented software design (PHP Benelux 2016)
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)Matthias Noback
 
Measuring the Performance of Single Page Applications
Measuring the Performance of Single Page ApplicationsMeasuring the Performance of Single Page Applications
Measuring the Performance of Single Page ApplicationsNicholas Jansma
 
Single-Page Application Design Principles 101
Single-Page Application Design Principles 101Single-Page Application Design Principles 101
Single-Page Application Design Principles 101Jollen Chen
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016Matt Raible
 
JS FAST Prototyping with AngularJS & RequireJS
JS FAST Prototyping with AngularJS & RequireJSJS FAST Prototyping with AngularJS & RequireJS
JS FAST Prototyping with AngularJS & RequireJSYuriy Silvestrov
 
Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap
Fast prototyping apps using AngularJS, RequireJS and Twitter BootstrapFast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap
Fast prototyping apps using AngularJS, RequireJS and Twitter BootstrapYuriy Silvestrov
 

Viewers also liked (11)

Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0 Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0
 
2010-08-26-mongodb-step-by-step-by-hexnova
2010-08-26-mongodb-step-by-step-by-hexnova2010-08-26-mongodb-step-by-step-by-hexnova
2010-08-26-mongodb-step-by-step-by-hexnova
 
CONCEPT OF DISPARITIES AMONG WOMEN
CONCEPT OF DISPARITIES AMONG WOMENCONCEPT OF DISPARITIES AMONG WOMEN
CONCEPT OF DISPARITIES AMONG WOMEN
 
Handlebars.js
Handlebars.jsHandlebars.js
Handlebars.js
 
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)Hexagonal architecture - message-oriented software design (PHP Benelux 2016)
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)
 
Measuring the Performance of Single Page Applications
Measuring the Performance of Single Page ApplicationsMeasuring the Performance of Single Page Applications
Measuring the Performance of Single Page Applications
 
Single-Page Application Design Principles 101
Single-Page Application Design Principles 101Single-Page Application Design Principles 101
Single-Page Application Design Principles 101
 
RequireJS & Handlebars
RequireJS & HandlebarsRequireJS & Handlebars
RequireJS & Handlebars
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
 
JS FAST Prototyping with AngularJS & RequireJS
JS FAST Prototyping with AngularJS & RequireJSJS FAST Prototyping with AngularJS & RequireJS
JS FAST Prototyping with AngularJS & RequireJS
 
Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap
Fast prototyping apps using AngularJS, RequireJS and Twitter BootstrapFast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap
Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap
 

Similar to AngularJS with RequireJS

AngularJS Project Setup step-by- step guide - RapidValue Solutions
AngularJS Project Setup step-by- step guide - RapidValue SolutionsAngularJS Project Setup step-by- step guide - RapidValue Solutions
AngularJS Project Setup step-by- step guide - RapidValue SolutionsRapidValue
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundryrajdeep
 
Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Tugdual Grall
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introductionRasheed Waraich
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - IntroductionWebStackAcademy
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest servicesIoan Eugen Stan
 
Single Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle StorySingle Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle StoryKon Soulianidis
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Enginecatherinewall
 
Basics of Vue.js 2019
Basics of Vue.js 2019Basics of Vue.js 2019
Basics of Vue.js 2019Paul Bele
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSGunnar Hillert
 
Dog food conference creating modular webparts with require js in sharepoint
Dog food conference   creating modular webparts with require js in sharepointDog food conference   creating modular webparts with require js in sharepoint
Dog food conference creating modular webparts with require js in sharepointfahey252
 
GWT training session 1
GWT training session 1GWT training session 1
GWT training session 1SNEHAL MASNE
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code IgniterAmzad Hossain
 
20170321 docker with Visual Studio 2017
20170321 docker with Visual Studio 201720170321 docker with Visual Studio 2017
20170321 docker with Visual Studio 2017Takayoshi Tanaka
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN StackRob Davarnia
 

Similar to AngularJS with RequireJS (20)

AngularJS Project Setup step-by- step guide - RapidValue Solutions
AngularJS Project Setup step-by- step guide - RapidValue SolutionsAngularJS Project Setup step-by- step guide - RapidValue Solutions
AngularJS Project Setup step-by- step guide - RapidValue Solutions
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry
 
Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Scripting Oracle Develop 2007
Scripting Oracle Develop 2007
 
RequireJS
RequireJSRequireJS
RequireJS
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - Introduction
 
Gradle
GradleGradle
Gradle
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest services
 
Single Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle StorySingle Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle Story
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
Basics of Vue.js 2019
Basics of Vue.js 2019Basics of Vue.js 2019
Basics of Vue.js 2019
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
 
Dog food conference creating modular webparts with require js in sharepoint
Dog food conference   creating modular webparts with require js in sharepointDog food conference   creating modular webparts with require js in sharepoint
Dog food conference creating modular webparts with require js in sharepoint
 
GWT training session 1
GWT training session 1GWT training session 1
GWT training session 1
 
Treinamento frontend
Treinamento frontendTreinamento frontend
Treinamento frontend
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code Igniter
 
React Native
React NativeReact Native
React Native
 
20170321 docker with Visual Studio 2017
20170321 docker with Visual Studio 201720170321 docker with Visual Studio 2017
20170321 docker with Visual Studio 2017
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
 
Google Cloud Platform
Google Cloud Platform Google Cloud Platform
Google Cloud Platform
 

More from Johannes Weber

Progressive Web Apps - Intro & Learnings
Progressive Web Apps - Intro & LearningsProgressive Web Apps - Intro & Learnings
Progressive Web Apps - Intro & LearningsJohannes Weber
 
Formular handling in AngularJS
Formular handling in AngularJSFormular handling in AngularJS
Formular handling in AngularJSJohannes Weber
 
AngularJS Munich Meetup #7 - Intro
AngularJS Munich Meetup #7 - IntroAngularJS Munich Meetup #7 - Intro
AngularJS Munich Meetup #7 - IntroJohannes Weber
 
#perfmatters - Optimizing the Critical Rendering Path
#perfmatters - Optimizing the Critical Rendering Path#perfmatters - Optimizing the Critical Rendering Path
#perfmatters - Optimizing the Critical Rendering PathJohannes Weber
 
LeanJS - Lean startup with JavaScript
LeanJS - Lean startup with JavaScriptLeanJS - Lean startup with JavaScript
LeanJS - Lean startup with JavaScriptJohannes Weber
 
The evolution of Angular 2 @ AngularJS Munich Meetup #5
The evolution of Angular 2 @ AngularJS Munich Meetup #5The evolution of Angular 2 @ AngularJS Munich Meetup #5
The evolution of Angular 2 @ AngularJS Munich Meetup #5Johannes Weber
 
A Story about AngularJS modularization development
A Story about AngularJS modularization developmentA Story about AngularJS modularization development
A Story about AngularJS modularization developmentJohannes Weber
 
Debugging War Stories & Strategies to Survive on RejectJS 2014
Debugging War Stories & Strategies to Survive on RejectJS 2014Debugging War Stories & Strategies to Survive on RejectJS 2014
Debugging War Stories & Strategies to Survive on RejectJS 2014Johannes Weber
 
Updated: Fiese Fallstricke, sexy Strategien
Updated: Fiese Fallstricke, sexy StrategienUpdated: Fiese Fallstricke, sexy Strategien
Updated: Fiese Fallstricke, sexy StrategienJohannes Weber
 
Responsive Webdesign: Fiese Fallstricke und sexy Strategien
Responsive Webdesign: Fiese Fallstricke und sexy StrategienResponsive Webdesign: Fiese Fallstricke und sexy Strategien
Responsive Webdesign: Fiese Fallstricke und sexy StrategienJohannes Weber
 
Facebook, Google, Youtube & co
Facebook, Google, Youtube & coFacebook, Google, Youtube & co
Facebook, Google, Youtube & coJohannes Weber
 
User centered design - Personas
User centered design - PersonasUser centered design - Personas
User centered design - PersonasJohannes Weber
 
Usability Test Inlandsüberweisung
Usability Test InlandsüberweisungUsability Test Inlandsüberweisung
Usability Test InlandsüberweisungJohannes Weber
 
Paper: Steuerung öffentlicher Screens
Paper: Steuerung öffentlicher ScreensPaper: Steuerung öffentlicher Screens
Paper: Steuerung öffentlicher ScreensJohannes Weber
 
Steuerung öffentlicher Screens
Steuerung öffentlicher ScreensSteuerung öffentlicher Screens
Steuerung öffentlicher ScreensJohannes Weber
 
Customer Centered Design
Customer Centered DesignCustomer Centered Design
Customer Centered DesignJohannes Weber
 
Hardware Usability Testing
Hardware Usability TestingHardware Usability Testing
Hardware Usability TestingJohannes Weber
 
Projektmanagement & Innovation
Projektmanagement & InnovationProjektmanagement & Innovation
Projektmanagement & InnovationJohannes Weber
 

More from Johannes Weber (20)

Progressive Web Apps - Intro & Learnings
Progressive Web Apps - Intro & LearningsProgressive Web Apps - Intro & Learnings
Progressive Web Apps - Intro & Learnings
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Formular handling in AngularJS
Formular handling in AngularJSFormular handling in AngularJS
Formular handling in AngularJS
 
AngularJS Munich Meetup #7 - Intro
AngularJS Munich Meetup #7 - IntroAngularJS Munich Meetup #7 - Intro
AngularJS Munich Meetup #7 - Intro
 
#perfmatters - Optimizing the Critical Rendering Path
#perfmatters - Optimizing the Critical Rendering Path#perfmatters - Optimizing the Critical Rendering Path
#perfmatters - Optimizing the Critical Rendering Path
 
LeanJS - Lean startup with JavaScript
LeanJS - Lean startup with JavaScriptLeanJS - Lean startup with JavaScript
LeanJS - Lean startup with JavaScript
 
The evolution of Angular 2 @ AngularJS Munich Meetup #5
The evolution of Angular 2 @ AngularJS Munich Meetup #5The evolution of Angular 2 @ AngularJS Munich Meetup #5
The evolution of Angular 2 @ AngularJS Munich Meetup #5
 
A Story about AngularJS modularization development
A Story about AngularJS modularization developmentA Story about AngularJS modularization development
A Story about AngularJS modularization development
 
Debugging War Stories & Strategies to Survive on RejectJS 2014
Debugging War Stories & Strategies to Survive on RejectJS 2014Debugging War Stories & Strategies to Survive on RejectJS 2014
Debugging War Stories & Strategies to Survive on RejectJS 2014
 
Updated: Fiese Fallstricke, sexy Strategien
Updated: Fiese Fallstricke, sexy StrategienUpdated: Fiese Fallstricke, sexy Strategien
Updated: Fiese Fallstricke, sexy Strategien
 
Responsive Webdesign: Fiese Fallstricke und sexy Strategien
Responsive Webdesign: Fiese Fallstricke und sexy StrategienResponsive Webdesign: Fiese Fallstricke und sexy Strategien
Responsive Webdesign: Fiese Fallstricke und sexy Strategien
 
Facebook, Google, Youtube & co
Facebook, Google, Youtube & coFacebook, Google, Youtube & co
Facebook, Google, Youtube & co
 
User centered design - Personas
User centered design - PersonasUser centered design - Personas
User centered design - Personas
 
jQuery Performance
jQuery PerformancejQuery Performance
jQuery Performance
 
Usability Test Inlandsüberweisung
Usability Test InlandsüberweisungUsability Test Inlandsüberweisung
Usability Test Inlandsüberweisung
 
Paper: Steuerung öffentlicher Screens
Paper: Steuerung öffentlicher ScreensPaper: Steuerung öffentlicher Screens
Paper: Steuerung öffentlicher Screens
 
Steuerung öffentlicher Screens
Steuerung öffentlicher ScreensSteuerung öffentlicher Screens
Steuerung öffentlicher Screens
 
Customer Centered Design
Customer Centered DesignCustomer Centered Design
Customer Centered Design
 
Hardware Usability Testing
Hardware Usability TestingHardware Usability Testing
Hardware Usability Testing
 
Projektmanagement & Innovation
Projektmanagement & InnovationProjektmanagement & Innovation
Projektmanagement & Innovation
 

Recently uploaded

ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 

Recently uploaded (20)

ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 

AngularJS with RequireJS

  • 1. AngularJS with RequireJS in practice @jowe Johannes Weber Mayflower GmbH
  • 2.
  • 3. Preview Take-aways ‣ AngularJS injects instances ‣ RequireJS injects classes ‣ Keep testing in mind when organizing your app structure
  • 4. Is RequireJS really needed? ‣ Simple & small apps ‣ The whole code in one file ‣ Load all packages manually <script src=“…“></script What about large apps…
  • 5. … like apps with more classes? http://andrewgelman.com/2009/06/30/visualizing_tab/
  • 6. Schrift in weiß oder grau. Darauf achten, dass Text auf Motiv lesbar bleibt. Thema It’s time for… $ bower install requirejs
  • 7. 3 RequireJS APIs which you need to know ‣ define() 
 define & register dependencies ‣ require() 
 callback function invoked when all defines() have completed ‣ config() 
 configure source paths, shims and aliases
  • 8. define([dep1], function(dep1) {}) All your files are wrapped in a define() define() must return a Object which is cached in a registry
  • 9. require([dep1], function(dep1) {}) Act as initialization or root of the dependency tree Starts the cascade of dependency checks and script loading Starts the cascade of define() triggers
  • 10. require.config() RequireJS configuration (path to sources, caching, etc.) Configuration or aliases and shims
  • 11. „RequireJS is a JavaScript file and module loader.“
 (load and runtime dependency) „AngularJS comes with a built-in dependency injection mechanism.“
 (construction and ng module dependency)
  • 12. Hot to use it with AngularJS? ‣ Use define() around all your code ‣ Use require.config() to set your paths & config ‣ Use require() to launch your initialize your App https://github.com/tnajdek/angular-requirejs-seed
  • 17. Example on Github ‣ https://github.com/feibeck/StarshipMayflower
  • 18. r.js - the RequireJS Optimizer ‣ Build & deploy RequireJS Apps ‣ Deploy uncompressed ‣ Deploy concatenate & uglified ‣ Plugins available for ‣ grunt (grunt-requirejs) ‣ gulp(gulp-requirejs) ‣ broccoli (broccoli-requirejs)
  • 19. Challenges on huge apps ‣ AMD is not just JavaScript, also CSS and Templates
 RequireJS provides plugins for that ‣ Growing app size from trivial to complex
 could be solved by partitioned modules ‣ On-demand load and unload modules
 Currently very difficult ‣ AngularJS 2.0 - deferred loading with ES6 annonations
  • 20. Lazy load approaches ‣ https://github.com/ifyio/angularjs-lazy-loading-with-requirejs ‣ https://github.com/szhanginrhythm/angular-require-lazyload ‣ https://github.com/stu-salsbury/angular-couch-potato/