Notes from Jonathan Linowe's presentations at NHRuby, 15-Jan-2009

Ted Roche tedroche at tedroche.com
Sun Jan 18 14:31:20 EST 2009


Jonathan Linowes[1] was kind enough to drive from "the other side of the
Notch" all the way down to the seacoast to present to the New Hampshire
Ruby Group[2] on the 15th of January (note that the NH Ruby group has
moved their regularly scheduled meetings to the third Thursday of the
month). Fourteen members attended the meeting, which started with a
round of introductions. Pizza, soda and T-shirts were provided courtesy
of EngineYard[3] -- thanks!

A typical scene at a Linux user group meeting for the first ten minutes
of a meeting to be consumed with the speaker struggling to get his X
windows display to sync up with the projector. I'm beginning to suspect
that the Ruby group equivalent is for the speaker to discover he's
packed the wrong DVI-mini-DVI-HDMI-Video-VGA adapter and no one else has
the right video adapter for his MacBook despite a half-dozen machines
present. I wonder if Apple made a mistake by changing this adapter in
every model.

ReviewRamp[4] is Jonathan's current project - a SaaS web site for a
group to bring in documents, route them through their own defined
process, and approve/disapprove/select documents. Jonathan offered
examples such as business plan reviews, marketing plans and job
applications. Designed to look as much like a desktop application as
possible, ReviewRamp has a simple GUI, with templates and wizards to
make it a couple of clicks to process. Under the hood, Jonathan talked
about the architecture, which includes RESTful protocols, and a design
intended to scale to thousands of projects, hundreds of submissions and
a handful of reviewers per project. Unlike many JavaScript-only sites,
RevewRamp works well with JavaScript disabled; sweetened with JavaScript
enabled. ReviewRamp is publicly in beta. Jonathan presented some slides
of the models: reviewers, projects, pages, subpages, fieldsets. This
last was a segue into the 3rd presentation: fields are generated via
metadata for each project, but the database tables don't change for each
project, so each project has virtual tables vis Jonathan's DynamicTable
design.

Next, Jonathan had a presentation on "Cucumber: How I Slice It"[5]
Jonathan had worked PHP and other languages before, was very attracted
by Ruby as a new language and the philosophy of testing, testing and
more testing. Unit-testing, test-driven-design, behaviour-driven-design.
Jonathan also pointed us to Brandon Keepers presentation[6] as an
excellent starting point.

Jonathan showed us some of his Cucumber scripts, which include a lot of
pretty cool extensions to the base, like {show me} to actually end a
test by launching a browser so he could visually verify a result. It was
apparent that Jonathan really took to the testing regime, adding
extensions like "He" or "She" instead of always including "The current
logged in user" or "the current project" to make the scripts read far
more like a specification.

Should you use RSpec or Cucumber? Both, according to Jonathan: each has
strengths and weaknesses. RSpec is more tuned to unit-test individual
functions where Cucumber is more tuned to describing behavior and outcomes.

Check out <pre>cap deploy:features</pre> to run Cucumber on the deployed
app (typically, you'd do this on a staging server, not a production server)

Jonathan showed some example Cucumber scripts. They describe in English
the point of the test, and use keywords ("GIVEN" "WHEN" "{actorname}"),
an action and an expected result. This is actually parsable Ruby code
that defines fixtures and features and processes defined within the
story runner. It's not just a requirement, it's actually the test as well!

Finally, running out of time, Jonathan jumped into his DynamicRecord[7]
presentation, where he had developed a method that was ActiveRecord
compatible so that it could be integrated in the rest of a standard
rails app, but actually queried against virtual tables that were created
on the fly rather than actual tables on disk. Interesting stuff, and I'm
looking forward to seeing this code pushed into OpenSource, Jonathan's
eventual goal.

Thanks to Jonathan for the great presentations, to Nick for running the
presentation, to Tim for hosting the facilities and attempting to
webcast the presentation, to Engine Yard for the pizza and T-shirts, and
to all the members who made it to the meeting!

You can download the 3 presentations from the NHRuby site in OpenOffice
format here:

ReviewRamp:
http://http://nhruby.org/assets/2009/01/15/Linowes-ReviewRamp.odp,
Cucumber: http://nhruby.org/assets/2009/01/15/Linowes-Cucumber.odp,
DynamicRecord: http://nhruby.org/assets/2009/01/15/Linowes-DynamicRecord.odp

or view them online (Flash/JavaScript required) at
http://www.nhruby.org/2009/1/16/reviewramp-cucumber-and-dynamicrecord

[1] http://www.parkerhill.com/about.html
[2] http://www.nhruby.org/
[3] http://www.engineyard.com/
[4] http://www.reviewramp.com
[5]
http://www.slideshare.net/linoj/cucumber-how-i-slice-it-presentation-924254
[6]
http://www.slideshare.net/bkeepers/behavior-driven-development-with-cucumber-presentation
[7] http://nhruby.org/assets/2009/01/15/Linowes-DynamicRecord.odp

-- 

Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com


More information about the gnhlug-discuss mailing list