Ch-ch-ch-changes at Planet Argon »
Created at: 13.08.2009 02:31, source: Robby on Rails, tagged: Business Ruby on Rails ruby PLANET ARGON rails boxcar planet argon Business blue box group hosting rubyonrails announcement
Now that the cat is out of the bag, I can share some recent news with you. Earlier today, we announced that Blue Box Group had acquired Rails Boxcar, our kickass deployment solution for Ruby on Rails applications.
Our team has been offering hosting services for over six years. When I made the decision to start providing Rails hosting over four years ago, it was something that I thought the community needed to validate that Ruby on Rails was a viable solution for building web applications. At the time, there was only one or two companies offering pre-configured solutions. The good ole days. :-)
Over the course of the past 4+ years, we’ve helped deploy and host well over a thousand web applications built with Ruby on Rails. Perhaps we even hosted your site at one point or another. We definitely had a lot of fun and learned a lot from our experience.
Fast-forward four years, the community now has several great solutions and options for hosting their Ruby on Rails applications. Knowing this, we began to look over the plethora of services that we offer and felt that we had been spreading ourselves too thinly. We were faced with the big question of: Should we focus our energy on trying to innovate in this competitive space or should we find a community-respected vendor to pass the torch to?
Rails Boxcar is a product that we are extremely proud of and believe the acquisition by Blue Box Group will be great for our existing customers. The acquisition is going to benefit our customers as they’ll be able to interface with a team with more resources. A team that also aims to innovate in this space and believes that Rails Boxcar will help them do that.
As a byproduct of this deal, our team has an opportunity to focus our collective energy on designing and developing web applications, which has also been a central part of what we do for as long as we’ve been in business. We plan to speed up our efforts on a handful web-based products that we’ve been internally developing and hope to release in the near future.
I had the pleasure of getting to talk thoroughly with the team at Blue Box Group and really feel like they’ll be able to focus their energy on maintaining and innovating within the Ruby on Rails hosting world.. definitely more than we could over the coming years. In the end, the acquisition is going to benefit our customers the most as they’ll be able to interface with a larger team that is innovating in this space.
If you’re interested in learning more about the acquisition, please read the press release.
From our perspective, this is a win-win-win situation for everyone involved. Expect to see some more news from us in the near future… and if you’re looking for a design and development team, don’t hesitate to get in touch with us.
more »
Slides from my Rails Underground 2009 talk »
Created at: 24.07.2009 18:37, source: Robby on Rails, tagged: Business Ruby on Rails PLANET ARGON hosting rubyonrails agile conference deployment london talk feedback seo railsunder presentation analytics sem
Hello from London!
Am currently enjoying the talks at Rails Underground 2009 in London and had the pleasure to be one of the first speakers at the conference. My talk covered a collection of what our team considers best practices. Best practices that aid in the successful launch of a web application and covered a few Rails-specific topics as well.
I’ll be sharing some posts in the coming week(s) that’ll expand on some of these topics as promised to the audience.
Since I covered a wide range of topics, I decided to share my slides online. They won’t provide as much context (as I’m not speaking as you’ll look at them), but they might hint at some of the topics that I covered. There was a guy video taping the talks… so I assume that a video of my talk will be posted online in the near future.
Until then… here are the slides
more »
Launching Rails projects, an open call for lessons learned »
Created at: 23.06.2009 20:33, source: Robby on Rails, tagged: Ruby on Rails ruby programming launching rubyonrails tips conference rails lessons
I’m working on my presentation for Rails Underground and was hoping to solicit a few tips from other people in the industry.
Have you launched a Ruby on Rails application recently? Are there some things that you wish you had known beforehand?
Mind sharing? You can email me with your story at robby+launchstory@planetargon.com. I’ll let you know if your tip gets used in the presentation and please indicate if you’d be okay with me posting your tip in a future blog post.
more »
Using model constants for project sanity »
Created at: 23.06.2009 09:39, source: Robby on Rails, tagged: Ruby on Rails ruby programming development ruby rubyonrails model activerecord businesslogic code
On one of our larger client projects (approx. 160 models and growing…) we have a specific model that we refer to quite a bit throughout our code. This model contains less than 10 records, but each of them sits on top of an insanely large and complex set of data. Each record refers to a each of their regions that our client does business in.
For example… we have, Australia, United Kingdom, Canada, United States, and so forth. Each of these regional divisions has their own company code, which are barely distinguishable from the next. They make sense to our client, but when we’re not interacting with those codes on a regular basis, we have to look constantly look them up again to make sure we’re dealing with the right record.
I wanted to share something that we did to make this easier for our team to work around these codes, which we should have thought of long ago.
Let’s take the following mode, Division. We only have about 10 records in our database, but have conditional code throughout the site that are dependent upon which divisions specific actions are being triggered within. Each division has various business logic that we have to maintain.
Prior to our change, we’d come across a lot of code like:
# For all divisions except Canada, invoices are sent via email
# In Canada, invoices are sent via XML to a 3rd-party service
def process_invoices_for(division)
if division.code == 'XIUHR12'
# trigger method to send invoices to 3rd party service
# ...
else
# batch up invoices and send via email
# ...
end
endAn alternative that we’d also find ourselves using was.
if division.name == 'Canada'Hell, I think I’ve even seen if division.id == 2 somewhere in the code before. To be fair to ourselves, we did inherit this project a few years ago. ;-)
Throughout the code base, you’ll find business rules like this. Our developers all agreed that this was far from friendly and/or efficient and worst of all, it was extremely error-prone. There have been a few incidents where we read the code wrong and/or got them confused with one another. We were lacking a convention that we could all begin to rely on and use.
So, we decided to implement the following change.
Model Constants
You might already use constants in your Ruby on Rails application. It’s not uncommon to add a few into config/environment.rb and call it a day, but you might also consider scoping them within your models. (makes it much easier for you to maintain them as well)
In our scenario, we decided to add the following constants to our division model.
class Division < ActiveRecord::Base
AFRICA = self.find_by_code('XYU238')
ASIA = self.find_by_code('XIUHR73')
AUSTRALIA = self.find_by_code('XIUHR152')
CANADA = self.find_by_code('XIUHR12')
USA = self.find_by_code('XIUHR389')
# etc..
endWhat this will do is load up ech of these constants with the corresponding object. It’s basically the equivallent of us doing:
if division == Division.find_by_code('XIUHR389')But, with this approach, we can stop worrying about their codes and use the division names that we’re talking about with our clients. Our client usually approaches us with, “In Australia, we need to do X,Y,Z differently than we do in the other divisions due to new government regulations.”
if division == Division::CANADA
# ...
end
case division
when Division::AFRICA
#
when Division::AUSTRALIA
# ...
endWe are finding this to be much easier to read and maintain. When we’re dealing with a lot of complex business logic in the application, little changes like this can make a big difference.
If you have any alternative solutions, we’d love to hear them. Until then, we’ve been quite pleased with this approach. Perhaps you’ll find some value in it as well.
more »
Aliasing resources in Ruby on Rails »
Created at: 23.06.2009 09:00, source: Robby on Rails, tagged: Ruby on Rails programming PLANET ARGON rubyonrails rails routes seo development
Earlier today, a friend working on a project asked me how we approached routes on our website. If you take a quick peak at our website, you’ll see that we have URLs like so:
- http://planetargon.com/
- http://planetargon.com/who-we-are
- http://planetargon.com/who-we-are/robby-russell
I couldn’t remember where I came across this before and wasn’t quickly finding it in the Ruby on Rails API, so decided that I’d do a quick write up on it.
When we launched our new site a few months ago, we were working off an existing code base. We have a model named, TeamMember and a corresponding controller. When we decided to come up with new conventions for our URL structure, we opted to ditch the normal Rails conventions and go our own route. What we weren’t sure about was how to alias resources in our routes nicely. After some digging around, we came across the :as option.
So, our route was:
map.resources :team_membersWhich provided us with:
- /team_members
- /team_members/robby-russell
We simply added :as => 'who-we-are' to our route:
map.resources :team_members, :as => 'who-we-are'...and we got exactly what we were looking for in our URLs.
* /who-we-are
* /who-we-are/gary-blessington
If you look at our site, you’ll notice that we did this in a few areas of our application so that we could define our own URL structure that was more friendly for visitors and search engines.
Anyhow, just a quick tip for those who want to change up their URLs with Ruby on Rails.
p.s., if you know where I can find this documented, let me know so that I can provide a URL in this post for others. :-)
more »
