Bio-Inspired Frontend Engineering

G. Kay Lee

@gsklee

JSConf.Asia 2015

Doing JavaScript Stuff

!CS academic background

Once a Telescope Operator

Spent my academic years studying chemistry & molecular biology

Astronomical vs. Atomic Scale

neural network of our brain?

filaments of our universe

Both Are Part of the Birth of Life

early-stage embryo

End-Stage Red Giant

(NGC 2392 ESKIMO NEBULA)

?

We Are All Starchildren

>90% of our body's Atoms Were forged

by some long-gone star

in The distant past

Why are we here?

(of mass)

How are we here?

Why are we here?

This Is JSConf DAMMIT

Where's My Refund

Why are we here

convey ideas & thinking processES

Value Cross-disciplinary knowledge

draw inspirations from the nature

Class Composition as an example

Just making sure

ES2015 Classes

desugared

ES2015 subclasses

desugared

ES2016

Class

Property

Declarations

(Stage 1)

are still prototypal

formalize a specific pattern of prototypal inheritance

Quick facts

unburden the function keyword

are better for static analysis & readability

ES2015 Classes...

appear at exactly where the next level of language abstraction would appear

IMHO

are designed to be “Maximally Minimal”

So does technique

technology by itself

Has No Good or bad

it's the intent that matters

fragile base class problem

shit happens

when the inheritance chain

gets too long

Global, “Cascading” Style Sheets

Sass @extend

AngularJS $SCOPE

Composition over inheritance

Global, “Cascading” Style Sheets

Sass @extend

AngularJS $SCOPE

Long & Shaky inheritance chain?

Bye!

React Mixins

Pre-v0.13.0

Post-v0.13.0

Mixins & Traits?

DUH!

cells

one of the most miraculous structures of our Universe

one which has withstood eons of evolution

the fundamental & universal component of life

what's the secret?

Abiogenesis

Evolution of cells

{}

POJO

React component instance

with Lifecycle Methods

Symbiogenesis

Let's learn

from the Nature

Bio-Inspired

Class Composition

“Nagro”

in nature we trust

convey ideas & thinking processES

Value Cross-disciplinary knowledge

draw inspirations from the nature

Thanks!