Diary of problems and solutions related to web programming, database development and related technologies and platforms.

Ruby on Rails - Brief Introduction

It is web application framework which helps to build database driven applications.
It works in MVC (Model-View-Controller) pattern.

View:
- It is also called presentation
- Responsible for inserting pre-built data in between HTML tags

Model:
- Contains "smart" domain objects (eg Account, Product, Person, Post) that holds business logic and know how to persist themselves to the database.

Controller:
- Handles incoming request (eg Save new account, update product, show post) by manipulating the model and directing data to the view.


Model is controlled by ActiveRecord, which is object relational mapping layer.
While Controller and View are controlled by ActionController and ActionView which are bundled in the same package called ActionPack. They are packed in a same package because they are dependent with each other. In contrast ActiveRecord and ActionPack are separate.

Source: Ruby on Rails Documentation

No comments :

Post a Comment