Sunday, May 20, 2007

railsconf 2007 so far

no digicam photos developed yet.

here's notes i was taking at sessions, and a few interesting links i start collecting:
railsconf 2007 presentation slides

pastie for ror snippets

the railsway webpage/blog

and a guide to testing the rails
and few others, of course.

Intro to Test-Driven Development for Rails ¶
Ruby ¶

* User Stories
* Customer Acceptance Tests
* Test Driven Development
* Refactoring
* Pair Programming
* Demo/Exercise
o demo:
o excercise to do:
o exercise answer sample:
* Tools: Test::Unit, RSpec, Flexmock, Mocha

Rails ¶

* Demo/Exercise : was out of time

Full-stack Web App Testing with Selenium and Rails ¶

* kind: selenium on rails, selenium rc(remote control, for ui testing via http)
* pivotal lab doing presentation
* about 1/2 the room uses selenium now, of a coulpe hundreds folks in the room.
* selenium rc features
o runs in the browser, executes app in frame, use javascript, goes all the way to the server and back, complementary to jsunit, cross-platform testing in a single test run
o ex: ==> rake selenium:test
o ... it runs, checking servers, time, schema, and building testcases ...
o demo via web, http://localhost:4000/selenium-server/core/... captured via digicam
* selenium rc architecture: launch
* selenium rc architecture: run test
* os/browser: win, linux, mac and firefox, ie and safari
* slow-lenium: you can run fast and slow suite
* gotchas: disable transactional fixtures, reload fixtures before every run, ...
* Q&A
o only 1 QA?
o => still prefers selenium rc, for cross platform browser driven testing
o what kind of tests?
o => integration, acceptance, ui, smoke tests

Taking Rails Tests to the Next Level ¶

* Q&A or BOF style. no notes.

Adding Tests to Legacy Rails Apps ¶

* test coding: write app, write test, run test, refactor test, run test, write more app
* run: rake and/or individually with 'ruby test.rb'
* rake stat vs. rcov
* autotest: because sometimes our tests can run themselves
* continuous integration
* fixtures: ugliness, ar_fixtures, use mocks, fixture senarios
* zentest: controller & model tests, more (useful) assertions
* focus on the bugs (don't write test for test's sake)

Heckle: Take Your Tests' Lunch Money (combined with Adding Tests to Legacy Rails Apps) ¶

* mutation tester : quotes from sneakers movie, something like 'break in to make sure the pace isn't break-in-able'
* like pen-testing/fuzzing
* how's it fit into the testing stack?
* "RSpec/Test::Unit is your safety belt. RCov is your airbag. Heckle is your helmet, neck brace and full fireproof suit."
* use Heckle to do the fire-proof kind of test, after basic unit, functional and integration tests are done.

Fixtures: Friend or Foe ¶

* yml files
* example of convulated fixtures,
* fixtures :listings, :address, ...
* quotes of many 'i hate fixutres'... : complexity!
* grievances: namespacing, brittleness, validation, contamination
* workaround:
o use activerecord, helper methods -- solve validation problem. but not all the problems
o go mock- and stub-crazy -- straight to method. no data mining, manipulation. other problems
o in-memory database
o transactional fixtures -- ex) self.use_transactional_fixtures = true
o preload all fixtures (from Rails Edge)
* my solution:
o ->fixtureScenarios
o ->testing your scenarios

+- test/

* -> cleans up after itself
* -> backwards compatible


* can fixtures be loaded in specific order?
* => not yet. patch's in to fix this.(in terms of foreign key). as for scenario loads in run time it's from root down on the tree, rails_root->test->scenario->...
* =>rake supports, as is. rake test:scenarios, rake

* revisit grievances
o check namespacing, brittleness, validation, contamination, and performace gets yellow flag instead of green flag like others.


* reference/contact
o (blog)

Sat Keynotes: Bring Ruby to the Enterprise. Not the Other Way 'Round
Cyndi Mitchell

enterprise (good & bad) continue to move to ror


Sat Keynotes
Tim Bray

how many from startup? about 1/2, how many from large/non-startup? about 1/2, how many service providers and consultants? less

how many migrate from java? largest, how many migrated from microsoft env? 2nd large, how many migrate from php? about 3rd large.

oreilly's booksale chart: java, ..., ... (photo taken), from last night's keynote

sun's hardware & approach

some of his experiences, in business consulting for sun

-> java will never go away, php will never go away. thus, what about integration between these different languages/platforms with ror?

his solution -->java: platform, language, ..., thus, jvm can run java, ruby, javascript, php and others...?

a good practice: REST

web architectural references:
=>architectural styles and the design of network-based software architectures by roy fielding, thesis

example of MS webcam ad.
ad says '1 touch blogging', if on MS's blog, not everybody's on it
-> atom publishing protocol

conventional wisdom:
java: compute performance, tooling
php: web scaling, ease of use
rails: time to market, maintainability

Is Ruby Ready for Corporate IT? and Behind Mingle: ThoughtWorks Studio's Collaborative Project Management Tool ¶

* mingle demo. no notes.

Big Stinky Piles (of Data) ¶

* mingle's edloan product related. usage of rftp demo. no notes.

RESTful Modeling with ActiveRecord ¶

* RESTful
* Modeling
* ActiveRecord?
* Vonnage was facing a software problem, identified SOA as architecture of choice and improved hardware scaling and development scaling
* Solutions We Found
o -> text over HTTP, forget SOAP, we like to be dirty, allowing for diverse development and implementation, use right tool for the right job, not the tool everyone else is using
o ->rails for rapid prototyping of applications
o 2 components required: backend and frontend
* RestResource? Summary
* Rest Resource serves as the back end or service solution
* maps a RESTful interface on top of ActiveRecord? objects
* exploits ActiveRecord? model relationships
* XML Examples
o ==> XML example for rendering
o demo:
* post game highlights:
o simple protocol, simple application, DRY, ...
o open source
* resources du jour