1. Transference of knowledge and Rails

    April 1st, 2007

    Pat Eyler posted a blogging contest sometime early this month, but I've just now gotten around to really fleshing my thoughts out on the question: What can Rails learn from other frameworks?

    My answer? A lot. And I think maybe it's not really even from the frameworks themselves, but from the users of said frameworks. When you use a framework or language or tool, you gain a certain level of knowledge and intimacy with it. When evaluating other frameworks, one must weigh the gains of the framework with the loss of knowledge: will I gain more features or other advantages than I will be losing knowledge and familiarity? Web frameworks are a commodity, but knowledge and time are not.

    Don't mistake me: I think the Rails way is great. When I looked at my knowledge of PHP and C# and I evaluated what I was gaining when switching to Ruby and Rails, I definitely saw a better ratio of gains to losses. Others, though, do not see it that way.

    Nitro on the other hand does see it that way. From their RDoc:

    You can write applications in the ASP/JSP/PHP style, ie by writting server pages that are automatically translated to Ruby code by Nitro.
    Or, you can write MVC style applications (like Rails) by utilizing the powerfull Object publishing/Controller mechanism.
    Alternatively, you can use stateful components and/or programmatic rendering: Nitro is the premium container for Wee applications.
    This approach helps compensate for the change from one environment to another: your knowledge of PHP or JSP is now valuable again. You can gain the benefits of the new framework while still salvaging parts of the time and knowledge of your previous efforts.

    Rails doesn't allow for much in this regard. It forces you to follow conventions; it forces you to follow MVC; it forces you to do it the Rails Way. This is great: this is what we want. Rails' practices are both agile and effective, but it's hard to be hit in the face with "The Rails Way" from the get go. I'm not saying that Rails should switch to this totally flexible setup like Nitro, but I do think it should provide, shall we say, "entrances" for this existing knowledge to make inways to the Rails world.

    What's the benefit to Rails though? Why care? There are a lot of brilliant people in the PHP and Java worlds. A lot of really really smart people who could bring a lot of knowledge to the world of Rails, but if Rails doesn't provide ways for this knowledge to be used, it's sort of a moot point.

    Unfortunately, I dont have any "practical" suggestions for Rails to implement, but I think this is an idea that should be brought up for discussion: offer ways for people to use their knowledge of previous frameworks in the current Rails ecosystem. Don't change the way Rails works, but provide ways to transfer knowledge.

    0 comments »
  2. map.resources :ruby [9]

    February 7th, 2007

    Concurrency. MenTaLguY shows five ways to do concurrency in Ruby: mutexes, futures, STM, actors and joins.

    ActiveLDAP ActiveLDAP gives you an ActiveRecord-like access to LDAP servers.

    Ruby in the Enterprise. Timothy M. O'Brien has a great write up on Bringing Rails to the Enterprise. He presents some of the myths, and the reality of using Rails in the field.

    ActiveSpec Luke Redpath brings us ActiveSpec, a framework for writing specifications. Looks similar to RSpec, but ActiveSpec deals with generic specification that can be used for test, just as well as validation and selecting from collections. Besides the multiple uses, ActiveSpec allows you to keep your specifications inside the model (a la Rails validation), but also reuse validations across several models. And check the teaser at the end of the post: using specifications with ActiveRecord find methods.

    IntelliR JetBrains adds Ruby support to IntelliJ. Watch the screencast.

  3. map.resources :ruby [8]

    January 20th, 2007

    ARes Test Drive. Rick Olson takes ActiveResource for a test drive, using it to read and post to the Beast discussion forum. Looks like ActiveResource will not be part of Rails 1.2, but still the current version is promising. Check the post to see how much you can do with little coding.

    Debugging in Steel. Another reason for using Ruby in Steel: debugging Rails applications.

    What will DSL do for me? Russ Olsen wanted to test against a fake Web server, to keep the test cases simple, he created a DSL: “Clearly, anything you can do in potemkin you can do in plain old Ruby plus webrick. Potemkin just makes its easier, and easier, quite frequently, is the name of the programming game.”

    Rails 1.2 Rails 1.2 is officially out, with hundred of bug fixes, improvements, better ActiveRecord, UTF-8 support and ... the best framework for HTTP. Rails 1.2 breaths HTTP, RESTful all the way, and lets you build XML and JSON APIs in a few lines of code.

    And while you're at it, check out the Rails Cookbook, which covers Rails 1.2.

    s33r From Elliot Smith, s33r is a library for using Amazon's S3 service.

  4. map.resources :ruby [7]

    January 14th, 2007

    Informix in Rails. If you're using Informix, check out what Gerardo Santana is doing to use Informix in Rails.

    ODBC. OpenLink releases version 1.3 of the ODBC adapter for ActiveRecord. Currently supports MySQL, Sybase, Ingres, Informix, Oracle, DB2, Progress and PostgreSQL. That's a pretty exhaustive list.

    Next Enterprise Ruby Studio. The next Enterprise Ruby Studio will take place in Reston, VA on March 28: “Attendees will experience, hands on, building an app using the most important technologies: data access through ActiveRecord and rBatis, messaging through Stomp, Drb and Rinda, data transfer using XML and JSON, networking using Mongrel, and building RESTful web service endpoints.”

    Get started with Cerberus. Yurii Rashkovskii gives a quick introduction to continuous integration with Cerberus.

    Refactoring Ruby. Jay Fields takes on refactoring, this time around, in Ruby.

  5. map.resources :ruby [6]

    January 9th, 2007

    Capistrano 101 Geoffrey Grosenbach puts up another screencast, this time teaching you Capistrano concepts. If you're new to Capistrano, here's one way to learn more.

    Capistrano 1.3.1 Catch up on the new features in Capistrano 1.3.1.

    Down for maintenance, back soon. Mike Clark uses views to create custom maintenance pages. Cool trick. (Hat tip to Jamis Buck)

    Four choices. Andre Lewis lists four choices to jumpstart your Rails app.

    Easy feeds. Resource Feeder gives you RSS and Atom feeds with minimal effort. Ryan Daigle has the full scoop.

  6. map.resources :ruby [5]

    January 6th, 2007

    Rails via Sysadmin. Ed Gibbs: "Turns out the first developer in our organization to actually bring in Rails and use it for something real is a Unix sysadmin."

    Abundance of opinions. Daily KOS is considering an upgrade, and debating Ruby, Python and Perl. What follows are over 700 comments on the pros and cons.

    Faster browsing with assets. One way to make your site load faster is to split it across multiple hosts. You don't need multiple Web servers, you're just working around the "2 connections per host" limit of your Web browser. Patrick Lenz has more.

    Always testing. Cerberus is a continuous integration tool for Ruby.

    JRuby interview. Nick Sieger interviews the JRuby team.

  7. map.resources :ruby [4]

    January 5th, 2007

    Snippets. As I'm writing this, the Code Snippets in Ruby catalog has 455 snippets. That's a lot of tips, tricks and code you can learn from.

    The Ruby/Java Co-op. Ryan Tomayko about The Pending Ruby/Java Co-op: "It just seems to be in the right place at the right time."

    Hodel3000CompliantLogger Geoffrey Grosenbach explains on how to measure performance of your Rails app in production, using the Rails Analyzer Tools, Hodel3000CompliantLogger, and e-mailing reports to yourself.

    On video. If you're looking for a video or a screencast, you'll probably find it here (Ruby) or here (Rails).

    Exchanging. RExchange goes live with version 0.3: "RExchange is an easy to use Microsoft Exchange Server WebDAV communication wrapper."

  8. map.resources :ruby [3]

    December 30th, 2006

    Upcoming in ASF 1.5. ActiveSalesforce announces version 1.5 for January '07. Major features include support for salesforce.com 8.0, test fixtures and migrations.

    E-mail attachments with Rails. Ben Curtis uses FasterCSV to generate report data, and ActionMailer to send it as an attachment. I didn't know you can send attachments that easily.

    SOAP4R Hell Working with SOAP4R, Brendon Wilson ran into some troubles and blogged about the problems and the fixes. If you're using SOAP4R, check this post and the follow up comments.

    Quality control. Kwala will check the quality of your Ruby code, including "checks for code duplication, cyclomatic complexity, lines of code, unit tests, various formatting checks, and require cycles."

    Flashy charts. ZiYa is a Rails plugins that uses Flash to create beautiful charts. No need to learn Flash in order to use it. (Via Ruby Inside).

  9. map.resources :ruby [2]

    December 28th, 2006

    Humble Ruby. Jeremy just released his Mr. Neighborly's Humble Little Ruby Book. The PDF is free, $10 gets you the Bedside Reading Edition and bragging rights.

    Simpler migrations. I rely on Rails Migration to define and maintain my database schema. They're simple, concise and easy to extend with Ruby code, on the off chance I need to transform some data while doing a migration. Could it get any easier? Maiha found a way to make Rails migrations even easier to write and maintain.

    Console like a Ninja. Amy Hoy reveals the secrets of the Rails Console Ninjas.

    The Big Rewrite "You’ve got an existing, successful software product. You’ve hit the ceiling on extensibility and maintainability. Your project platform is inflexible, and your application is a software house of cards that can’t support another new feature." Unfortunately, switching to Ruby for your Next Big Rewrite is no guarantee for success. Chad Fowler promises to tell us what can go wrong, through a series of blog posts.

    SQL Views for Rails More goodness from the ActiveWarehouse project, comes support for SQL Views in Rails.

  10. map.resources :ruby [1]

    December 27th, 2006

    Acts As Enterprisey Andrew Stewart grants Rails a x-mas present and gives us acts_as_enterprisey.

    Ruport goes 0.7. "Ruport now has a brand new formatting system, some massive cleanup in the internals, and merry chunky bacon for all!" Check it out.

    Start here. Chad Fowler comments that "Rails is a gateway drug to both Ruby and the rest of the world of dynamic and previously-fringe programming languages." What about you?

    Wondering around. Check out Hobo, "an Open-Source project, designed to make development with Rails even faster than it already is." (Via Satish Talim)

    Railsbench. Railsbench is a collection of scripts for measuring performance of Rails apps. The latest version is now available as a Gem, and uses Gruff to create performance graphs.

  11. Welcome to the blog

    December 27th, 2006

    We like solving problems with software, there are so many ways you can make people’s life better by leaving the hardwork for computers.

    Ever since we started working with Ruby, we’ve found ways to be more productive and get more stuff done, came up with creative solutions, and had fun doing so.

    You’ve heard of Ruby, and you want to use it for your next project, but where do you start? This book is for you. We’re not going to teach you Ruby—we’re going to show you how to use Ruby in practice, how to solve common problems with minimal effort.

    We’ll talk about building Web apps and Web services, moving data between applications and on the network, managing systems and producing reports. We’ll talk about simple scripts for automation, and about deploying large systems. We’ll show you that Ruby has a lot to offer, beyond Web apps, and share recipes for success.

    Who’s we? I (Jeremy) am a developer, author, and college student. You can find out more about me over at my blog . Assaf Arkin develops commerical and open source software, mostly Ruby and Java. You can learn more about him over at his blog Labnotes.

    The book? We’re writing Ruby in Practice for Manning Publications.

    We’re going to blog here about the writing process, share our materials with you, include stuff that doesn’t quite fit in the book, and always listen to your feedback. Tell us what you’d want to read about.

    We hope you’ll find the resources here useful. In the immediate future, you can look for Assaf to give you a regular stream of Ruby-related links, under the title map.resources :ruby. I’ll post articles and PDF essays to help you get more out of Ruby. Stay tuned.