+ All Categories
Home > Documents > Treating Framework Fatigue With...

Treating Framework Fatigue With...

Date post: 22-May-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
37
Treating Framework Fatigue With JavaScript Tim Doherty Software Architect TimCDoherty timdoherty.net /in/timdoherty
Transcript
Page 1: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Treating Framework Fatigue With JavaScript

Tim DohertySoftware Architect

TimCDoherty timdoherty.net/in/timdoherty

Page 2: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

TimCDoherty

Page 3: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

???

TimCDoherty

Page 4: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Hey, this one looks cool!TimCDoherty

Page 5: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

You May Suffer From Framework Fatigue

TimCDoherty

Page 6: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Symptoms

TimCDoherty

Page 7: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

ConfusionTimCDoherty

Page 8: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

• One-way reactive data flow

• Two-way data binding

• Micro-frameworks

• Virtual DOM

• Extensible HTML

• Decoupled, event-driven architecture

• MVC, MVP, MVW, MVVM, MV???

TimCDoherty

Page 9: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

AmbivalenceTimCDoherty

Page 10: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

https://twitter.com/jesterxl/status/598885321808424960TimCDoherty

Page 11: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

• Another framework? Seriously?

• Mine’s The Right Framework™, who cares?

• My framework does the job, why do I need The Right Framework™?

• Do I even need a framework?

TimCDoherty

Page 12: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

SkepticismTimCDoherty

Page 13: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

• “3x to 5x faster on initial render and re-render scenarios”

• “More powerful than Backbone and faster or more flexible than React, Meteor, and AngularJS”

• “…faster than you ever thought possible.”

• “…a simpler programming model and better performance.”

• “More productive out of the box”

• “The most powerful, flexible and forward-looking JavaScript client framework in the world"

TimCDoherty

Page 14: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Reduced Capacity for Hype and Marketing Lingo

TimCDoherty

Page 15: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

• “A Javascript Framework for Building Brilliant Applications”

• “Superheroic JavaScript MVW Framework”

• “Designed with developer ergonomics in mind, its friendly APIs help you get your job done—fast”

• “A next gen JavaScript client framework for mobile, desktop and web that leverages simple conventions to empower your creativity"

• “Simplify dynamic JavaScript UIs with the Model-View-View Model (MVVM) pattern”

• “Declarative component sugar for event-driven RequireJS apps”

• “Intuitive, Fast and Composable MVVM for building interactive interfaces”

• “A highly modular, loosely coupled, non-frameworky framework for building advanced JavaScript apps”

TimCDoherty

Page 16: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

TimCDoherty

Page 17: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Treatment

TimCDoherty

Page 18: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Go NativeTimCDoherty

Page 19: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Favor built-ins (standard library) over framework/library equivalents

• Array: forEach(), find(), map(), every()

• Object: defineProperty(), assign(), keys()

• Function: bind()

• String: startsWith(), includes(), endsWith()

• Tagged Template Literals*

TimCDoherty

Page 20: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

If performance really matters, go native anyway:

TimCDoherty

Page 21: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Go DeepTimCDoherty

Page 22: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Learn ES 5

• Everything in ES 5 is still valid JavaScript

• ECMAScript 2015 (a.k.a. ES 6) is a superset of ES 5

• Much of the new ES 6 syntax is just terse, concise ES 5

TimCDoherty

Page 23: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Prototypal Inheritance

• But… JavaScript has classes now, right?

• Object.create

• Differential vs. Concatenative (mixins)

Functional Programming

• First-class and higher order functions

• Pure functions

TimCDoherty

Page 24: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Closures, IIFEs, module pattern

Type coercion

Lexical scope and hoisting

Equality and strict equality

Asynchrony and callbacks

Function call(), apply(), and bind()

What in the hell “this” is?

TimCDoherty

Page 25: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Learn ES 6 (and beyond)New syntax

• Let/const, rest/spread, destructuring, arrow functions…

Enhanced standard library

• Object, array, string, math, number, regex…

Entirely new features

• Iterators/generators, proxies, map/set, promises, symbols…

TimCDoherty

Page 26: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

(shameless plug)

• ECMAScript 6 In Depth: Part I - Tim Doherty

• ECMAScript 6 In Depth: Part II - Tim Doherty

• ECMAScript 6 In Depth: Part III - Tim Doherty

TimCDoherty

Page 27: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Use the Source!TimCDoherty

Page 28: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Ember

TimCDoherty

Page 29: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Angular

TimCDoherty

Page 30: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Lodash

TimCDoherty

Page 31: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

• Original jQuery annotated source

• Underscore annotated source

• Backbone annotated source

• 10 Things I Learned From the jQuery Source - Paul Irish

TimCDoherty

Page 32: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Learn what is and isn’t JavaScripthttp://i.stack.imgur.com/SeCUb.jpgTimCDoherty

Page 33: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

• Language vs. environment

• Browser, server, database, OS

• Host-provided APIs (DOM, XMLHttpRequest, etc.)

• Complimentary technologies (CSS)

• Go deep with the language first

• Then go deep with supporting technologies (DOM, CSS, etc.)

http://i.stack.imgur.com/SeCUb.jpg

TimCDoherty

Page 34: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Learn How to Learn

TimCDoherty

Page 35: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

• Change is the only constant

• Even The Right Framework™’s days will be numbered

• You cannot know everything about everything

• Learn enough to be productive, then improve by immersion

• Develop a strategy for focused knowledge gathering

TimCDoherty

Page 36: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Side Effects• Language-level skills

• Increased confidence

• Better problem solving ability

• Knowing what “this” is

**Occasionally, JavaScript users have reported a desire to write their own framework, or abandon frameworks altogether, although this is rare

TimCDoherty

Page 37: Treating Framework Fatigue With JavaScriptfiles.meetup.com/8990802/TreatingFrameworkFatigue-FINAL.pdf · Treating Framework Fatigue With JavaScript Tim Doherty Software Architect

Thanks!

Tim DohertySoftware Architect

TimCDoherty timdoherty.net/in/timdoherty


Recommended