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
210
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
Transcript
37 slides
@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
More Decks by Primoz
See All by Primoz
Beauties & Challenges of Remote Work
primozcigler
0
81
Stripping down your CSS
primozcigler
1
110
WordPress Themes 101
primozcigler
0
92
ProteusThemes: from early days till today
primozcigler
0
280
mod_pagespeed? You should use it too!
primozcigler
1
330
From Pet Project to Full Grown Business
primozcigler
4
150
Other Decks in Programming
See All in Programming
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
270
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
200
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
1k
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
210
将来の標準フォーマッター?ktfmtを深堀る
t45k
0
230
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
400
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
190
LLM 101
dalinaum
0
520
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
440
SODA - FACT BOOK(JP)
sodainc
1
40k
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
260
あなたはMCPの機能を、まだ知らない。
4geru
1
700
Featured
See All Featured
Side Projects
sachag
456
43k
Ethics towards AI in product and experience design
skipperchong
2
470
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
540
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
670
The SEO identity crisis: Don't let AI make you average
varn
0
630
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Un-Boring Meetings
codingconduct
0
500
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
850