What's new in Rails 4. Maricris Nonato / @maricris_sn

Similar documents
A Model of the Operation of The Model-View- Controller Pattern in a Rails-Based Web Server

Last Revision: October 29th, 2015

Rails Cookbook. Rob Orsini. O'REILLY 8 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo

Ruby on Rails. Mitchell Craig; Tam Nguyen; Becker Luu; Eliezer Mar Manarang; and Colin Williams University of Calgary SENG 403 Dr.

Table of contents. HTML5 Data Bindings SEO DMXzone

Installing Rails 2.3 Under Windows XP and Apache 2.2

Installing Rails 2.3 Under CentOS/RHEL 5 and Apache 2.2

Evaluation. Chapter 1: An Overview Of Ruby Rails. Copy. 6) Static Pages Within a Rails Application

Ruby On Rails. CSCI 5449 Submitted by: Bhaskar Vaish

CS169.1x Lecture 5: SaaS Architecture and Introduction to Rails " Fall 2012"

Upgrade to Microsoft Web Applications

Ruby on Rails is a web application framework written in Ruby, a dynamically typed programming language The amazing productivity claims of Rails is

Cucumber: Finishing the Example. CSCI 5828: Foundations of Software Engineering Lecture 23 04/09/2012

CERTIFIED MULESOFT DEVELOPER EXAM. Preparation Guide

The IBM i on Rails + + Anthony Avison anthony@powerruby.com. Copyright 2014 PowerRuby, Inc.

Developing ASP.NET MVC 4 Web Applications MOC 20486

Web4thejob. About Web4thejob. ZK x Web4thejob

Pete Helgren Ruby On Rails on i

This course provides students with the knowledge and skills to develop ASP.NET MVC 4 web applications.

Developing ASP.NET MVC 4 Web Applications Course 20486A; 5 Days, Instructor-led

Bringing closer Debian and Rails: Bridging apparently incompatible cultures

Ajax Development with ASP.NET 2.0

Agile Web Development with Rails 4

Developing ASP.NET MVC 4 Web Applications

Stop being Rails developer

DreamFactory & Modus Create Case Study

Database Management System Choices. Introduction To Database Systems CSE 373 Spring 2013

The Learn-Verified Full Stack Web Development Program

ASP.NET MVC. in Action JEFFREY PALERMO JIMMY BOGARD BEN SCHEIRMAN MANNING. (74 w. long.) WITH MVCCONTRIB, N HIBERNATE, AND MORE.

Rails 4 Quickly. Bala Paranj.

What s really under the hood? How I learned to stop worrying and love Magento

Outline. Lecture 18: Ruby on Rails MVC. Introduction to Rails

Ektron to EPiServer Digital Experience Cloud: Information Architecture

Ontario Ombudsman. Goals

Ruby on Rails. a high-productivity web application framework. blog.curthibbs.us/ Curt Hibbs <curt@hibbs.com>

Installation overview

Bubble Code Review for Magento

The Cucumber Book. Extracted from: Behaviour-Driven Development for Testers and Developers. The Pragmatic Bookshelf

design coding monitoring deployment Java Web Framework for the Efficient Development of Enterprise Web Applications

Web Application Development

REST web services. Representational State Transfer Author: Nemanja Kojic

A Comparison of Service-oriented, Resource-oriented, and Object-oriented Architecture Styles

NetWrix Password Manager. Quick Start Guide

Request Tracker/RTx::AssetTracker at DigitalGlobe

The NetBeans TM Ruby IDE: You Thought Rails Development Was Fun Before

Magento Clang Integration Extension version 1.2.0

Landing Page. Landing Page Module for Magento

ASP.NET Using C# (VS2012)

Lesson Plans Microsoft s Managing and Maintaining a Microsoft Windows Server 2003 Environment

Don t promote your website; Let your website to promote you! Proposal for Website. EIndiaTech.

Programming in HTML5 with JavaScript and CSS3

Google Migration Implementation Plan/Schedule

Configuring user provisioning for Amazon Web Services (Amazon Specific)

Web Development with Flask and the Raspberry Pi Leading by Example CUAUHTEMOC CARBAJAL ITESM CEM 22/04/2014

Sage CRM 7.3 SP2. Release Notes. Revision: SYS-REA-ENG-7.3SP2-1.0 Updated: April 2016

Ruby on Rails is a Web application framework for Ruby. It was first released to the public in July2004.

ConvincingMail.com Marketing Solution Manual. Contents

Notes on how to migrate wikis from SharePoint 2007 to SharePoint 2010

SQL Server Instance-Level Benchmarks with DVDStore

Rails 3 in Action RYAN BIGG YEHUDA KATZ MANNING. Shelter Island

Contensis The basics. June 2012

80 Reasons to Love GoldMine CRM

CERN Summer Student Program 2013 Report

GUI and Web Programming

Avaya Inventory Management System

A (Web) Face for Radio. NPR and Drupal7 David Moore

Implementing and Maintaining Microsoft SQL Server 2008 Reporting Services

Your App website SEO & copy!

Dreamweaver Domain 2: Planning Site Design and Page Layout

Composite.Community.Newsletter - User Guide

An Introduction to the Development of Web Applications using Ruby on Rails with Ajax

SAP BusinessObjects BI Content Lifecycle Management Best Practices

Learning Web App Development

Web Application Development and Frameworks

c360 Product Catalog

skype ID: store.belvg US phone number:

Introduction. [This book] is meant to be practical. It is meant for use. Mindfulness in Plain English 1. I m addicted to learning.

How to Prepare for the Upgrade to Microsoft Dynamics CRM 2013 (On-premises)

SFC Featured Categories, Magento Extension Documentation

Web Development Frameworks

Marketing Cloud Quick References Guide

A Web- based Approach to Music Library Management. Jason Young California Polytechnic State University, San Luis Obispo June 3, 2012

1. License. Copyright 2016 gamedna studio. All rights reserved.

Ruby on Rails Development Services

Introduction to Ruby on Rails

Index. AdWords, 182 AJAX Cart, 129 Attribution, 174

Salesforce Limits Quick Reference Guide

Fast, secure and scalable archiving from Fus . Secure and easily accessible storage

Ruby on Rails. Object Oriented Analysis & Design CSCI-5448 University of Colorado, Boulder. -Dheeraj Potlapally

Pierce County Web Content Management System Scripted Demo

JavaScript Programming

GP REPORTS VIEWER USER GUIDE

Software Requirements Specification

Altiris Helpdesk Solution 6.0 SP5 Product Guide

PHP on IBM i: What s New with Zend Server 5 for IBM i

Drupal Performance Tuning

Web Development with Grails

Global Preview v.6.0 for Microsoft Dynamics CRM On-premise 2013 and 2015

Brief Description of project: This project will be an interactive Javascript. 1. What do you want to accomplish by doing this project?

Magic Liquidizer Documentation

Transcription:

What's new in Rails 4 Maricris Nonato / @maricris_sn 20.02.2015

4.0

Upgrades Ruby 1.8.x is history; Ruby 2.0 is preferred, but Ruby 1.9.3+ is required vendor/plugins completely removed in favor of managing your gems via Gemfile and Bundler some modules moved to gems: ActiveRecord observers, ActiveRecord session store (no longer recommended), ActiveResource, etc

ActionPack Strong parameters: allow only whitelisted parameters for update operations vendor/plugins completely removed in favor of managing your gems via Gemfile and Bundler some modules moved to gems: ActiveRecord observers, ActiveRecord session store (no longer recommended), ActiveResource, etc Routing concerns: allows you to refactor your routes via concerns Russian doll caching Turbolinks

Strong Parameters

from this: Routing concerns to this: https://github.com/rails/routing_concerns

Russian doll caching Cache nested fragments of views. Each fragment expires based on a set of dependencies (a cache key). The cache key is usually a template version number and a model object. No need to worry about observers or when to expire

Russian doll caching cache like this in your view: touch parent record is a requirement: and create caches like these:

Turbolinks Serve only one initial HTML page. When the user navigates to another page, use pushstate to update the URL and use AJAX to update the title and body. May not work properly for those pages which does post pageload queries to update some DOMs

Turbolinks

Others PATCH verb as part of HTTP actions to specify partial update of resource match in routes requires the verbs to be specified strings rendered in erb are now escaped unless specified by raw or html_safe is called

4.1

Spring Application PreLoader

config/secrets.yml was initially used to store secret key base of your application can be used to keep environment variables other options are to use dot_env (gem), figaro (gem), etc.

Action Pack Variants

ActionMailer Previews Useful for verifying mail layouts Still lovin letter_opener (gem) though!

ActiveRecord enums Useful for putting names as identifiers to fields stored as integers This makes pretty convenience methods like? to the name of your enum field

Module#concerning Elegant way of isolating responsibilities within a class Clear way of chopping your class into pieces that can still be reused or extended as a concern for another class

4.2

Active Job provides you the ease of a fixed convention regardless of what queuing framework you are using (Resque, Delayed Job, Sidekiq, etc) organize jobs within your app folder create jobs and enqueue them with ease ability to save on effort to pack/unpack your job parameters

Active Job https://github.com/rails/globalid

Active Job creating jobs enqueuing jobs

Active Job setting your desired queuing framework

Active Job cleaner way of handling exceptions http://edgeguides.rubyonrails.org/active_job_basics.html

ActionMailer s deliver_later handle mails asynchronously via its own queue you can choose to send immediately (deliver_now), or later via deliver_later

ActionMailer s deliver_later

Adequate Record From @tenderlove: TL;DR: AdequateRecord is a set of patches that adds cache stuff to make ActiveRecord 2x faster this add-on caches simple queries; but doesn t work on complicated ones

Adequate Record works with: not yet compatible with:

Adequate Record

Web Console a gem that was built into the Rails framework a project from Google Summer of Code Rails campaign puts a web-console in your error page http://weblog.rubyonrails.org/2014/5/23/meet-our-google-summer-of-codestudents-and-mentors/

Web Console https://github.com/rails/web-console

Foreign Key Support add / remove foreign keys to your migration almost similar to references" in your migration, but with more flexibility works with MySQL and PostgreSQL adapters only

Foreign Key Support how references work: how foreign keys work:

Foreign Key Support closer look: