Login
Username:

Password:


Lost Password?
Register now!
Page (1) 2 3 4 ... 9 »
Articles : Web Development Using the Ruby on Rails
on 2008/7/27 23:54:31 (1966 reads)
Articles

Ruby on Rails is probably the most talked about and most controversial Web framework since the Internet was invented. After reading this gentle introduction, you will finally know what people all over the world are raving about!

Author: Nico Mommaerts

Introduction

Ever since companies discovered the merits of writing applications for the Web, people have been writing frameworks for making the work of a Web developer easier. The popularity of Web applications is due to the fact that a Web browser is all that is needed for a client to access a Web application. This makes deployment and maintenance a lot easier as a Web application only needs to deployed or updated on one server, instead of on thousands or possibly millions of computers. The downside of Web applications is that they are generally more complex to develop as a rich client application. Web applications are always written using a multitude of technologies at once: HTML, CSS and JavaScript for the presentation; Java or .NET for the application logic; a multitude of server environments and browsers each with their own quirks.

Given this complex environment to develop for, it is very easy to write unmaintainable code. A Web developer needs to understand and control multiple languages/environments, and it is not easy to automate the testing of such a heterogeneous system. To help overcome these issues with Web development, various frameworks have been written over the years, always promising to make Web development more productive and less error-prone. A framework is a collection of libraries and utilities that should facilitate the construction of an application. This doesn't have to be a Web application as frameworks exist for any kind of application. Just like not every car is suited for all terrain types, and not everybody has the same taste, there are hundreds of frameworks out there.

There is however one architectural pattern that most user-interface related frameworks implement, and that is the MVC pattern. MVC stands for Model-View-Controller and is basically the separation of these three concerns into three different layers.

*  Model: the information the application works with, the model is usually persisted to a database but that is not necessary
*  View: a representation of the model, multiple views are possible for one model, in fact that is one of the benefits of using an MVC pattern. In a Web application this is usually an HTML page but can also be a Flash page or something else
*  Controller: the controller defines what needs to happen on different events, like the user clicking on a button, usually changes one or multiple models and chooses the correct view for the model

 

By separating these concerns into different layers, changes to one of them don't have an impact on the other two layers, resulting in faster development cycles and easier maintenance.

Page (1) 2 3 4 ... 9 »
Printer Friendly Page Send this Story to a Friend Create a PDF from the article
Share The Knowledge

Jobs