+ All Categories
Home > Documents > The Rails 3.1 Leap - 2011

The Rails 3.1 Leap - 2011

Date post: 07-Apr-2018
Category:
Upload: nathan-bertram
View: 216 times
Download: 0 times
Share this document with a friend

of 34

Transcript
  • 8/3/2019 The Rails 3.1 Leap - 2011

    1/34

    The Rails 3.1 Leap@nathanbertram

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    2/34

    O.K its not that kind of a leap.

    But there is lots ofimprovements & awesomenew stuff!

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    3/34

    GIST

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    4/34

    ~~ Quick Poll ~~

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    5/34

  • 8/3/2019 The Rails 3.1 Leap - 2011

    6/34

    This talk is about what is new.

    So... what isnew?

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    7/34

    ZOMG we have an NHL team again!

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    8/34

    jQuery is now default

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    9/34

    is now a first-class citizen.

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    10/34Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    11/34Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    12/34

    Powerful little language that compiles into JS.

    INTO THIS:

    TURNS:

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    13/34

    INTO THIS:

    TURNS:

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    14/34

    Turns out you can remove that line from your Gemfile.

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    15/34

  • 8/3/2019 The Rails 3.1 Leap - 2011

    16/34

    To everyone ...

    Dealt

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    17/34Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    18/34Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    19/34

    Asset Pipeline

    ZOMG what does this mean?

    Use tools like sass, coffeescript, compass, less & etc towrite css & js in separateorganized fashion.

    Your css & js files (respectively) will beautomagicallybe concatenated andcompressed using Sprokets (getsprokets.com).

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    20/34

    Sprokets

    Sprokets uses manifest files to determine whichassets to include and serve.

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    21/34

    Asset Pipeline

    Assets are optimized out of the box whenyou deploy.

    Saving precious KBs and less files for thebrowser to download - faster load time.

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    22/34

    - Send content to the browser before its finishedprocessing. Been around for ages in php, asp, etc.- Chunked Responses

    Eg. Page takes 5 seconds to process. Stream the ... part; so the browser can start

    loading js/css assets.

    HTTP Streaming

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    23/34

    HTTP Streaming

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    24/34Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    25/34

    BCrypt (BRUTE force resistant)

    With every request tohash - it gets slower

    and slower ...

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    26/34

    https://github.com/rails/rails/blob/master/activerecord/lib/active_record/identity_map.rb

    Identity Map

    - Ensures that each object gets loaded only once bykeeping every loaded object in a map. Looks up

    objects using the map.

    - Disabled by default due to a couple recentdiscoveries.

    Thursday, October 27, 2011

    https://github.com/rails/rails/blob/master/activerecord/lib/active_record/identity_map.rbhttps://github.com/rails/rails/blob/master/activerecord/lib/active_record/identity_map.rbhttps://github.com/rails/rails/blob/master/activerecord/lib/active_record/identity_map.rbhttps://github.com/rails/rails/blob/master/activerecord/lib/active_record/identity_map.rbhttps://github.com/rails/rails/blob/master/activerecord/lib/active_record/identity_map.rb
  • 8/3/2019 The Rails 3.1 Leap - 2011

    27/34

    Reversible Migrations

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    28/34

    :bulk => true

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    29/34

    HTTP Basic Auth ... Little Better!

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    30/34

    Mass Assignment with Roles

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    31/34

    Thursday, October 27, 2011

  • 8/3/2019 The Rails 3.1 Leap - 2011

    32/34

    Awesome gist from Ryan Bates of RailsCasts.com!

    https://gist.github.com/958283

    Changelog Rails 3.1 beta 1:

    Thursday, October 27, 2011

    https://gist.github.com/958283https://gist.github.com/958283
  • 8/3/2019 The Rails 3.1 Leap - 2011

    33/34

    TIPS: Preparing to Upgrade

    1. Upgrade your application to Rails 3.0.x

    2. Have decent test coverage and have all tests are green3. Fixdeprecation warnings that show up.

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

    Handy Railscast:http://railscasts.com/episodes/282-upgrading-to-rails-3-1

    Thursday, October 27, 2011

    http://railscasts.com/episodes/282-upgrading-to-rails-3-1http://railscasts.com/episodes/282-upgrading-to-rails-3-1http://railscasts.com/episodes/282-upgrading-to-rails-3-1
  • 8/3/2019 The Rails 3.1 Leap - 2011

    34/34

    Thanks!


Recommended