Blogging Task 8: Summarise the main features of the Ruby on Rails technology for building web applications. In particular comment on the use of the MVC architecture, ActiveRecord and the stringent naming convention.

Blogging Task 8: Summarise the main features of the Ruby on Rails technology for building web applications. In particular comment on the use of the MVC architecture, ActiveRecord and the stringent naming convention.

What is the Ruby on Rails technology?

- Ruby on Rails, often shortened to Rails or ROR, is an open source web aplication framwork for the Ruby programming language. It is intended to be used with an Agile development methodology that is used by web developers for rapid development.

Who is already on Rails and behind it?

- Tens of thousands of Rails applications are already live. People are using Rails in the tiniest part-time operations to the biggest companies.  And Rails was created in 2003 by David Heinemeier Hansson and has since been extended by the Rails core team, more than 1,400 contributors, and supported by a vibrant ecosystem.

What is MVC architectur and how does it relate with Ruby on rail?

-  The Main aim of the MVC architectre is to separate the business logic and application data from the presentation data to the user. The reasons that why we should use the MVC design pattern are resuable and expressive.

-How does it relate with Ruby on rails? The pieces of the Model-View-Controller(MVC) architecture in Ruby on Rails are as follows:

- Ruby on Rails- Model. In object-oriented, database-driven MVC web applicatoins, Model consists of the classes representing RDBMS tables. In Ruby On Rails, Model classes are handled through the Active Record. Usually, all the programmer needs to do is to subclass the ActiveRecord::Base class, and the program will automatically figure out which RDBMS table to use and what columns the table has.

What is ActiveRecord and how does it relate with Ruby on rail?

- the active record pattern is a design pattern found in software that stores its data in relational databases. It was named by Martin Fowler in his book Patterns of Enterprise applicatoin acritecture. The interface to such an object would include functions such as insert, update, and delete, plus properties that correspond more-or-less directly to the columns in the underlying database table.

- Active record is an approach to accessing data in a database. A database table or view is wrapped into a class; thus an object instance is tied to a single row in the table. After creation of an object, a new row is added to the table upon save. Any object loaded gets its information from the databse; when an object is updated, the corresponding row in the table is also updated. The wrapper class implements accessor methods or properties for each column in the table or view.

- A Ruby library is available which implements the object-relational mapping (ORM) design pattern. It creates a persistable domain model from businsess objects and database tables, where logic and data are presented as a unified package. ActiveRecord adds inheritance and associations to the pattern above, solving two substantial limitations of the pattern. A set of macros acts as a domain language for the latter, and the Single Tableinheritance pattern is integrated for the former; thus, ActiveRecord increases the functionality of the active record pattern approach to database interaction. ActiveRecord is the defualt model component of the Model-View-Controller web-application framework Ruby on Rails, and is also a stand-alone ORM package for other Ruby applications. In both forms, it was conceived of by David Heinemeier Hansson, and has been improved upon by a number of contributors.

What is the stringent naming convention and how does it relate with Ruby on rail?

- Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier for example, whether it’s a constant, package, or class-which can be helpful in understanding the code.

- Naming convention Ruby on rails uses in regard to the models, controllers, source files, classes, table names, relatoinships, methods, routing & the corresponding folder structures. These are created via the ‘ruby script/’ command line generator. You can find more information on http://www.daveporter.info/ror/ror_naming.pdf.

reference:  http://rubyonrails.org/, http://en.wikipedia.org/wiki/Ruby_on_Rails, http://www.roseindia.net/struts/mvc-architecture.shtml, http://www.experiencefestival.com/a/Ruby_on_Rails_-_Rails_MVC_architecture/id/5431730http://en.wikipedia.org/wiki/Active_record_pattern, http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html, http://www.daveporter.info/ror/ror_naming.pdf.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.