CSC/ECE 517 Fall 2013/ch1 1w39 as

From Expertiza_Wiki
Revision as of 02:00, 7 October 2013 by Sayenga (talk | contribs)
Jump to navigation Jump to search

This article focuses on how Rails enables ‘’’agile development practices’ and the characteristics of Rails that support specific agile methodologies.

Template:TOC limit

Agile development

What is it?

Agile development is a methodology where requirements and solutions are developed based on iterative and incremental development<ref>http://en.wikipedia.org/wiki/Iterative_and_incremental_development</ref> through collaboration between self-organizing, cross-functional teams. Using agile development methodology, a high quality software can be developed by programmers in a minimal amount of time.

Some of the process under agile development includes adaptive planning, evolutionary development and delivery, a time-boxed iterative approach, and encourages rapid and flexible response to change. It is a conceptual framework that promotes foreseen interactions throughout the development cycle.















How Rails supports Agile Methodologies

* Generators help you setup a wireframe fast

    • The command “rails generate” uses templates to create models, controllers, views, databases, etc which helps to setup a test application.
    • The scaffolding can be easily done to deploy any basic web -application, and developers can extend them to implement their functionalities. This overcomes the initial hurdle.

*Ready Setup for Multi-environment

    • Rails application provides development, production and testing environments with built-in configurations setup and thus is a huge time saver for an application which is required to be deployed in multiple environments.
    • The built-in rails web-server has the development environment as the default environment.
    • Simple deployment allows developers to have face-face client meetings and thus make instantaneous changes based on the client requirements.

*Test-Driven Development

    • Built in mocking and stubbing frameworks are available which assists “how to write code”. This follows a red, green and refactor which is an important aspect of agile development.
    • RSpec is one of the famous testing framework tools used with rails.
    • Other testing tools can also be swapped in.

*Dependency Management

    • Rails acts more than a web framework by providing the necessary utility and support tools and adding dependencies to individual projects in a jiffy using the “bundler”.
    • This bundler installs all the relevant gem files and also can be updated when more dependencies are added. No need to search for packages or jars.

*Responding to Change

    • Rails helps you to keep easy track of database changes with the help of Migration Objects. It gives the flexibility to rollback and update.
    • It also allows you to maintain various versions of database for the multi-environment. On running rake db::migrate, the desired database is migrated and deployed with the working rails server.
    • New technologies such as Coffeescript can also be easily embedded by installing the relevant gems thus adapting to the changing technology.

*Assets Pipeline

    • The assets pipeline is a new feature embedded in rails ( which is now extracted into sprockets-rails gem), concatenates and compresses javascript and css files.
    • This renders a web page with reduced number of requests from the browser as files are grouped and whitespaces are trimmed.
    • Precompiled files can also be attached.

*Don’t Repeat Yourself (DRY)

    • Repeated code is written in helpers and libraries, making a single destination and thus updations become simpler by updating at just one place.
    • Partials are a way of rendering repeated HTML code. Rails understand a file which starts with an underscore, say, _partial.html as a partial to be included in the shared html file which renders it.

References

<references/>