12 Takeaways from RailsConf 2007 Sessions

May 21 by Andre
  1. Streamlined's use of separate UI classes is a great way to describe how the scaffolding it creates should behave. This is the best solution to the problem I've seen so far.

  2. Play with helpers in script/console: helper.methods.grep /tag/

  3. I plan on making a small suite of highest-level tests for all my apps with Selenium. Selenium tests should encompass relatively long sequences of user actions. Pro: can test the full stack, including Ajax. Con: slow and relatively brittle. Rule off thumb: convert to integration tests whenever you can.

  4. Orthedoxy means teaching right; othopraxy means doing right. Dig it.

  5. Take advantage of what Rails' REST implementation gives you, but don't be dogmatic about REST principles. I will continue to add verbs to my controllers when it is pragmatic to do so, use cookies for authentication, and use server-side sessions for maintenance of state.

  6. A valuable notion: URL's can be considered part of your user interface. Don't let Rails dictate how your URL's should look if it's not best for our users.

    • In a conversation afterwards, Richard White brought up a great counterpoint: sometimes we should choose a UI according to what's best for the community of users as a whole, rather than what is best for individual users.
  7. Adam Key's Rails Spelunking Recipe: 1) start with routes. look at your url, use routes to figure out where you are; 2) check out the controller or skip directly to the view; 4) grok any controller filters; 5) grok the controller action; 6) grok any methods the action calls; 7) check the template and any helpers it might use

  8. Remember that we're simply running code as we're defining a class . . . you can define a method and call the method all within the definition of the class. Thanks to James Adams for a great presentation on developing plugins.

  9. The !! idiom is generally unnecessary. Not to mention alarmist looking.

  10. Go check out Hampton Caitlin's make_resourceful plugin. Can't wait to try it out, it will 1) make your RESTful controllers shorter and DRYer, and your xml/JSON/whatever representations easier to produce.

  11. Simile is an Javascript widget for time-based data. Think Google Maps for timelines.

  12. Solr rocks for full-text search. You can add multiple facets to your search (think: searching on EBay, and getting counts for each of the categories in which hits occur), get highlight, spell checking, and more. Loot at solr-ruby, acts_as_solr, and Flare as well. Thanks Erik Hatcher for an extremely useful presentation.

Post a comment

 
This is so filters can reject the spam-bots. Thanks!