Redline Software Inc. - Winnipeg's Leader in Ruby on Rails Development

Redzone Leagues Demo Site

We love test drives. But we hate having to signup for one.

Well now you can test drive Redzone without signing up for anything. Our demo site is full of sample data that you can play with, so go nuts!

We will periodically refresh all the data in the demo database so don’t worry about changing stuff. That’s what it’s there for!

You can learn more by going to the demo page. And as always, if you have any questions or comments let us know!

Messaging Feature

A new messaging feature has been added to Redzone, which allows a message to be sent to a groups of users in one easy step.

The current groups that are defined are:

  • An administrator can send a message to all users.
  • An administrator can send a message to all team captains.
  • Team members can message their team mates.
  • Users can message each other.

Currently the messaging feature sends all messages out as emails, but a future update will integrate the messages directly into the site where all sent and received messages can be viewed directly within the website.

Check out our feature page for some screenshots.

Event Calendar for Redzone

We have just added a new event calendar feature to Redzone.

The user is presented with an intuitive calendar view to browse current and upcoming events. An administrator can easily create, edit and remove events as we have focused on providing an easy to use interface for performing such tasks.

Events such as season registration dates and the start of a season are automatically created and presented in the calendar. If you change your registration dates, the associated “auto” events reflect the change instantly — no need for the user to keep things in sync.

Redzone Case Study on RailsForAll.org

Redzone Leagues – Scoring Touchdowns with Rails

Excerpt

Redzone Leagues is a complete online solution for managing sports organizations. It provides leagues with a website along with administration tools to increase the organization’s productivity. Redline Software Inc. developed Redzone by taking full advantage of the RoR framework to produce a sophisticated web based tool which is intuitive, attractive, and very flexible.

Study

The Problem

Many amateur sports leagues are run by volunteers, and in most cases it takes up an extraordinary amount of time and resources to make the league a success. A growing number of leagues have a website but many of those fall short of being spectacular. Often the websites are created by volunteers, and sustaining the amount of time it takes to create and maintain a web application is a burden that many cannot follow through with.

A sports league website, in order to be an effective tool, merely cannot be a static website with some information on it. Players want to be able to see various statistics in the league, up to date scores, and be able to view their schedules. From an administrative perspective, having a database of your members and the ability to use that data for transmitting league news, promoting events, and for direct contact purposes is extremely important.

The initial requirements were:

  • 100% web based – No installation of any kind of software.
  • Able to support any team based sport.
  • Produce a website for the league membership that was appealing and easy to navigate.
  • Simple management of members, teams and player rosters with online registration.
  • Easy data entry for schedules and game/player statistics.
  • Built-in forum and news functionality.

Implementation of Redzone Leagues

Redzone Leagues could be developed using any number of frameworks. But since it was being developed as a product for Redline to sell to anyone, without any VC money to fund it, choosing the environment that would provide the highest productivity was paramount. Ruby on Rails was this framework.

With productivity comes momentum. RoR allows a team to sustain momentum because you can rapidly build features without having to jump through a lot of hoops. When developing a product from scratch, this is very important. If you are spending days just trying to get things like Tomcat, Struts, Spring, Hibernate, Eclipse, Ant, and (insert whatever technology that is bugging you today) all playing nice with each other, momentum will evaporate very quickly along with any dream of ever releasing your product.

The Rails framework is attractive not only because of its fairly large and constantly growing API, but also because of the community involved with RoR who are “giving back” in the form of Ruby Gems, Rails Plugins, and Javascript libraries. Redline has already released three plugins while developing Redzone and there are more on the way.

Plugins created while developing Redzone Leagues

3rd Party Plugins that Redzone Leagues Uses

3rd Party Ruby Gems that Redzone Leagues Uses

The Results

Rails has met and exceeded our expectations by providing us with increased productivity and overall developer happiness. Rails can easily be extended when needed, because of the flexibility that Ruby provides. Ruby’s powerful syntax allows developers to accomplish more with less lines of code. Concerns about Ruby being a dynamically typed language, by not having a compiler to catch various errors, have vanished with the use of unit, functional and integration testing.

Our initial production environment used Apache and FCGI, which was difficult to setup and cumbersome for deploying our application. We have since upgraded our environment to use Apache with Mongrel, and we make use of Capistrano to provide us with a seamless deployment approach.

Leagues have been using Redzone for several months now and the user feedback has been great. Our users don’t have to worry about backing up their data, security, uptime or bandwidth issues. Redzone takes care of it all for them.

Costing approximately one dollar per player, Redzone Leagues is an affordable solution with a high return on investment.

The future

Redzone’s foundation has been laid, and now the bells and whistles are being developed. Features like automatic generation of schedules will take league productivity to a new level. Event calendars, photo libraries, and league mailing list facilities are all on the horizon, and we have a few other features that we’re not ready to share just yet.

Visit Redzone Leagues to learn more.

Hotmail Blocking Emails

In this day and age, it is pretty common for emails that come from a web application to get incorrectly flagged as junk/spam. In the battle against spam, many email providers have taken a shoot first ask questions later approach. I can’t say I blame them.

But totally rejecting email from a web application, that is originating from a server that is not on any spam blacklists, seems a bit excessive. This is what Hotmail was doing to us recently.

So what’s the solution?

From what I can tell, there isn’t a single solution that will work 100% of the time with Hotmail. If there was that would probably defeat the purpose of their Sender ID system. But I can tell you what we did to get unblocked.

Sender Policy Framework (aka SPF)

SPF is simply a TXT record in your domain which states which servers have the right to send email on behalf of the domain. We had used SPF records in the past for our domains, but we noticed that Hotmail still treated our email as spam. When we switched DNS servers recently as part of our server migration, I didn’t add in the SPF records because it didn’t seem to help much in the past. From what I can tell though, things are different in Hotmail-land now!

For gmail, everything was working fine, but by looking at the headers on the email coming from our application you could see the following:

1
Received-Spf: softfail (google.com: domain of transitioning do-not-reply@redzoneleagues.com does not designate 64.79.213.26 as permitted sender)

So google does look up the SPF record on the domain, but wasn’t blocking our email. Ideally though I want the Received-Spf to be a pass and not a softfail.

How do I make an SPF record?

First off, you will need to be able to edit your DNS entries for your domain. If you don’t know what a DNS is or how to edit it, then you’re going to have problems with this exercise.

Next you can go to Microsoft’s page for generating SPF records here. Answer the questions on the pages and at the end they will give you the string of text that you need to put into your domain. It will look something like: “v=spf1 a mx ~all” but will vary depending on your answers. Edit your domain and add a DNS record of type TXT with the string generated from the SPF tool. Consult your DNS administration documentation if you are unsure how to do this.

Once you are done that part, I recommend you use dig to validate your TXT records on your domain. For example:
dig example.com txt

How do I know it’s working?

To test this I just had my web application send me an email again to my gmail account. This time I got the following:

1
Received-Spf: pass (google.com: domain of do-not-reply@redzoneleagues.com designates 64.79.213.26 as permitted sender)

Sweet.

I did all this but Hotmail is still blocking me!

Hotmail doesn’t use SPF directly. Hotmail will do a SPF lookup on your domain and cache it. So even when you do get your SPF records all hooked up, don’t expect immediate results. They plug this data into their Sender ID system to figure out if they like you or not. They claim that SPF alone won’t allow or block you, but from what I can see it definitely can’t hurt. It could take half a day or so to get your record updated so you need to be a bit patient.

I did all this and waited patiently, but Hotmail is still blocking me!

This was all we needed to do in order to get our email to get past Hotmail’s blockers. Of course the email still goes into the junk folder, but at least our users can still read it. Having your users add your email to their address book or Hotmail “Safe-List” corrects that problem easy enough.

If you’re still getting blocked then you should verify that your server isn’t on any blacklists. Try this tool just to be sure that you are not on any lists. If you are, then good luck getting off it :(

Update – April 11th, 2007

One thing I forgot to mention…
You can also send an email from your domain to senderid@microsoft.com asking them to add your domain to their safe list. When I had first did this with my redzoneleagues.com email address it bounced right away with the following:

1
2
3
4
5
This is an automatically generated Delivery Status Notification
Delivery to the following recipient failed permanently:
senderid@microsoft.com
Technical details of permanent failure:
PERM_FAILURE: SMTP Error (state 12): 550 5.7.1 Your e-mail was rejected by an anti-spam content filter on gateway (205.248.106.32). Reasons for rejection may be: obscene language, graphics, or spam-like characteristics. Removing these may let the e-mail through the filter.

This of course was not good. I then emailed them with another email address and actually got a response back from Microsoft a couple of days later saying they added our domain. So perhaps this actually did help us after all. Give it a try if you’re still having problems getting through to hotmail.

Some other potentially helpful links:

I hope this helps anybody who is fighting with Hotmail and getting through their blockers. If you have any more tips let us know!

New Website Layout

If you’ve visited our site previously, you may notice some changes to our layout and design. If you’re new then welcome to the site, and take my word for it that the site has changed. :)

Our aim was to clean up the look, make things easier to read and keep a consistent look across our Redline and Redzone pages.

We’ve also added a feed to our weblog on the Redline and Redzone pages to make it easier for you to see what we’re up to. We’ll be posting about new and upcoming Redzone features along with various technology related topics.

Along with the recent changes, we’ll be updating the features section of our Redzone leagues site to better showcase what’s available in the product. Also keep an eye out for some videos and walkthroughs in the near future.

Let us know what you think of the new changes by leaving a comment or let us know what you’d like to see.

Scratching Your Own itch… The Creation of Redzone Leagues

I’ve been reading the book Founders at Work: Stories of Startups Early Days, and for anybody interested in being an entrepreneur I suggest checking it out. Basically it’s a series of interviews with people who are now famous in the tech industry because of the company and products they created. One thing you’ll notice with a lot of really great products is that they were originally developed to solve a problem that a founder was having. For example, Hotmail started up because Sabeer Bhatia and Jack Smith wanted to access their email but their employer’s firewall was blocking them. Blah blah blah, hotmail.com, sold for $400 million, you get the idea. The same goes for Basecamp, the now famous web app that was the start of the Ruby on Rails framework. These guys were scratching their own itch first. Instead of building something and then finding the customers, they built something for themselves, because they were the customers.

So what is Redline’s “itch”? Well being software developers we have a few, mostly because developers don’t shower that often. Ok I’m joking, I shower…almost daily. Ok back to the real itch. For a few years I was involved on a volunteer committee which oversaw the operations of a touch football league. Being the token geek, one of my tasks was to maintain the league’s website. The website I inherited looked pretty slick to the public, but was very time consuming to maintain all the stats and player data. Maybe you didn’t catch the key words in this paragraph – “volunteer”, “time”, and “consuming”. Time consuming and volunteer don’t really go together for me. It’s sorta like oil and water, Vaseline and condoms, you get the picture.

I was burning up a few hours a night doing mind numbing work which didn’t last too long before I decided that it’s time for a new system. So first things first, I did some searching on the net and found a whole pile of crappy products that I could use instead. It wasn’t looking too promising.

But what was I looking for?

Well first off I didn’t want to have to install anything on my computer. I often would make changes to the site from home, work, or a friends house and I didn’t want to have to mess around with some desktop app. Plus I was using mostly Linux at the time and nobody makes clients for that OS. Install windows to manage my league? No thanks. I want something 100% web driven.

Next I wanted something that looked slick. The website that we already had looked really great, but just lacked the back end admin functions to save me time. If I went with a product that didn’t make a nice clean website that looked sexy, people would be pissed off. People were already mad at me for not having the stats up to date, the last thing I needed was them complaining about something else.

So keeping in mind the above two requirements, I also wanted an easy way to track all the statistics in the league. I also wanted the ability to track a players stats from season to season, as well as the team’s stats from season to season. I needed a way to easily setup a schedule and also an easy way to move games around. I wanted a way for the team captains to manage their own rosters. I was getting sick of doing data entry.

Another popular thing we needed was a forum, because this was a football league and the guys loved talking smack on the site. I also wanted an easy way to post up news, and other information about the league, and the ability to have a mailing list application baked right into the site.

I wanted to be able to post video clips, calendars, photo libraries, the whole 9 yards. The list goes on and on. Of course no products out there do them now. Most of them never will and that’s fine. I want something that gets the job done for me, and in turn I’m sure it’ll help solve other people’s problems. I know some people that manually update the HTML pages when they update their stats. I don’t know what flavor of Kool-Aid they are drinking but they can keep it. When I enter a stat, I only want to do it once. The software should go out and make sure the player rankings, the team stats, the standings and whatever else is all up to date.

So I had my feature list but no software to satisfy it. Granted, being a developer I would’ve tried to build this even if there was a product out there that did the job. It was something I wanted to build. I even tried to do it a few times, but that whole full time job would get in the way. I also tried a few different frameworks, but nothing was really making me excited. Turns out I also hated web development.

Then my friend Andrew introduced me to Ruby on Rails. Suddenly web development didn’t suck as much anymore. I was able to get things done quickly and without irritating me, which kept the motivation and momentum going. Development was fun again and at that point I knew I wanted a full-time job doing Rails. Guess what? I live in Winnipeg, Manitoba. Not exactly tech-central. So if I wanted to do Rails full time I might as well start my own company (I also hate working for other people). Andrew had the same thoughts, so we teamed up and made Redline Software Inc.

Fast forward a year. We’ve been busy building this sport management site and doing Ruby on Rails contract work. We’ve had a few leagues using our product along the way, but now Redzone is ready for prime time! By the way we named it Redzone Leagues. :)

Has the itch been scratched? You bet is has. The result is Redzone Leagues. But a burning sensation is still leftover, so our job isn’t done yet. More features are still on our to-do list, and we’re getting great feedback from our users. So check back often to see what we scratch next.

Winnipeg Ruby Group?

Calling all Winnipeg Ruby developers!!! Are there any? :)

One of our clients is a member of a Ruby group where he lives (in Florida), and it made me wonder if anybody in Winnipeg would be interested in a Ruby Users Group? Right now I don’t even know how many Ruby developers there are in Winnipeg so even if you aren’t interested in having a group, post a comment and say hello!

I haven’t put much thought yet into what the group would be all about, but if you have suggestions post away! Even if you aren’t a Ruby or Ruby on Rails developer yet, but you’d like to learn more about it, I think a Users group like this would be an excellent way to get rolling.

Looking forward to hearing from you!

From_db ActiveRecord Extension

Here’s a really simple, but useful ActiveRecord extension I wrote.

1
2
3
4
5
class ActiveRecord::Base
  def from_db
    self.class.find self.id
  end
end

What this does is reload the current object from the database and returns it. Read more about how this can be useful…

copy this into a file and place it in your project lib directory

What this does is reload the current object from the database and returns it. “Ok, sounds good, where would I use it?”

If I have a User object for example…

1
@user = User.find :first

and assign some new attributes to it (during an edit for example)

1
@user.attributes = params[:user]

and my template looks like this…

1
<h1>Editing <%= @user.name %></h1>

Now if the user blanked out their name (causing an error) and the form gets redisplayed on the update, the name in the header will be blank, which isn’t very nice.

So let’s use our new extension like so…

1
<h1>Editing <%= @user.from_db.name %></h1>

This will reload the object from the database with the original name in the header.

This looks much cleaner than this I’d say…

1
<h1>Editing <%= User.find(@user.id).name %></h1>

Using from_db does not affect the attributes of the @user value at all, as a seperate object is being returned, so @user can still be used normally in the rest of the code.

from_db differs from the rails method reload in that reload updates the associated objects attributes with those from the database, thus modifying the object. from_db does not modify the associated objects attributes as it is returning a seperate object instead.

1
2
3
4
# @user is updated with the original attributes from the database
@user.reload
# @user is not modified as it returns a new object with the original attributes from the database
db_user = @user.from_db

One thing you don’t want to be doing though is appending from_db to your object all over the place as this will add unnecessary overhead to the database with additional queries. Instead save the from_db value in a seperate variable and use that if you need to use the original values more than once during a request.

P.S. This extension can also be useful in tests for comparing modified values to those currently in the test database. :)