So for this top secret project I’m working on with @TopherBook, I’ve been looking into using background jobs to handle some long-running tasks that are non-essential to the user experience. I researched a few different options including BackgrounDRb, Background::Job and Delayed::Job. Eventually, I decided on using Delayed::Job because it’s simple, allows for multiple workers running on one machine, and requires little setup work.
A very well written tutorial by Adam Wiggins on using Delayed::Job to create a queue-backed feed reader was a great resource for helping me get started with Dj (Part 1, Part 2). However, there are two things that I don’t like about his implementation. First, it isn’t XHTML Strict valid - and as we all know I’m a bit OCD about valid code. And second, he is using a polling method to check whether the background job has completed.
For my project, using client-side polling isn’t going to cut it. I need to use some sort of server-side push method like Juggernaut.
read more…
I am a purist. Or obsessive compulsive. Or maybe just irrational. But I H-A-T-E inline javascript. Unobtrusive javascript (like SWFObject or its predecessor, UFO) is the only way to go in my opinion. Seriously. Keep that stuff out of my markup.
This is why I love the Prototype.js framework and hate Rails javascript helper methods. The methods I most commonly come across (and hate) are methods like remote_form_for, link_to_remote, observe_field, draggable_element, drop_receiving_element, and so on…
Now, I know that all of these helper methods exist to make implementing neato “Web 2.0” javascript effects easier (for the lazy programmer) in a Rails application. And I know that Rails has Prototype and Scriptaculous built in to the framework, so it seems like saying “I hate Rails javascript helper methods” equates to hating Prototype as well. But it doesn’t. There are three simple reasons why I love the Prototype:
read more…
So today, despite battling a nasty sinus infection-like cold, I decided to get started on setting up SA.org, a project I’m working on with @TopherBook. I’m not going to get into details right now - everything’s a bit hush-hush right now - but I felt I should mention SA.org to set some context for the subject of today’s post. Today, I want to discuss the “user system” in a Ruby on Rails application.
By “user system” I mean the part of your Rails app that manages user registration, login, logout, etc — the authentication part of the system. In the case of SA, my user system must also include authorization functionality for user roles — admin, member, moderator, etc.
When planning my user system for SA, I instinctively thought of techoweenie’s restful_authentication plugin. It’s basically the standard in authentication plugins and it’s one that I’m very familiar with. However, after reviewing the Authlogic plugin, I’m thinking of changing things up a bit for SA. Authlogic looks really easy to customize and to fit to my needs. I like how easy it (looks like it) is to use and that I can use only email addresses instead of usernames for login. I also like that the session management allows for a “remember me” type functionality as well the ability for a session timeout after a certain period of user inactivity. It also allows for a certain level of stateful authorization (active, approved, confirmed). Basically, it covers what I need, so why not give it a shot?
But there was still the question of which authorization plugin to use.
read more…
Last week, while we were out at happy hour at Scott’s Grille, Ashley, Julie and I got onto the topic of the top five most influential albums of our lives. I think we got on the topic because someone mentioned something about that LivingSocial Top 5 application that has invaded our Facebook home pages.
I’m sure we spent at least an hour or more on this topic alone. Our passion for the subject probably was intensified by the beer we were enjoying.
Picking a top five anything has always been difficult for me. A list seems so… final. I think you have to be absolutely certain about the five you choose. People have told me that I could always change the list later. But if you can just change the order of the list, or substitute entries in and out willy-nilly, I think you compromise the significance of the list. In my opinion, it should be a major life decision to alter one of your lists in anyway. I know that @topherbook is with me on this one.
read more…
I think that since I’ve made my career as a web developer, sometimes I take technology for granted. In a single day, I probably spend more time sitting on my rear-end in front of a computer than I do sleeping. And when I’m not at the computer, there’s a good chance I’m watching TV on my HDTV, playing XBox, or fiddling with my Blackberry. Even when I make it out to the gym for a quick workout, I’m toting my iPod.
The point is that I’m never not plugged in. And I can’t imagine what life would be (or was) like without all of this gadgetry. I know I existed before this technology — there are photographs on 35mm film out there to prove it — but I can’t remember what it was like.
I also can’t imagine how an organization can survive and flourish in the 21st century without embracing technology. That is something that the Art Association of Harrisburg is currently struggling with.
read more…