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
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
[BalkanRuby 2026] Drop your app/services!
palkan
3
510
UaaL×Androidアプリのメモリ計測 — Memory Profilerの先へ
rio432
0
160
色即是空、空即是色、データサイエンス
kamoneggi
1
110
Import assertionsが消えた日~ECMAScriptの仕様はどう決まり、なぜ覆るのか~
bicstone
2
190
ふにゃっとしない名前の付け方 〜哲学で茹で上げる、コシのあるソフトウェア設計〜
shimomura
0
120
Are We Really Coding 10× Faster with AI?
kohzas
0
190
サーバーレスで作る、動画データ管理基盤
oyasumipants
0
210
Cloudflare で始める Data Platform
ta93abe
0
180
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
280
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
520
🦞OpenClaw works with AWS
licux
1
370
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
3
850
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.8k
The Curse of the Amulet
leimatthew05
1
12k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Music & Morning Musume
bryan
47
7.2k
From π to Pie charts
rasagy
0
180
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
180
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
140
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
Mind Mapping
helmedeiros
PRO
1
190
The Limits of Empathy - UXLibs8
cassininazir
1
330
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