<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Self As Team &#187; web</title>
	<atom:link href="http://blog.intraspectivecorp.com/tag/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.intraspectivecorp.com</link>
	<description>Dallas based Ruby on Rails and Java Consulting</description>
	<lastBuildDate>Mon, 21 Sep 2009 02:06:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Boost Team Productivity and Consistency By Developing and Using Rails Generators</title>
		<link>http://blog.intraspectivecorp.com/2008/03/01/boost-team-productivity-and-consistency-by-developing-and-using-rails-generators/</link>
		<comments>http://blog.intraspectivecorp.com/2008/03/01/boost-team-productivity-and-consistency-by-developing-and-using-rails-generators/#comments</comments>
		<pubDate>Sat, 01 Mar 2008 20:00:54 +0000</pubDate>
		<dc:creator>David Hainlin</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[intranet]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.intraspectivecorp.com/rails/boost-team-productivity-and-consistency-by-developing-and-using-rails-generators/</guid>
		<description><![CDATA[If you have worked with Ruby on Rails for any time at all, you are very comfortable with the speed at which you can create an application or prototype. Using scaffold generators and by following the conventions of rails, you can easily get started on a prototype app in a few minutes.  As you start [...]]]></description>
			<content:encoded><![CDATA[<p>If you have worked with Ruby on Rails for any time at all, you are very comfortable with the speed at which you can create an application or prototype. Using scaffold generators and by following the conventions of rails, you can easily get started on a prototype app in a few minutes.  As you start to incorporate your client&#8217;s styling, menus or other markup/design aspects the power of generators and scaffolds seems to diminished.  If you find yourself in a position of creating the same menu or stylistic elements over and over for multiple sites, you should consider packaging them generically as a generator gem.</p>
<p>In some recent projects, we were creating sites with a consistent  &#8216;intranet&#8217; look and feel (mandated by the client&#8217;s web guidelines).  Doing this each time was a pain because of the need to rework the style sheets, layouts and copy in css images. Lots of  moving parts and hard for the some of the less experienced team members to get right without lots of help. I kept thinking, it would be great if there was some way to generate the boilerplate web menus for our apps so you can get up and running in minutes.  This is where taking a little time to create a generator and package it as an internal gem that each team member can install and use.</p>
<p><span id="more-9"></span> You have all used generators (scaffold, migration, model, etc&#8230;) in your rails projects. A generator is run from your project root directory and it builds or modifies your files to do something useful.  I&#8217;m a big fan of Ryan Bate&#8217;s nifty generators so I adopted that as the basis for incorporating the intranet styled menus I needed. This took some experimentation to get right but pretty soon I had a repeatable generator that mostly copied in images and tweaked the application.html.erb layout. To make this extendable, I developed a simplified menu approach driven from a single yml file.  In a future post, I&#8217;ll post more details about how this worked if there is interest.</p>
<p>The generator started life as a simple plugin to and was later converted easily into a gem.  The nice thing about rails is any gem that is a generator will automatically be available to you via script/generate.  I placed this gem on our team site with instructions and we all added it to our gem repositories.</p>
<p>Now if you wanted to quickly set up your new rails app to look like a real intranet page (for this client), you simply ran the generator in your new rails project and tweaked the config/menu.yml file.  This was great for prototyping or brainstorming in a meeting with customers.  From new rails app to internal app in seconds.</p>
<p>We used this gem to retrofit older apps into the desired look and feel and used it on several new apps and prototypes.  The team was digging it but a bigger buzz was created after I put together a screencast demonstrating how easy it was to use.  The rapid development ability of rails was lost on them until we added the ability to rapidly make stock apps look like their &#8216;client intranet&#8217; apps.  We adopted this approach to generate different layouts so we could evaluate a site in one of three different &#8216;themes&#8217;.  Note, these themes were quite different and involved much more than simple css changes.  The genetators made this very easy to experiment with.</p>
<p>There are quite a few limitations to what a generator can and cannot do but that is what make them so easy to work with for tasks like this.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.intraspectivecorp.com/2008/03/01/boost-team-productivity-and-consistency-by-developing-and-using-rails-generators/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
