Drupal vs Ruby on Rails (RoR):
While Drupal is a Content Management System (CMS) used to manage web content and blogs, Ruby on Rails (RoR) is a web development platform. RoR can be used to create an application like Drupal. RoR is written in the language Ruby, which is similar to Perl, C or Java. With the help of RoR, you can write a CMS application. On the other hand, Drupal is written in PHP.
So, choose Drupal if you:
- Are not well versed in programming
- Want to create a blog or a website with no backend programming
- Are looking to create an interactive web interface to edit web pages
- Want a preconfigured and extensible structure for web pages
- Want to incorporate plug-ins that provide functionalities
- Are looking to upgrade the system in PHP
Choose Ruby on Rails, if you:
- Are a programmer well versed in Ruby
- Are looking to incorporate a web interface with an information database
- Want to create a website with unique functionalities
- Want a rich, interactive web interface
- Want to create a site that does not require blogging or discussion forum interface
Since Drupal used PHP, you cannot create a separate module for Ruby on Rails. An integration of Drupal and RoR is done by creating a module that puts an inline frame in the page and loads it with your RoR application. It could also be a simple page with an iframe pointing to the Rails application.
Drupal Architecture:
- Drupal contains:
- Content node
- Access control
- File management
- Interoperability with external data sources
Drupal modules can:
- Implement new functionalities and plug them into the existing Drupal system
- Access database and create, insert or update tables
- Enforce database access controls
- Define views
Ruby on Rails Model View Controller (MVC) Architecture
The RoR platform is based on the MVC design pattern. The application code is abstracted in a way that business logic, application logic and UI logic are segregated. In short, the Model handles the data, the View handles the user interface logic and the Controller handles the flow of the application. These three components reside inside the App folder in the Rails directory. The other modules of RoR are:
- Action Mailer: To send mails
- Action Web Service: For XML RPC support
- Ajax on Rails: Using JavaScript and XML to process queries by a web browser to a web server
- Web server support: WEBrick web server is included with Ruby
- Database support: Support for many databases like MySQL, SQLite, Oracle, DB2 and SQL Server
