I love rails. I love that I can sit do and just sweep through the model layer, building out all that abstraction for an applicaiton within a couple hours at most. Likewise with the view layer, using the prebuilt urls (new,create,show,edit...). Reusing partials throughout, so I can take a static site and use some of the partials to build a dynamic one. It's fucking beautiful.
That said, when I first got into Scrum and was looking out building stories within the rails framework, it occurred to me that a lot of what made rails fast for development didn't exactly work for how I was writing stories. So I had two choices - change how I developed in rails, or changed how I wrote stories.
Well, it was obviously not going to be the first, so I changed the second. The main change wasn't so much the stories themselves, but the expectations that followed teh stories.
For example: "User can save a new contact." Off the cuff, this sounds like it would require a build from the model to the view layer, especially if the contact form was actually a lightbox or some pop-out, which would require some JS/CSS magic. Rails exposes that this may be a too big of story, or maybe that I need more backlog items in order to actually cover it.
Here's what I built instead:
- A new contact can be saved.
- A user can save a contact through a webform.
- Webform is integrated into the dashboard and a user can save there dynamically.
How the last two make sense as added features and they fit with my eulogy to rails above. First I build a form using the standard new template, then I render that as a partial once I get to dashboard integration. In this situation, I can do tests against the form, and leave all the work of the final feature to template/visual work rather than submission/controller work.
Finally, the first feature, segregates the model work to its own feature. A great way to confirm this functionality is to lean on the Unit test system that comes with rails. Now I could theoretically put all of my model tasks into one sprint and have verification of my feature, with the additional benefit of always having the ability to easily do regression testing.
Clients may not find this as sexy, but I think most folks get that setting up saving is the first step in building an application and the UI comes next, even if all you have to show (if required) is the console confirming save and data retrieval.
Saturday, July 20, 2013