Although at first the framework looks a bit like PHP framework, Ruby on Rails provides much cleaner and well designed code structure so the developer is never lost in long boring and ugly code to drift upon just to find a simple mistake. Although it lacks the Django ability to generate its own admin panel, it has some beautiful features which make’s it much easier for the developer to create one:
• Ruby on Rails is RESTful – which means it doesn’t only use the GET and POST parameters when
sending data to the server, but also PUT and DELETE which makes it easier to determine
whether we need to read, update, create or delete an item (given a blog post, gallery image or
simple menu)
• Simple routing – the framework handles most of the RESTful links by itself so the developer
writes only short functions to manipulate the data without worrying for complicated file
naming, long functions, etc.
• Scaffolding – the ability to generate pages that manipulate database data (although it lacks the
ability to update by itself when changing the database schema, that way the programmer can
easily generate pages for the admin panel and then to wrap around the custom functions and
the logging system)
• The Ruby language – despite the fact that there cannot be written many words for the
language (as we did with Python above), the Ruby language is very powerful and gives us the
opportunity to write less code in a beautiful manner compared to PHP (sometimes even
smaller than Python code). The main beauty of the language can only be felt by a developer
when he switches from PHP to Ruby, it is really hard to describe it in just a few words in a
presentational document. Also all of the mentioned benefits for the Python language above
apply here as well.
Why using Django/Ruby on Rails
There are several reasons to switch from PHP frameworks/content management systems to Python or Ruby:
• It’s much easier for new developers to continue a project written by past developers
• All the PHP frameworks are either clones of Ruby on Rails or Django but lack their simplicity and powerfulness
• No more SQL Injection hacking – the developer doesn’t have to worry about the security side most of the time, the framework/language does it for him
• If the client wants new feature, sometimes it’s much faster to add it to an existing Django/Ruby on Rails application than PHP. Even when a PHP system like WordPress, Joomla or Drupal is used, if the system lacks the feature, the coder is put in situation where he needs to find a module that does that feature and if there isn’t any, he has to spend a few days to play with the system API to build it, because most of the PHP CMS systems are very restricting when comes to custom solutions
• The speed is much faster than using a PHP framework/CMS This list can go on and on forever. Let’s just mention some of companies that use Ruby or Python instead of PHP:
• Google uses python for some of their projects
• http://www.djangosites.org/ is a site written entirely in Django with list of sites that have confirmed using Django as a development framework
• Twitter is written in Ruby on Rails for his frontend
• YellowPages.com uses Ruby on Rails
• GitHub.com uses Ruby on Rails
Conclusion
It doesn’t matter whether you’ll use Django or Ruby on Rails for your applications as both are very powerful frameworks and have some very unique features. On one hand you have Django where you have an admin panel on the fly for any custom project, or on the other you have the simple and powerful Ruby language where everything is organized.