AngularJS Mountain View
The Thick Front-End
Jeff Dickey
@dickeyxxx
http://dickey.xxx/
Agenda

•

Why we need a Thick-Client

•

How I’ve written JavaScript in the past

•

How I architect new applications
This talk is about why,
not what
Carbon Five
Rails is amazing
•

Apps are easy to build

•

We test everything

•

Easy to deploy

•

Packages everything for you
However applications require
more interactivity now
•

Automatic refresh (notifications)

•

Animations

•

Fast editing

•

More speed
JavaScript and Rails are at
odds with each other.

•

JavaScript is hard to test.

•

No structure is given for JavaScript.

•

Turbolinks causes bugs
I used to avoid JavaScript
whenever possible.
Why?
Browsers are a real
platform now!
Progressive enhancement
ruins applications.
Why have a
Single-page app?
•

Simple architecture

•

Insanely fast

•

Can architect back-end separately

•

Free API!

•

State lives in the client
If the web came out
tomorrow…
Generating code intended
to be executed by the client
would be insane.
Browsers are smart now.
Let’s architect for that.
Demo time.
Single-page app not without
problems

•

2 projects, new workflow

•

Initial page-load performance

•

SEO
There are solutions
•

BromBone

•

Prerender (phantomjs)

•

render_static gem (selenium)

•

escape_fragment
Marketers should not
dictate how we architect.
Tooling is available!
Grunt
•

Compile SASS

•

Minify CSS/JS

•

Shrink .png

•

Test front-end

•

Automate deployments
Bower	
•

Front-end package manager

•

Like rubygems, brew or package control in
Sublime

•

Unobtrusive. Really simple.
Summary

•

The way we build applications is dated

•

The web is now ready for Thick-Client apps

•

Thick Clients make architecture simple
Browsers are smart now.
Treat them like it.
@dickeyxxx

The Thick Front-End