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
0
600
Uncommon Javascript Libraries
Talk given at WordCamp Baltimore 2014
ramiabraham
October 18, 2014
Tweet
Share
More Decks by ramiabraham
See All by ramiabraham
JavaScript in WordPress: A Crash Course
ramiabraham
0
83
WordPress: the Next Generation
ramiabraham
0
350
Creating Private Networks with BuddyPress
ramiabraham
0
100
Avoiding Dangerous Plugins and Themes
ramiabraham
1
480
Maintaining sites with Preventive Development
ramiabraham
0
520
Maintaining Sites with Preventive Development
ramiabraham
0
880
Other Decks in Programming
See All in Programming
組織で育むオブザーバビリティ
ryota_hnk
0
170
CSC307 Lecture 04
javiergs
PRO
0
660
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
640
2026年 エンジニアリング自己学習法
yumechi
0
130
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
110
CSC307 Lecture 02
javiergs
PRO
1
770
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
Data-Centric Kaggle
isax1015
2
760
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
700
AI巻き込み型コードレビューのススメ
nealle
0
130
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6k
Featured
See All Featured
Evolving SEO for Evolving Search Engines
ryanjones
0
120
Deep Space Network (abreviated)
tonyrice
0
46
How to Talk to Developers About Accessibility
jct
2
130
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The Spectacular Lies of Maps
axbom
PRO
1
520
The Limits of Empathy - UXLibs8
cassininazir
1
210
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
640
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
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