Agile Web Development with Rails

Start from the beginning
                                        

validates_acceptance_of :non_disclosure_agreement

validates_uniqueness_of :short_name

end

Developers who cametoRails alsofounda strongphilosophical underpinning. ThedesignofRailswasdrivenby a couple ofkey concepts:DRY and conven-tion over con.guration. DRY stands for Don�ft Repeat Yourself.every piece of knowledgein a system shouldbe expressedinjust oneplace.Rails usesthe powerofRuby tobring thattolife.You�fll .nd very littleduplicationinaRails application; you say what you need to say in one place.a place often sug-gested by the conventions of the MVC architecture.and then move on. For programmers used to other web frameworks, where a simple change to the schema could involve them in half a dozen or more code changes, this was a revelation.

Convention over con.guration is crucial, too. It means that Rails has sensi-bledefaultsforjust about every aspect ofknitting togetheryour application. Followthe conventions, andyou can writeaRailsapplicationusingless code than a typicalJava web application usesinXML con.guration.Ifyou need to override the conventions,Rails makes that easy, too.

Developers coming to Rails found something else, too. Rails is new, and the core team of developers understand the new Web. Rails isn�ft playing catch-up with the new de facto web standards: it�fs helping de.ne them. And Rails

Report erratum

Prepared exclusively for Jordan A. Fowler

RAILS IS AGILE

makes it easy for developers to integrate features such as AJAX and RESTful interfacesintotheir code: supportisbuiltin.(Andifyou�fre notfamilar with AJAX andRESTinterfaces, neverfear.we�fll explain themlater on.)

Developers are worriedaboutdeployment, too.Theyfound that withRailsyou can deploy successive releases of your application to any number of servers with a single command(and roll themback equally easily should the release prove tobe somewhatless thanperfect).

Rails was extracted from a real-world, commercial application. It turns out that the best way to create a framework is to .nd the central themes in a speci.c application and then bottle them up in a generic foundation of code. When you�fre developing your Rails application, you�fre starting with half of a reallygood application alreadyinplace.

But there�fs something else toRails.something that�fshard todescribe.Some-how,itjustfeels right.Of courseyou�fllhaveto take our wordforthat until you write someRails applicationsforyourself(whichshouldbein the next45 minutes or so...).That�fs what thisbookis all about.

1.1 Rails Is Agile

The title of this book is Agile Web Development with Rails. You may be sur-prised to discover that we don�ft have explicit sections on applying agile prac-ticesX,Y, andZ toRails coding.

The reasonisboth simple and subtle.Agilityispart of thefabric ofRails.

Let�fs look at the values expressed in the Agile Manifesto as a set of four pref-erences.1 Agiledevelopmentfavors thefollowing.

.

Individualsandinteractionsoverprocessesand tools

.

Working softwareovercomprehensivedocumentation

.

Customer collaboration over contract negotiation

.

Responding tochangeoverfollowing aplan

Rails is all about individuals and interactions. There are no heavy toolsets, no complex con.gurations, and no elaborateprocesses.There arejust small groups of developers, their favorite editors, and chunks of Ruby code. This leadsto transparency;whatthedevelopersdois re.ectedimmediatelyin what the customer sees.It�fs anintrinsicallyinteractiveprocess.

You've reached the end of published parts.

⏰ Last updated: Mar 22, 2008 ⏰

Add this story to your Library to get notified about new parts!

Agile Web Development with RailsWhere stories live. Discover now