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
Uncommon Javascript Libraries
Search
ramiabraham
October 18, 2014
Programming
610
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Uncommon Javascript Libraries
Talk given at WordCamp Baltimore 2014
ramiabraham
October 18, 2014
More Decks by ramiabraham
See All by ramiabraham
JavaScript in WordPress: A Crash Course
ramiabraham
0
92
WordPress: the Next Generation
ramiabraham
0
360
Creating Private Networks with BuddyPress
ramiabraham
0
100
Avoiding Dangerous Plugins and Themes
ramiabraham
1
490
Maintaining sites with Preventive Development
ramiabraham
0
520
Maintaining Sites with Preventive Development
ramiabraham
0
900
Other Decks in Programming
See All in Programming
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.6k
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
1.9k
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
190
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4k
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
20
6.4k
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
450
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
200
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
250
AutonomyとControlのあいだ:Graflowで記述するAIエージェント協調
myui
0
120
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
500
The NotImplementedError Problem in Ruby
koic
1
700
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
2
500
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Navigating Team Friction
lara
192
16k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
140
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Context Engineering - Making Every Token Count
addyosmani
9
960
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
200
Test your architecture with Archunit
thirion
1
2.3k
Transcript
hi
Uncommon JavaScript Libraries in WordPress @RamiAbraham rami.nu/WCBalt2014
Libraries not used in ‘typical’ development. What do you mean
“uncommon”?
Ok, but what is “typical development”?
I don’t know.
Parse data from objects Add/remove attributes of nodes Add/remove nodes
Populate nodes Animate nodes Validate data Make something wiggle a little on :hover Time Travel Some common JavaScript tasks:
None
But I try to live by these wise words... JavaScript
can do anything.
“Never do with JavaScript what you can with... not JavaScript.”
- Abraham Lincoln
A few libraries we’re all familiar with: jQuery Grunt and
Gulp MooTools Chosen Backbone Angular Ember Scriptaculous ...yadda yadda who cares
There are two primary reasons ...to use an unfamiliar JavaScript
library...
1. Use a different approach to solve a recurring problem.
Why? Learn something new. - Consider a fresh approach to
an old problem - Learn new skills - Have fun - Learning - Learn - Learn stuff - Learn things about stuff
2. The new library is required by the project.
Ok, but what’s included in core?
Let’s take a look...
jQuery (core, multiple sub-libraries) jQuery UI (core, multiple sub-libraries) Thickbox
Iris MediaElement TinyMCE Underscore Backbone ..and some others, as well as core js, such as media-upload, admin-gallery, wp-ajax-response
There are many. Check out the wp_scripts global.
Whenever possible, use core. Don’t leave the house for milk
if there’s already perfectly good milk in your refrigerator.
However, core might not be what the project needs.
Here are some fancy use-cases. One possible solution will follow,
in the form of a cool JavaScript library.
Use Case: “I need this data to be represented as
an infinite landscape of constantly- scrolling waffles”
Sure, I’ll use Three.js. also I’ll need a deposit of
twenty-thousand dollars
Use Case: “I need a detailed, scrolling timeline of events”
Timeline.js
Use Case: “I need to make a complex, multi-thread timeline-based
animation”
Greensock Animation Platform
Use Case: “I need safe, reliable form validation”
Use Gravity Forms, what’s wrong with you
j/k, sometimes it needs to be custom Parsley is a
popular option for form validation.
Use Case: “I need a library that generates a fart
sound when a user scrolls up or down a page”
Wow. Maybe talk with your client.
But yes, there’s a library for that.
Ok, no more examples.
What are some risks? How weird can this get?
Risks: Things to ask when adding a library Does core
have a version of this library already?
Risks: Things to ask when adding a library Does core
have a version of this library already? Yes?
Risks: Things to ask when adding a library Does core
have a version of this library already? Yes? Yes?
Risks: Things to ask when adding a library Does core
have a version of this library already? Yes? Yes? It does?
Then what are you doing?
Then what are you doing? .......is it jQuery?
Is it jQuery?
Is it jQuery? IS IT????!
ARE YOU ENQUEUEING YOUR OWN JQUERY?!?
(Please don’t do that)
“Search through core before adding more.” - Burt Reynolds
Risks: Things to ask when adding a library How will
this affect DOM scope?
Risks: Things to ask when adding a library How late
can I defer loading?
Risks: Things to ask when adding a library Should I
consider a no-js fallback?
developer ...and Director of Snarky Comments about Slider Plugins @RamiAbraham
rami.nu/WCBalt2014
Thank you. k bye @RamiAbraham