So You Want To Make A Website In Rails
The first thing to understand is that Ruby on Rails is a framework that uses the Ruby language. There are other frameworks, most notably the frameworks CakePHP and Zend that use the PHP programming language, and Django that uses Python. The framework you choose should primarily be a matter of the language you are comfortable with, or that you’d like to learn. However, there are some significant benefits to using Ruby on Rails, especially as a beginner:
- More abstractions from the database, vs CakePHP and Zend: Ruby on Rails makes it easier to avoid needing to know how the database itself is created. Ruby on Rails code will do it for you – and by default, Rails uses SQLite as a database.
- More free, vs Zend: To get into serious Zend development, you’ll need to buy the developer studio and pay for the server. Rails (and Django) are entirely free.
- More helper commands: The Rails framework comes with a host of helper commands that automate many of the tasks you have to do “by hand,” in both the PHP and Python frameworks mentioned above. Django is much better than the PHP frameworks in this regard, but Rails goes a step further with its “magic” – commands that tie various pieces of your application together in one step.
For some time, two disadvantages of the Rails framework were the difficulty of installation and the learning curve in setting up simple applications. With versions 3 and 4 of the framework, installation has gotten a lot simpler – you can use Rails Installer on both Windows and Mac OSX environments for a fairly simple process of getting all the necessary pieces set up.
Frameworks – What Are They Good For?
Well, let’s take a step back – why do you need a framework at all? When you write a web application, there are many things to think about:
- Security: Your application should not be easily hacked – you shouldn’t have to worry about re-inventing all the wheels necessary to prevent your site from being hacked before it’s even up.
- Performance: It isn’t easy to get your site to run quickly, but a framework can help point you in the right direction.
- Managing Your Data: Any web application has to handle some data – whether it’s a search index, a stream of friend updates, or a catalog of books, it all comes down to data, and a framework will make it easier to organize the data and pass it back to the browser.