Agile Web Development with Rails – An Overview

Agile web development is a model for development of web applications. It is more efficient and powerful for a short timeline than other models. It incorporates face-to-face communication, and considers technical personnel as well as customers as part of the team. Agile web development uses project managers and business analysts, and emphasizes clear goals, planning and iterative delivery. Agile web development ensures the successful completion of a product at the end of each iteration. The Agile web development model follows planning, requirement analysis, designing, coding, testing and documentation during development. Successful interaction increases success of the application because of the focus on customer involvement. This decreases problems that come with the development team changing the product in a late stage due to changes in requirements. Instead, both the development team and the customers are informed, therefore customer confidence remains high and there are minimal delays.  All tasks are performed at a previously specified period, with just enough documentation to be effective.

Rails is an open source web application framework for the Ruby programming language. It is intended to be used with an Agile development methodology, and is often utilized by web developers for its suitability for short, client-driven projects.

Ruby on Rails is a framework that makes it easier to develop, deploy and maintain web applications. Soon after its initial release, Rails went from being an unfamiliar tool to being a wide-reaching phenomenon. It has become the framework of choice for the implementation of a wide range of Web 2.0 applications as it is both simple and subtle.

Integrating Flex and Rails

Since the release of Flex, large numbers of developers have been attracted to the idea of creating powerful web applications that integrate Flex and RoR. Previously we reviewed such applications successfully integrating Flex and RoR, and today we will discuss a new technology that marries Flex with RoR applications by providing a means of automating the communication between client and server.

The technology we will use for integration is “WebORB for Rails.” It is a free and open source (GPL) server made available by Midnight Coders.

Most of the articles available online are about integrating Flex clients with Rails using raw XML over HTTP. This level of integration is simple for the sake of a tutorial but soon it becomes bulky as the application grows more complicated. With each new operation on the server, a developer must spend valuable cycles serializing and deserializing requests and responses.

WebORB relieves the burden of this “serialization tax” by supporting the concept of remote objects, where Flex users can natively invoke methods on the server and retrieve the responses all within ActionScript, the object-oriented programming language used by Flex.

First of all we need to install WebORB for Rails. WebORB runs as a plug-in for Rails and is installed by simply running this command within the root directory of a Rails application on Windows:

ruby script/plugin install
http://themidnightcoders.net:8089/svn/weborb/

After Installation we need to write an Application Using WebORB. The steps that are required to build a Flex-based RIA utilizing Rails are.

  • Building the service class and drop into RAILS_APP/app/services
  • Adding an entry to RAILS_APP/config/WEB-INF/flex/remoting-config.xml for the remote service
  • Setting up a RemoteObject on the client-side using Flex that will communicate directly with the back-end service

Building Ecommerce Applications with Rails

E-Commerce is the buying and selling of products over the internet. Electronic commerce can either be Business to Business (B2B) or Business to Consumer (B2C), which is also known as e-tail or e-tailing. According to Wikipedia,

Modern electronic commerce typically uses the World Wide Web at least at some point in the transaction’s lifecycle, although it can encompass a wider range of technologies such as e-mail as well. A large percentage of electronic commerce is conducted entirely electronically for virtual items such as access to premium content on a website, but most electronic commerce involves the transportation of physical items in some way. Online retailers are sometimes known as e-tailers and online retail is sometimes known as e-tail. Almost all big retailers have electronic commerce presence on the World Wide Web.

E-tailing has never been easy for businesses. They have been presented with challenges like improving their services, data security, transaction security, electronic data interchange, internet marketing, supply chain management, inventory management, security, electronic funds transfer and much more.