At the Forge - Ruby on Rails 3
After describing Rails 3 so enthusiastically, you might expect that I'll tell you to go out and upgrade whatever Rails 2 applications you might have written immediately. And, indeed, if the application is simple and small, such an upgrade is not a bad idea.
But, if you're like me and work with some large, complex applications, switching is not likely to be a quick or easy process. A large number of queries will need to be rewritten to use Active Relation. The routing table will need to change, the Gemfile will need to be rewritten, and you'll have to double-check your helpers for XSS attacks. This doesn't mean upgrading is a Herculean task, but it's not something to attempt in one evening.
The first thing I would suggest to anyone considering an upgrade is to ensure that your tests, and especially your integration tests, are in place, passing and providing you with adequate test coverage. Once you have such tests in place, you can start the upgrade process, checking at every stage to see what you might have broken.
A plugin called rails_upgrade is available; it provides a Rake task that looks through your code and configuration, tries to determine places where you might encounter problems and points them out to you. If you have good test coverage and run rails_upgrade, you're likely to know where potential problems lie and whether you've broken anything when you try to align your code with Rails 3.
Finally, upgrading to the latest version of Rails 2 (2.3.10, at the time of this writing) is a good way to prep for an upgrade to Rails 3. If you read through your logs, you'll find a number of deprecation warnings that are meant to nudge (push?) you in the direction of Rails 3 compatibility. Even if you don't plan to upgrade right away, getting your code closer to Rails 3 standards won't be a bad thing.
Rails 3 is a terrific upgrade to an already great Web development framework. While it was under development, I followed the blog postings and explanations with some trepidation, wondering how different Rails 3 would be from previous versions. I needn't have worried. As Rails has improved my experience as a Web developer in many small ways, so too has Rails 3 improved on its predecessor with many small changes. I generally like these changes a great deal and believe this shows that Rails still has a lot going for it. Upgrading might be tricky in some cases, but it's worth working in that direction, even if it takes a while. The application's execution speed will improve as a result, but so will your development speed and the maintainability of your code.
Resources
The home page for Ruby on Rails is rubyonrails.org. That site has pointers to downloads, documentation and many resources offered by the community.
One terrific community resource is the “Rails Guides” documentation, which can walk you through a large number of features in Rails. These guides are great reading for Rails developers, new and old alike. They are current for Rails 3 and often point to differences with Rails 2 for those planning to upgrade.
The weekly “Railscasts” screencast produced by Ryan Bates continues, as always, to be a source of knowledge and inspiration. A large number of Railscasts in 2010 were devoted to Rails 3 and to what it means to upgrade. I viewed these several times before working with Rails 3, and they made a big difference in my work.
The rails_upgrade plugin can be downloaded and installed from its GitHub home page at github.com/rails/rails_upgrade.
You can learn more about Bundler at gembundler.com. Yehuda Katz also has a blog posting about Bundler and what it means for Rails developers, at yehudakatz.com/2010/09/30/bundler-as-simple-as-what-you-did-before.
Finally, a few books about Rails 3 have started to emerge. The best-known book from the Pragmatic Programmers, Agile Web Development with Rails written by Sam Ruby, Dave Thomas and Rails creator David Hannemeier Hansson, remains a solid introduction to the framework. A less-dense introduction, Beginning Rails 3, published by Apress and written by Cloves Carneiro Jr. and Rida Al Barazi, probably is a good starting point for people new to Web development.
And, although it is not yet published at the time of this writing, Rails 3 in Action by Yehuda Katz and Ryan Bigg, published by Manning, has the look of a real winner. I particularly like the fact that it uses Cucumber and RSpec. It also mentions third-party gems and services that a production Rails application is likely to use, such as Git, Hoptoad and paperclip.
Reuven M. Lerner is a longtime Web developer, architect and trainer. He is a PhD candidate in learning sciences at Northwestern University, researching the design and analysis of collaborative on-line communities. Reuven lives with his wife and three children in Modi'in, Israel.
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
Web Development News
Developer Poll
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- RSS Feeds
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- Home, My Backup Data Center
- A Topic for Discussion - Open Source Feature-Richness?
- Dart: a New Web Programming Experience
- Developer Poll
- What's the tweeting protocol?
- May 2013 Issue of Linux Journal: Raspberry Pi








1 hour 47 min ago
3 hours 4 min ago
3 hours 39 min ago
4 hours 1 min ago
8 hours 50 min ago
9 hours 36 min ago
11 hours 10 min ago
12 hours 47 min ago
14 hours 45 min ago
15 hours 2 min ago