Book Image

Building Dynamic Web 2.0 Websites with Ruby on Rails

By : A P Rajshekhar
Book Image

Building Dynamic Web 2.0 Websites with Ruby on Rails

By: A P Rajshekhar

Overview of this book

<p>Ruby on Rails is an open-source web application framework ideally suited to building business applications; accelerating and simplifying the creation of database-driven websites. Often shortened to Rails or RoR, it provides a stack of tools to rapidly build web applications based on the Model-View-Controller design pattern.<br />&nbsp;<br />This book is a tutorial for creating a complete website with Ruby on Rails. It will teach you to develop database-backed web applications according to the Model-View-Controller pattern. It will take you on a joy ride right from installation to a complete dynamic website. All the applications discussed in this book will help you add exciting features to your website. This book will show you how to assemble RoR's features and leverage its power to design, develop, and deploy a fully featured website. Each chapter adds a new feature to the site, adding new knowledge, skills, and techniques.</p>
Table of Contents (16 chapters)
Building Dynamic Web 2.0 Websites with Ruby on Rails
Credits
About the Author
About the Reviewer
Preface
Index

RoR—Concepts and Components


Now that the basics of Ruby have been introduced, let us move on to the next stage—RoR. If you ask the question, 'What is RoR?', the most common answer will be, 'RoR is a Ruby-based framework that implements the MVC pattern'. There are two key points in this answer:

  • It is a Ruby-based Framework

  • It Implements the MVC pattern

Let us have a look at these points in detail.

RoR is a Ruby-Based Framework

The dynamic and open-ended nature of Ruby makes it an attractive option to build frameworks. Given the ease of meta-programming and reflection, blocks and iterators along with the exception handling, you have a language that could service any tier of a web application. That's what Mr. Hansson did. He took the different services provided by Ruby and created RoR out of it.

How Ruby eases the meta-programming is evident from Active Record, the ORM framework within RoR. Based on the name of the class, RoR (basically Ruby constructs) reads the schema and creates the objects of...