Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
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
76
Stripping down your CSS
primozcigler
1
110
WordPress Themes 101
primozcigler
0
87
ProteusThemes: from early days till today
primozcigler
0
260
mod_pagespeed? You should use it too!
primozcigler
1
320
From Pet Project to Full Grown Business
primozcigler
4
140
Other Decks in Programming
See All in Programming
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
150
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
6.4k
コーディングルールの鮮度を保ちたい for SRE NEXT 2026 / keep-fresh-go-internal-conventions-sre-next-2026
handlename
0
140
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
340
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
960
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
270
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
210
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
320
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
170
フィードバックで育てるAI開発
kotaminato
1
120
Featured
See All Featured
My Coaching Mixtape
mlcsv
0
170
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
360
From π to Pie charts
rasagy
0
240
RailsConf 2023
tenderlove
30
1.5k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
240
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.7k
Automating Front-end Workflow
addyosmani
1370
210k
GitHub's CSS Performance
jonrohan
1033
470k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
How to Talk to Developers About Accessibility
jct
2
410
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