And About Time Too!
June 1, 2006
This post carries an Moderate to Extreme Geek Warning.
My site’s new backend, rewritten in Ruby on Rails, is now up and running – yay! The only thing left is for Kagi to change the URL used when sending payment data – that will probably take a day or two, but isn’t a problem as the old stuff is running side by side, forwarding requests to the Rails stuff.
People probably won’t notice much of a difference but plenty has changed. The store (Feeder example) is much better and now handles discount codes, the items on the News page are generated from the RSS feed (this needed about 10 lines of code, a template and a partial), the forms on the Support and News pages use AJAX to show success/failure messages (so the whole page doesn’t need to reload – click the submit buttons without entering anything in the form to see that work), plus registration and lost codes emails are now formatted in HTML.
I’ve also added support for PayPal’s Payment Data Transfer, so when the customer returns to my site after the payment has been made, they will see their registration codes in addition to receiving an email. This will help with those times when emails sent from my server are marked as spam (although this doesn’t happen often now that I got reverse DNS set up).
The configuration for all this was fun. Apache proxies requests to Lighttpd to serve the Rails stuff (so, for example, you see http://reinventedsoftware.com/store/ instead of http://reinventedsoftware.com:3000/store/) and Lighttpd has Apache serve static pages in any of those directories. It all works seamlessly.
While I could find instructions out there on how to get Apache proxy to Lighttpd to serve an entire Rails application from a specific URL (e.g. http://reinventedsoftware.com/myrailsapp/) this mixing and matching wasn’t documented – so I will probably put something about this on the Rails Wiki. It was quite straightforward once I had worked it all out.
I’ve had a lot of fun learning Ruby on Rails. Some of the stuff involved has been a horrible, such as the sysadmin stuff with Apache, but it’s been great to do something different and I am really pleased with the result. 😀
OK, now I’ve written all that, watch the site go down big time and take the entire internet with it. 😉