SlideShare a Scribd company logo
RequireJS What is it? When to use it? by B.Shankar
What is it? A module loading library for Java Script by B.Shankar
When to use it? When you  needed to load multiple JavaScript files into an application Use RequireJS for Asynchronous Script Loading And JavaScript Dependency Management by B.Shankar
What it does? allows for asynchronous JavaScript loading and dependency management uses a modular approach to dependency definitions. by B.Shankar
It includes? optimization and "build" tools for deployment by B.Shankar
<!-- Load the RequireJS library; the &quot;data-main&quot; attribute will tell the RequireJS library which JavaScript file to load (main.js) after itself has loaded. --> <script type=&quot;text/javascript&quot; src=&quot;./require.js&quot; data-main=&quot;./main&quot;> </script> Load it and then define the initial JavaScript file. by B.Shankar
main.js require( [ &quot;jquery-1.6.4.js&quot;, &quot;friend&quot;, &quot;pet&quot;, &quot;cat-lover&quot; ], function( _jquery_, Friend, Pet, CatLover ) { } by B.Shankar
Require([ ], { }) require() executes code once the given dependencies have been loaded.  by B.Shankar
friend.js define( [ &quot;jquery-1.6.4.js&quot; ], function( _jquery_ ){ } by B.Shankar
Define([ ], { }) When you define a RequireJS module, you use the define() function. by B.Shankar

More Related Content

PDF
Require.JS
PPTX
Require js
PDF
Modularize JavaScript with RequireJS
PPTX
Introduction to require js
PPTX
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
PPT
Managing JavaScript Dependencies With RequireJS
PPTX
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS
PDF
Frontend Application Architecture, Patterns, and Workflows
Require.JS
Require js
Modularize JavaScript with RequireJS
Introduction to require js
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
Managing JavaScript Dependencies With RequireJS
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS
Frontend Application Architecture, Patterns, and Workflows

What's hot (20)

PPTX
Angular vs React: Building modern SharePoint interfaces with SPFx
PPTX
Latest Javascript MVC & Front End Frameworks 2017
PPTX
Single Page WebApp Architecture
PPTX
Step by Step - AngularJS
PPTX
Building single page applications
PPTX
Java script performance tips
PDF
Node PDX: Intro to Sails.js
PDF
OSGi and Spring Data for simple (Web) Application Development
PPTX
Kickstart sencha extjs
PDF
General Assembly Workshop: Advanced JavaScript
PPTX
Single Page Application (SPA) using AngularJS
PDF
JSConf US 2014: Building Isomorphic Apps
PDF
Django Rest Framework - Building a Web API
PPTX
Mvvm knockout vs angular
PDF
JavaScript MV* Framework - Making the Right Choice
PDF
AngularJS Introduction
ODP
Play with Angular JS
PDF
Isomorphic JavaScript: #DevBeat Master Class
PDF
MVC 1.0 als alternative Webtechnologie
PPTX
JavaScript Performance (at SFJS)
Angular vs React: Building modern SharePoint interfaces with SPFx
Latest Javascript MVC & Front End Frameworks 2017
Single Page WebApp Architecture
Step by Step - AngularJS
Building single page applications
Java script performance tips
Node PDX: Intro to Sails.js
OSGi and Spring Data for simple (Web) Application Development
Kickstart sencha extjs
General Assembly Workshop: Advanced JavaScript
Single Page Application (SPA) using AngularJS
JSConf US 2014: Building Isomorphic Apps
Django Rest Framework - Building a Web API
Mvvm knockout vs angular
JavaScript MV* Framework - Making the Right Choice
AngularJS Introduction
Play with Angular JS
Isomorphic JavaScript: #DevBeat Master Class
MVC 1.0 als alternative Webtechnologie
JavaScript Performance (at SFJS)
Ad

Viewers also liked (10)

PPTX
Cocoaheads - Streaming on iOS devices
PDF
Module, AMD, RequireJS
PDF
Curious case of Dust
PDF
Meet Handlebar
PDF
Using RequireJS for Modular JavaScript Code
KEY
Requirejs
PDF
Using RequireJS with CakePHP
PDF
PDF
Presentation - Bi-directional A-star search
PDF
SlideShare Experts - 7 Experts Reveal Their Presentation Design Secrets
Cocoaheads - Streaming on iOS devices
Module, AMD, RequireJS
Curious case of Dust
Meet Handlebar
Using RequireJS for Modular JavaScript Code
Requirejs
Using RequireJS with CakePHP
Presentation - Bi-directional A-star search
SlideShare Experts - 7 Experts Reveal Their Presentation Design Secrets
Ad

More from Imaginea (20)

PPTX
Web application penetration testing
PPTX
Network penetration testing
PDF
Scala and lift
PDF
Imaginea Service Sheet - Performance Engineering
PDF
Imaginea Service Sheet - Interaction Design
PDF
Imaginea - SugarCRM iPhone App - User Guide
PDF
Offline Enterprise and Web Apps: Dekoh Approach
PDF
Imaginea Scales Application using Amazon EC2
PDF
Whitepaper Cloud Egovernance Imaginea
PDF
Imaginea - Ideas to Life - About Us
PDF
Imaginea_CloudComputing_Services
PDF
Imaginea_Product Engineering_Services
PDF
Scaling Databases On The Cloud
PDF
Imaginea Cloud Offerings
PDF
Soa Offerings
PDF
Sharing on Dekoh - Our RIA Desktop Platform
PDF
Scaing databases on the cloud
PDF
Product QA - A test engineering perspective
PDF
Facebook Olympics
PDF
Process Guidelines V2
Web application penetration testing
Network penetration testing
Scala and lift
Imaginea Service Sheet - Performance Engineering
Imaginea Service Sheet - Interaction Design
Imaginea - SugarCRM iPhone App - User Guide
Offline Enterprise and Web Apps: Dekoh Approach
Imaginea Scales Application using Amazon EC2
Whitepaper Cloud Egovernance Imaginea
Imaginea - Ideas to Life - About Us
Imaginea_CloudComputing_Services
Imaginea_Product Engineering_Services
Scaling Databases On The Cloud
Imaginea Cloud Offerings
Soa Offerings
Sharing on Dekoh - Our RIA Desktop Platform
Scaing databases on the cloud
Product QA - A test engineering perspective
Facebook Olympics
Process Guidelines V2

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Machine learning based COVID-19 study performance prediction
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
20250228 LYD VKU AI Blended-Learning.pptx
cuic standard and advanced reporting.pdf
Encapsulation theory and applications.pdf
Review of recent advances in non-invasive hemoglobin estimation
The Rise and Fall of 3GPP – Time for a Sabbatical?
NewMind AI Monthly Chronicles - July 2025
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Empathic Computing: Creating Shared Understanding
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Dropbox Q2 2025 Financial Results & Investor Presentation
Machine learning based COVID-19 study performance prediction
NewMind AI Weekly Chronicles - August'25 Week I
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
“AI and Expert System Decision Support & Business Intelligence Systems”
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
MYSQL Presentation for SQL database connectivity
Chapter 3 Spatial Domain Image Processing.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing

Require JS

  • 1. RequireJS What is it? When to use it? by B.Shankar
  • 2. What is it? A module loading library for Java Script by B.Shankar
  • 3. When to use it? When you needed to load multiple JavaScript files into an application Use RequireJS for Asynchronous Script Loading And JavaScript Dependency Management by B.Shankar
  • 4. What it does? allows for asynchronous JavaScript loading and dependency management uses a modular approach to dependency definitions. by B.Shankar
  • 5. It includes? optimization and &quot;build&quot; tools for deployment by B.Shankar
  • 6. <!-- Load the RequireJS library; the &quot;data-main&quot; attribute will tell the RequireJS library which JavaScript file to load (main.js) after itself has loaded. --> <script type=&quot;text/javascript&quot; src=&quot;./require.js&quot; data-main=&quot;./main&quot;> </script> Load it and then define the initial JavaScript file. by B.Shankar
  • 7. main.js require( [ &quot;jquery-1.6.4.js&quot;, &quot;friend&quot;, &quot;pet&quot;, &quot;cat-lover&quot; ], function( _jquery_, Friend, Pet, CatLover ) { } by B.Shankar
  • 8. Require([ ], { }) require() executes code once the given dependencies have been loaded. by B.Shankar
  • 9. friend.js define( [ &quot;jquery-1.6.4.js&quot; ], function( _jquery_ ){ } by B.Shankar
  • 10. Define([ ], { }) When you define a RequireJS module, you use the define() function. by B.Shankar