After a dozen performance patches to many gems want to share some practical experience I gain. Tools I’ve picked up was perftools.rb and ruby built-in benchmark library. They are fit well for cases when optimization stays at Ruby level and doesn’t require to fix something in native extensions or dig into IO operations.
Web 2.0 world force us to build Forms in a new level of quality. AJAX and dynamic HTML changes a way how forms should work internally. Let’s call it Forms 2.0. And of course this facts bring a lot of complexity every time we deal with forms. Sometimes such form makes a real problem comparing to regular Web 1.0 form. Here will be a talk how to make Forms 2.0 as simple as Forms 1.0.
Upcoming Rails 3.2 release has many useful features.
Some of them are coming from me:
- ActiveRecord #pluck method
- Strict validation concept
- Customizable mass assignment sanitizer behavior
- Gotcha for
Here is a more detailed description than in the Changelog.
Datagrid version 0.5.0 has been released.
Datagrid is a Ruby on Rails plugin that helps you to build and represent table-like data with:
- Customizable filtering
- Sort order
- Export to CSV
Here are some major features from new release.
Today, I want introduce the Mailtrap web service aimed to help developers build and improve their email delivery functionality.
Usually people use same SMTP settings for all environments, but this actually creates many problems in Staging and Development environments. Mailtrap is a special SMTP service for these environments aimed to solve specific problems.
Here are my slides from RubyC conference.
This presentation covers a hot topic for projects that are more than a year old - it’s fat models. The problem appear naturally as models are the best place to allocate business logic code. There are number of existing techniques to manage large amount of code in Rails application. But they are suitable only in a half of use cases. For the rest of them we can use Traits pattern that is described well in this presentation.
Fighting with fat models
My article about Resque was posted on Engine Yard last week. It has very good notes from EY engineers and doesn’t have my regular grammar mistakes. Enjoy your reading.
I’ve always pay attention to Rspec and posted some articles about Advanced Rspec features. Right now about 2k tests written by me personally in 3 years of development with Rails.
Here is the slides from my talk about all invented patterns and best practices:
Do rspec: fogotten features of RSpec
4 years ago I was working on some enterprise projects with a lot of reports. From that time I was thinking about perfect report gem that would provide easy DSL for making filters and sortable columns to build reports and make it all reusable with standard OOP techniques. Since that time this idea never left my head and now finally I have enough knowledge and opportunities to build such tool.
dbext is an excellent vim plugin that allows you to execute SQL queries directly from vim. For example:
select * from <word under cursor>. When dbext is used with Rails there is a problem that you can work with some variation of table name like:
But still wants to use it as table name in your database queries so that you won’t type it manually.