One of the problems you will face after deciding to build an application is what to spend your time learning. There are a variety of options, and picking technologies can be intimidating. Furthermore, basic concepts are often elusive until you have experience with them. In this article I will outline my suggestions based on my experience building TowedCar.info.
The basics: HTML and CSS
The back end: What makes the web app work
With that out of the way, you now have a large assortment of options for the language you will use to process, transform, and react to information. For my tow app, I needed a language that would get the data from the Hartford open data portal, put it in a database and send a text message when a car is towed.
Popular choices include Python, Ruby and PHP. PHP is by far the most popular. WordPress and Facebook are written in this language. But I chose to use Ruby since it is well documented and employed by companies like Twitter, Apple and the New York Times. None of the languages are bad choices, per se, but you should commit to whatever choice you make because it will be easier to learn and deal with each language’s nuances by sticking with it, then trying to do the same thing in similar languages. People who specialize in these languages are known as back-end developers.
If you choose Ruby like I did, there are many helpful resources available to learn it. For a friendly introduction to the language, I recommend checking out Code School’s Try Ruby course and then take their Ruby Bits course and finish up by completing the Rails for Zombies series. Finally, once you have built comfort with that, I recommend Michael Hartl’s incredibly well written Ruby on Rails tutorial which helped me learn what I needed to know to write this app.
Databases: How to store information
Another decision you will have to make is what kind of database to store your information in. Databases store data ranging from user account logins to the posts and comments you see on blogs. For my tow app I store a table of user information and a table of tows. This allows me to get a list of towed users by comparing the list of license plates of users with the list of license plates of towed cars, and then sending any matched users the alerts they signed up for.
The good news is that, for the most part, you do not need to learn a lot about these databases to use them with a language like Ruby on Rails. I recommend you use PostgreSQL and not think about this at all as you learn. However, if your primary activity is wrangling data, then learning SQL is an extremely valuable skill. If you want to dive deeper into databases, I recommend Code School’s introduction and then use the manual.
Putting it on the internet
After building the program you need to find a place for it to live on the internet. This basically means you need to pay a service to run a computer on the cloud, so that users around the world can run your application — and not just you.
Many Ruby on Rails developers start by having their applications live on a platform called Heroku, which makes this process easy. Heroku offers a free version so you can test your application and provides tools that make it easy to go through the process of deploying an application to the Internet. However, the downside is that Heroku is expensive if you outgrow their free plan.
Another option is to pay a service to run a server for you — but not just any one. Many services, like Dreamhost, offer ‘shared’ servers — which means you are sharing that a computer’s resources with many other users. What you need is a virtual private server (VPS), which means you have the server all to yourself. There are multiple providers of this service, like Linode and Amazon Web Services. I chose to host TowedCar.info on Linode. Their pricing is excellent and they are recommended by many developers. Popular websites like The Onion are hosted on Linode, so I know it is reliable. However more demanding applications are often hosted on Amazon Web Services, which offers a free one-year trial of many of its services.
Other steps: Domain name, security and more
If you want your web application to have a domain name, you need to buy it. The cost is nominal, usually less than $20 a year. There are many places where you can purchase domain names, but I purchased TowedCar.info from Hover.com. You can then link the domain name with Heroku or your VPS. If you are using a VPS, you will need to set up a web and application server like nginx and Phusion Passenger before you are able to serve your application to the public.
Since I do not want the NSA or other people reading my users license plate numbers in transit, I decided to secure my website with something called SSL. Heroku comes with SSL, but if you use a VPS you have to purchase an SSL certificate. I purchased my SSL certificate from http://www.ssls.com/. I then installed this certificate on my server by following their instructions and updated my app to use the secure connection.
Finally if you are looking for a more comprehensive introduction to computer science that includes theory it is worth taking Harvard’s CS50x online courseware. While the practical tools and tutorials described earlier in this article are great for tackling specific problems, knowing theory will help you understand and make better programming decisions. At the opposite end of the spectrum, The Bastards Book of Ruby is a great resource for when you have to pull together a project in less than 24 hours.
The key to learning all of this
The key to learning these skills is to do it one step at a time. Learning how to write code in Ruby is going to take more time than learning how to develop web applications in Rails. If you are starting from scratch, learning how to deploy your application on a VPS will take many days of learning about Linux server administration, and it may be better to use a tool like Heroku that lets you deploy it without that learning curve. Sticking with popular and well tested tools will usually allow you to find superior documentation that makes your life easier. With effort and patience you too will be able to build web applications.
Comic courtesy of Abstruse Goose under a Creative Commons license.