the thick front-end

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

Upload: jeff-dickey

Post on 20-May-2015

1.324 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: The Thick Front-End

Jeff Dickey

@dickeyxxxhttp://dickey.xxx/

The Thick Front-EndAngularJS Mountain View

Page 2: The Thick Front-End

Agenda

• Why we need a Thick-Client

• How I’ve written JavaScript in the past

• How I architect new applications

Page 3: The Thick Front-End

This talk is about why, not what

Page 4: The Thick Front-End

Carbon Five

Page 5: The Thick Front-End
Page 6: The Thick Front-End
Page 7: The Thick Front-End
Page 8: The Thick Front-End
Page 9: The Thick Front-End
Page 10: The Thick Front-End
Page 11: The Thick Front-End

Rails is amazing

• Apps are easy to build

• We test everything

• Easy to deploy

• Packages everything for you

Page 12: The Thick Front-End

However applications require more interactivity now

• Automatic refresh (notifications)

• Animations

• Fast editing

• More speed

Page 13: The Thick Front-End

JavaScript and Rails are at odds with each other.

• JavaScript is hard to test.

• No structure is given for JavaScript.

• Turbolinks causes bugs

Page 14: The Thick Front-End

I used to avoid JavaScript whenever possible.

Page 15: The Thick Front-End
Page 16: The Thick Front-End

Why?

Page 17: The Thick Front-End
Page 18: The Thick Front-End

Browsers are a real platform now!

Page 19: The Thick Front-End

Progressive enhancement ruins applications.

Page 20: The Thick Front-End

Why have a Single-page app?

• Simple architecture

• Insanely fast

• Can architect back-end separately

• Free API!

• State lives in the client

Page 21: The Thick Front-End

If the web came out tomorrow…

Page 22: The Thick Front-End

Generating code intended to be executed by the client

would be insane.

Page 23: The Thick Front-End

Browsers are smart now. Let’s architect for that.

Page 24: The Thick Front-End

Demo time.

Page 25: The Thick Front-End

Single-page app not without problems

• 2 projects, new workflow

• Initial page-load performance

• SEO

Page 26: The Thick Front-End

There are solutions

• BromBone

• Prerender (phantomjs)

• render_static gem (selenium)

• escape_fragment

Page 27: The Thick Front-End

Marketers should not dictate how we architect.

Page 28: The Thick Front-End

Tooling is available!

Page 29: The Thick Front-End

Grunt

• Compile SASS

• Minify CSS/JS

• Shrink .png

• Test front-end

• Automate deployments

Page 30: The Thick Front-End

Bower

• Front-end package manager

• Like rubygems, brew or package control in Sublime

• Unobtrusive. Really simple.

Page 31: The Thick Front-End
Page 32: The Thick Front-End

Summary

• The way we build applications is dated

• The web is now ready for Thick-Client apps

• Thick Clients make architecture simple

Page 33: The Thick Front-End

Browsers are smart now. Treat them like it.

@dickeyxxx