Like we talked about in a previous article – software is a product that is never finished. The market, your customers, and your business are all changing and in order to stay relevant, your applications need to change as well. Obviously, it’s not an easy job to stay current, innovate, and improve day after day, year after year. However, we believe, it’s an important goal to work towards and we are here to help you in any way that we can.
Over the years, we have worked with many different technologies, frameworks and languages and we have seen that the choices you make for your project have a huge impact on the time and cost required to keep your applications up to date and to add new functionality rapidly and safely. We have had many new clients come to us, asking for complete rewrites of existing applications, not because they weren’t working but because it was just too costly and slow to keep them updated which, in turn, resulted in security problems and outdated applications not able to keep up with the competition.
Pretty much any modern programming language/framework can be used to develop any application. There are of course differences and some are better suited for certain tasks. Here at Intesys we, the Ruby on Rails team, have found that Ruby on Rails offers, not only an excellent framework that makes it easier to develop what we need, but also a wide range of tools that help structure your projects in a way that makes adding continuous improvements trivial.
In this article we would like to highlight some of the benefits of using the Rails ecosystem for your applications and what it means for your business.
Maintenance and Security
We talked about approaching application security in a previous article but it’s relevant here as well. Before you can start thinking about adding new exciting features to keep your application evolving, you need to make sure that it’s secure. Nothing can hurt your reputation like leaked user data or extensive service downtime.
You would be surprised to know how many large, important applications there are out there running on outdated operating systems without important security patches or on older versions of languages/frameworks/libraries with known security problems. It’s one of those things like when you only order certain things when eating out since that one summer job in a restaurant kitchen many years ago… When you get insight into the “behind the scenes” of software development you realize that quality and security is only as good as the competence and integrity of the developers behind it.
In order to make it easier to “do the right thing” we have chosen Rails, that gives us a series of tools aimed at solving these problems.
Gems and Semantic Versioning
In Ruby on Rails you specify external dependencies in a file, giving the name of the library and, optionally, a version number. The convention of the Rails community is to use semantic versioning which, when used correctly, allows you to apply only compatible updates. You can use this for relatively safe day to day updates and when major releases (with changes that might break backwards compatibility) come out, you know that you need to be careful and make sure that they don’t break anything in your application. In order to make sure of this, another common practice in the Rails community is to utilize Test Driven Development or TDD for short.
Test Driven Development (TDD)
We like to use Agile principles and TDD is one of them. At the core, it’s about writing automated tests for your applications. When all the tests pass, the application is working correctly and, when done properly, they allow us to make changes and add functionality with confidence, since we can be sure that we don’t break anything along the way (or if we do, the tests will let us know so we can fix it).
As a by-product, these tests help us when updating our applications. Regardless, if we are upgrading the underlying Operating System, database, search engine or an external library, we can demonstrate that the application is working as it should as long as all the tests pass. This is a huge advantage and time saver that avoids introducing hard to find problems that may not be detected until weeks or even months after the update was applied, making it very hard to trace the origin of the problem.
Another, often overlooked, benefit of TDD is that it gives you, the customer, a product that can more easily be passed along to another software house in the future if, for whatever reason, you should want to. We are always skeptical about accepting the responsibility of maintaining and evolving an application written by someone else unless it comes with automated tests. The reason is simple – as long as the tests pass, we know (and can prove to the customer) that we weren’t the cause of any potential problem that is detected later.
Safe, Consistent, and Automated Deployments
Safe, consistent, and automated deployments, just like TDD, is another characteristic of Ruby on Rails that isn’t inherent to the framework, but is easy to adopt because of the conventions used by the community and the tools provided that integrate perfectly with your workflow.
We can’t tell you how many times we’ve come across poor deployment systems (system might even be a too big word to describe some of them). So poor, in fact, that they sometimes delay the approval and publication of new features by days! Files manually copied, database tables updated by copy and pasting code in the console, multiple servers ending up out of sync, ridiculous service down times, etc.. All because of poor deployment strategies and/or tools.
We mostly rely upon Capistrano as the main tool for automating our deployments. It is very flexible and allows us to have fully automated deployments across multiple (potentially hundreds) of web and database servers. It almost completely removes downtime (we’re talking about seconds at the most) and makes sure that everything can be roll-backed should an error occur during the process. Together with Rails’ database migrations this also applies to modifications to the database.
In order to stay relevant in a constantly changing market you need to continuously improve your applications. This is not easy, but it’s an important goal to work towards. In order to do this rapidly with an agile process you need to have a solid foundation to build upon. Ease of maintenance and updates that don’t break anything need to be taken into account. The actual process of deploying your application needs to be solid and guaranteed not to leave your application in an inconsistent state.
We try to solve these problem, working with the Ruby on Rails framework and it seems to be working well. We would like to talk to you about how we can help you provide interesting applications and stay relevant in a competitive and constantly changing market. Please don’t hesitate to contact us with any questions you may have!