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
72
Stripping down your CSS
primozcigler
1
110
WordPress Themes 101
primozcigler
0
81
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
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
12
7.2k
EMこそClaude Codeでコード調査しよう
shibayu36
0
470
TransformerからMCPまで(現代AIを理解するための羅針盤)
mickey_kubo
7
5.7k
Vueのバリデーション、結局どれを選べばいい? ― 自作バリデーションの限界と、脱却までの道のり ― / Which Vue Validation Library Should We Really Use? The Limits of Self-Made Validation and How I Finally Moved On
neginasu
2
1.7k
AI時代に必須!状況言語化スキル / ai-context-verbalization
minodriven
2
200
3年ぶりにコードを書いた元CTOが Claude Codeと30分でMVPを作った話
maikokojima
0
690
Go言語はstack overflowの夢を見るか?
logica0419
0
650
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
330
AI駆動で0→1をやって見えた光と伸びしろ
passion0102
1
880
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
34k
SODA - FACT BOOK(JP)
sodainc
1
8.9k
GC25 Recap: The Code You Reviewed is Not the Code You Built / #newt_gophercon_tour
mazrean
0
130
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Bash Introduction
62gerente
615
210k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
jQuery: Nuts, Bolts and Bling
dougneiner
65
7.9k
Embracing the Ebb and Flow
colly
88
4.9k
Statistics for Hackers
jakevdp
799
220k
Designing Experiences People Love
moore
142
24k
GitHub's CSS Performance
jonrohan
1032
470k
GraphQLとの向き合い方2022年版
quramy
49
14k
Code Review Best Practice
trishagee
72
19k
Designing for humans not robots
tammielis
254
26k
RailsConf 2023
tenderlove
30
1.3k
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