Ruby on Rails, Elavon Converge and the Modernization of a Legacy Codebase
October 23rd, 2024 by Gage Pacifera
Remember when Ruby on Rails was all the rage?
The year was 2007. Steve Jobs and Apple release the first iPhone. Barry Bonds passes Hank Aaron for most career home runs. Mortgages in the U.S. subprime market are defaulting at an alarming rate and a global financial crisis is brewing. The sound of Beyoncé’s Irreplaceable fills the air.
In that same year Ruby 2.0 drops, much to the delight of the web development world. This new version of Ruby is considerably more mature than its 1.x predecessor and provides a solid foundation for Ruby on Rails to really take off amongst developers looking for an alternative to Java, .NET and PHP.
It is around this time period that Pinemeadow Golf embarks on rebuilding their online store. The previous version of the store had been built several years earlier on another hot new framework of its time, PERL, but the front end needs some major updates and PERL is quickly falling out of fashion. The team decides to take a chance on a new framework and the journey of building a store with Ruby on Rails begins.
Fast forward to 15 years later. The site is still chugging along using a combination of Ruby on Rails code along with some legacy PERL components. The site needs some new features and maintenance but the company’s lone code maintainer has moved on to greener fairways. The company’s CEO finds Harmonic Northwest and a new partnership begins.
Renovate or Rebuild?
It quickly became clear that major changes would be needed to get the site into shape (more on that below) and that presented a choice that would define the rest of the development process: do we make updates to the existing codebase or scrap it all and start over with a newer framework?
We knew that frameworks like Shopify and Magento could handle the store’s functionality and it was certainly tempting to switch to a more modern platform… but was that the best choice for the client?
We elected to keep the store on the same platform, that is to say on Ruby on Rails powered by AWS Elastic Beanstalk. There were enough complicated pieces on the site that were currently working well that we felt trying to translate all of those to a new platform might not be the best way forward. And so the Harmonic Northwest team dove into understanding and transforming this legacy codebase.
Environment Upgrades
The website had not seen any updates to its various environments and dependencies for a long while. Much needed updating when Harmonic Northwest arrived on the scene including Ruby, Ruby on Rails, Puma, various gem packages and the Elastic Beanstalk platform. The Elastic Beanstalk platform was sufficiently outdated that it was no longer supported by AWS which was going to be a problem for deployments and maintaining website stability.
Ultimately we were able to bump versions on all of these (1 major version for Ruby and RoR, more for many gems) and migrate the application to a supported Elastic Beanstalk platform.
Elavon Converge Credit Card Processing
The primary ask for this work wasn’t actually modernizing systems—that was just a prerequisite to being able to do anything else on the site. The main task at hand was actually swapping out their custom built credit card processing system with a new one.
We had a business requirement to implement Elavon’s Converge payment processor, a hosted payment gateway similar to something like Stripe or PayPal. Their system offers tooling that integrates tightly to application code to handle credit card authorizations and payments. Converge has a few ways to do this, but we opted to use their standalone lightbox solution. This method opens a modal window containing a short form for entering credit card information. All of the data is stored on Converge’s side and our application would receive a token to capture payment.
New Admin Orders UI
Adding the new credit card functionality also entailed setting up a new admin area where administrators can log in to charge, update and cancel payments. Harmonic Northwest designed a UI using Figma and the interface was built onto an existing Active Admin instance used for managing other parts of the site.
Other Updates
After modernizing their systems and swapping out the credit card processor, we performed several other improvements. Some of the tasks involved improving data tagging for Google Merchant and Facebook. Other tasks were geared toward improving SEO and analytics. We also did some work to reconnect the site to their affiliate sales provider Commission Junction.
Tee Off with Pinemeadow Golf!
You can check out the site and discover your next set of golf clubs at https://pinemeadowgolf.com.