Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Falling in love with AMD & RequireJS
Search
Primoz
April 02, 2014
Programming
200
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Falling in love with AMD & RequireJS
The talk for the Spring JS meetup Ljubljana, Slovenia.
Primoz
April 02, 2014
More Decks by Primoz
See All by Primoz
Beauties & Challenges of Remote Work
primozcigler
0
80
Stripping down your CSS
primozcigler
1
110
WordPress Themes 101
primozcigler
0
92
ProteusThemes: from early days till today
primozcigler
0
270
mod_pagespeed? You should use it too!
primozcigler
1
320
From Pet Project to Full Grown Business
primozcigler
4
150
Other Decks in Programming
See All in Programming
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
250
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.4k
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
780
Agents on Rails - Rails at Scale 2026
irinanazarova
0
530
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
160
contenteditable と日本語入力に向き合う
colorful12
0
190
Are APIs Still Relevant in the AI Era?
soyuka
0
460
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
180
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
速習iPhone Duo対応
yuukiw00w
2
980
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
Featured
See All Featured
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
340
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
560
Technical Leadership for Architectural Decision Making
baasie
3
600
From π to Pie charts
rasagy
1
400
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.2k
GraphQLとの向き合い方2022年版
quramy
50
15k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
730
Abbi's Birthday
coloredviolet
4
10k
Design in an AI World
tapps
1
350
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
520
Transcript
@primozcigler Falling in with AMD & RequireJS ❤
None
None
None
None
@primozcigler
Scuba diving Knife Sharpening Astrophysics Business & Management Photography Windsurfing
Kiting Astronomy Travelling Astrophotography Free diving & snorkeling Archery Skiing Snowboarding Fishing Pool
Why?
@primozcigler 27 HTML files
@primozcigler HARD to maintain
@primozcigler custom.js
@primozcigler jquery.js jquery-plugin.js jquery-plugin.js jquery-plugin.js custom.js
None
None
None
@primozcigler HARD to reuse
@primozcigler That’s why people hated JS
AMD!
None
YO DAWG VOTED UP!
None
None
@primozcigler Modules = easily reusable code
@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; });
bit.ly/1fJXEux
Add-ons
@primozcigler Optimization tool
None
bit.ly/1krgkm3
@primozcigler Use Almond for production PROTIP
@primozcigler Configure RequireJS with Grunt PROTIP
Recap
@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
@primozcigler It’s SPRING!
@primozcigler It’s time for YOU to start falling in with
AMD & RequireJS ❤
@primozcigler Primož Cigler @primozcigler
[email protected]
@primozcigler Images • http://en.wikipedia.org/wiki/File:Asynchronous_Module_Definition_overview.png • http://fedgeno.com/meme-generator/uploads/152.png • http://s2.quickmeme. com/img/39/393a980a3c2a2a584363a5ddceb4420557d47bc36be20d7d23ba9ee92 2b86e62.jpg
• color palette: http://www.colourlovers.com/palette/867235/LoversInJapan