You are on page 1of 34

The Rails 3.1 Leap

@nathanbertram

Thursday, October 27, 2011

O.K it’s not that kind of a leap. But there is lots of improvements & awesome new stuff!

Thursday, October 27, 2011

Thursday, October 27, 2011

GIST

Thursday, October 27, 2011

~~ Quick Poll ~~

When you upgrade to Rails 3.1 it’s going to feel much the same “Recognizable”

Thursday, October 27, 2011

This talk is about what is new.

Thursday, October 27, 2011

So

what is new?

ZOMG we have an NHL team again!

ZOMG we have an NHL team again! Thursday, October 27, 2011

Thursday, October 27, 2011

jQuery
jQuery

is now default

jQuery is now default Thursday, October 27, 2011

Thursday, October 27, 2011

Thursday, October 27, 2011 is now a first-class citizen.
Thursday, October 27, 2011 is now a first-class citizen.

Thursday, October 27, 2011

is now a first-class citizen.

Thursday, October 27, 2011 is now a first-class citizen.
Thursday, October 27, 2011 is now a first-class citizen.

Thursday, October 27, 2011

Thursday, October 27, 2011
Thursday, October 27, 2011

Thursday, October 27, 2011

Powerful little language that compiles into JS. TURNS: INTO THIS: Thursday, October 27, 2011

Powerful little language that compiles into JS. TURNS:

Powerful little language that compiles into JS. TURNS: INTO THIS: Thursday, October 27, 2011

INTO THIS:

Powerful little language that compiles into JS. TURNS: INTO THIS: Thursday, October 27, 2011

Thursday, October 27, 2011

TURNS: INTO THIS: Thursday, October 27, 2011

TURNS:

TURNS: INTO THIS: Thursday, October 27, 2011

INTO THIS:

TURNS: INTO THIS: Thursday, October 27, 2011

Thursday, October 27, 2011

Turns out you can remove that line from your Gemfile.

Thursday, October 27, 2011

Went from - Hey Everyone:

Went from - Hey Everyone: Thursday, October 27, 2011

Thursday, October 27, 2011

To everyone

Dealt
Dealt

Thursday, October 27, 2011

Thursday, October 27, 2011

Thursday, October 27, 2011

Thursday, October 27, 2011

Thursday, October 27, 2011

Asset Pipeline

ZOMG what does this mean?

Use tools like sass, coffeescript, compass, less & etc to write css & js in separate organized fashion.

Your css & js files (respectively) will be automagically be concatenated and compressed using Sprokets (getsprokets.com).

Thursday, October 27, 2011

Sprokets Sprokets uses manifest files to determine which assets to include and serve.

Sprokets Sprokets uses manifest files to determine which assets to include and serve. Thursday, October 27,
Sprokets Sprokets uses manifest files to determine which assets to include and serve. Thursday, October 27,
Sprokets Sprokets uses manifest files to determine which assets to include and serve. Thursday, October 27,

Thursday, October 27, 2011

Asset Pipeline

Assets are optimized out of the box when you deploy.

Saving precious KB’s and less files for the browser to download - faster load time.

Thursday, October 27, 2011

HTTP Streaming

- Send content to the browser before it’s finished processing. Been around for ages in php, asp, etc. - “Chunked Responses”

Eg. Page takes 5 seconds to process. Stream the

<head>

loading js/css assets.

</head> part; so the browser can start

Thursday, October 27, 2011

HTTP Streaming

HTTP Streaming Thursday, October 27, 2011

Thursday, October 27, 2011

Thursday, October 27, 2011

Thursday, October 27, 2011

BCrypt (BRUTE force resistant)

BCrypt (BRUTE force resistant) Thursday, October 27, 2011 With every request to hash - it gets

Thursday, October 27, 2011

With every request to hash - it gets slower and slower

Identity Map

- Ensures that each object gets loaded only once by keeping every loaded object in a map. Looks up objects using the map.

- Disabled by default due to a couple recent discoveries.

Thursday, October 27, 2011

Reversible Migrations

Reversible Migrations Thursday, October 27, 2011

Thursday, October 27, 2011

:bulk => true

:bulk => true Thursday, October 27, 2011

Thursday, October 27, 2011

HTTP Basic Auth

Little Better!

HTTP Basic Auth Little Better! Thursday, October 27, 2011
HTTP Basic Auth Little Better! Thursday, October 27, 2011

Thursday, October 27, 2011

Mass Assignment with Roles

Mass Assignment with Roles Thursday, October 27, 2011

Thursday, October 27, 2011

Thursday, October 27, 2011
Thursday, October 27, 2011

Thursday, October 27, 2011

Awesome gist from Ryan Bates of RailsCasts.com!

Awesome gist from Ryan Bates of RailsCasts.com! Thursday, October 27, 2011 Changelog Rails 3.1 beta 1:

Thursday, October 27, 2011

Changelog Rails 3.1 beta 1:

TIPS: Preparing to Upgrade

1. Upgrade your application to Rails 3.0.x 2. Have decent test coverage and have all tests are green

3. Fix deprecation warnings that show up.

4. Bump your rails version up and fix any red tests. 5. (optional) setup asset pipeline

Handy Railscast:

Thursday, October 27, 2011

Thursday, October 27, 2011

Thanks!