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
2
190
Falling in love with AMD & RequireJS
The talk for the Spring JS meetup Ljubljana, Slovenia.
Primoz
April 02, 2014
Tweet
Share
More Decks by Primoz
See All by Primoz
Beauties & Challenges of Remote Work
primozcigler
0
71
Stripping down your CSS
primozcigler
1
110
WordPress Themes 101
primozcigler
0
80
ProteusThemes: from early days till today
primozcigler
0
240
mod_pagespeed? You should use it too!
primozcigler
1
310
From Pet Project to Full Grown Business
primozcigler
4
140
Other Decks in Programming
See All in Programming
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
2.3k
プロパティベーステストによるUIテスト: LLMによるプロパティ定義生成でエッジケースを捉える
tetta_pdnt
0
1.4k
Amazon RDS 向けに提供されている MCP Server と仕組みを調べてみた/jawsug-okayama-2025-aurora-mcp
takahashiikki
1
110
print("Hello, World")
eddie
2
530
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
310
Navigating Dependency Injection with Metro
zacsweers
3
770
MCPとデザインシステムに立脚したデザインと実装の融合
yukukotani
4
1.4k
今から始めるClaude Code入門〜AIコーディングエージェントの歴史と導入〜
nokomoro3
0
170
Navigation 2 を 3 に移行する(予定)ためにやったこと
yokomii
0
260
Design Foundational Data Engineering Observability
sucitw
3
200
MCPでVibe Working。そして、結局はContext Eng(略)/ Working with Vibe on MCP And Context Eng
rkaga
5
2.3k
為你自己學 Python - 冷知識篇
eddie
1
350
Featured
See All Featured
Designing Experiences People Love
moore
142
24k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
13k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Unsuck your backbone
ammeep
671
58k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.2k
Writing Fast Ruby
sferik
628
62k
A better future with KSS
kneath
239
17k
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