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
77
Stripping down your CSS
primozcigler
1
110
WordPress Themes 101
primozcigler
0
88
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
140
Other Decks in Programming
See All in Programming
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
160
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.1k
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
19k
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
4
1.7k
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
240
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
490
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
150
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
530
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
210
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
200
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
6.2k
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
110
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
698
190k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
350
Claude Code のすすめ
schroneko
67
230k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
210
AI: The stuff that nobody shows you
jnunemaker
PRO
9
930
Unsuck your backbone
ammeep
672
58k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
290
Building the Perfect Custom Keyboard
takai
2
840
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
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