Thursday, January 31, 2008

Building Web Applications with Ruby on Rails

Ruby on Rails has taken the web application community by storm. The Ruby programming language fuses ideas from dynamic, scripting languages with a strong object-oriented framework. Based on the popular Model-View-Controller (MVC) paradigm, Ruby on Rails, also called RoR and just Rails, is a web programming application framework written in Ruby. Rails leverages Ruby's extensive support for metaprogramming, from which it derives much of its elegance and ease of development. Additionally, Rails makes extensive use of code generation features, making it easy to start a complete application and promoting agile programming techniques.

The key design features that make Rails unique in the web application world are "Don't Repeat Yourself" (DRY) and "Convention over Configuration". The DRY principle means that settings, such as database column names, only need to be specified in one place. Rails ensures that these definitions are visible to all the other web components that need them. Similarly, the Convention over Configuration principle means that web developers only need to make explicit the aspects of their web application that are different from others; Rails (and programmers, too) can infer similar aspects from conventions, e.g., naming conventions. This greatly reduces the need to specify meta data aobut your web application in configuration files, largely eliminating the XML metadata bloat that is common in other web frameworks.

Magic of Ajax with Ruby On Rails

Rails Implements Ajax

Rails has a simple, consistent model for how it implements Ajax operations.

Rails has a simple, consistent model for how it implements Ajax operations.

Once the browser has rendered and displayed the initial web page, different user actions cause it to display a new web page (like any traditional web app) or trigger an Ajax operation:

  1. A trigger action occurs. This could be the user clicking on a button or link, the user making changes to the data on a form or in a field, or just a periodic trigger (based on a timer).
  2. Data associated with the trigger (a field or an entire form) is sent asynchronously to an action handler on the server via XMLHttpRequest.
  3. The server-side action handler takes some action (that's why it is an action handler) based on the data, and returns an HTML fragment as its response.
  4. The client-side JavaScript (created automatically by Rails) receives the HTML fragment and uses it to update a specified part of the current page's HTML, often the content of a tag.

An Ajax request to the server can also return any arbitrary data, but I'll talk only about HTML fragments. The real beauty is how easy Rails makes it to implement all of this in your web application.


The 7 Habits of Highly Effective Web 2.0 websites

Steven Covey, author of “The 7 Habits of Highly Effective People” identified principals which also apply to modern Web 2.0 websites.

Highlights and Site Examples include:
  1. • Your customer is the boss- how your website can listen better
  2. • Start and update your website with your goals in mind
  3. • Balance user experiences with site goals
  4. • Deliver Value back to your web visitors
  5. • Be honest-examine and evaluate what doesn’t work
  6. • Web 2.0- Create an ongoing dialog and community with your customers
  7. • Sharpen your website’s saw- renewal techniques that work

Tuesday, January 29, 2008

Exciting world of programming with Ruby On Rails

Dream with Ruby On Rails

Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. From the Ajax in the view, to the request and response in the controller, to the domain model wrapping the database, Rails gives you a pure-Ruby development environment. To go live, all you need to add is a database and a web server.

Already Catched with Ruby On Rails

Everyone from startups to non-profits to enterprise organizations are using Rails. Rails is all about infrastructure, so it's a great fit for practically any type of web application Be it software for collaboration, community, e-commerce, content management, statistics, management, you name it. Examples: