RailsConf 2009 Notes
Tuesday 05/12/2009 – Category: Uncategorized
Can someone smell stale blog? It's been busy on this side and I haven't had any blogworthy material for awhile...until now.
I had the opportunity to go to RailsConf last week in Las Vegas. A lot of smart people, an overwhelming array of Apple products and geeky shirts, and tons of nerdy sessions.
Here are some brief notes from the conference:
jQuery on Rails
- good review of basic jquery selectors and more advanced DOM selectors like siblings(), nextall(), find(), filter()
- .live() can bind events after elements are added (new with jQuery 1.3)
- http://plugins.jquery.com/project/metadata/
-
<div data="{some: 'data'}"> -
$("div").metadata().some // returns 'data' - Rails 3 will implement unobtrusive js
Rack
- Rack is a generic interface for Ruby and Ruby frameworks
- provides a standard interface for creating middleware that gets run going down the stack
- sample basic Rack: http://gist.github.com/110847
- use case: progressive caching - middleware that holds a session and allows cached page to dynamically load personalized content
- use case: Twitter "embiggener" - a middleware that Twitter could use to replace all tinyurls with full urls
- http://assets.en.oreilly.com/1/event/24/And the Greatest of These Is ___ Rack Support Presentation.pdf
Sinatra
- Sinatra is a DSL (domain specific language) built on top of Rack for creating web apps in Ruby
- not an MVC architecture. routes are matched directly in the file and execute the enclosing block
- templates can be haml, erb, inline, or in-file
- gives a basic environment for app development without the whole stack
- sample: http://github.com/jzting/flickr_original_sinatra/blob/efbf3e195a242dba04c22491569e51caa12eed77/flickr_sinatra.rb
Rails 3 - some new features
- XSS protection: auto-escaped by default
- use <%=raw %> to force raw
- UJS finally!
- html5 style data-foo attributes so will validate but can also be accessed by any JS library
- cleaner router
UI fundamentals for programmers
- terseness is not a value for ui design. need explanation!
- "from the customer's point of view, the UI is the entire application"
- separate screens into REST-named conventions (new/index/show/edit)
- focus on the inside-out, content that matters first!
- "we should really have a weak tag" when applying least effective difference principle
- don't be clever by extracting html into helpers--things can change and need flexibility
- separate CSS and JS for separate actions
JS testing
- it is possible!
- http://github.com/relevance/blue-ridge/tree/master provides a set of tools for rspec-style unit testing
Chris Wanstrath (github) keynote
- focus on writing and releasing code, not on trying to become a "rock star" or "ninja"
- find a need and fulfill it, reduce friction
- https://gist.github.com/0a2655aed6a26fa15a02
Twitter on Rails
- TwitterAuth plugin makes it really easy to use the oauth in your application for SSO functionality
- speaker livecoded this: http://twisteners.heroku.com/users/jzting
JRuby on Google App Engine
- it's possible! takes quite a bit of footwork to set up though.
- limitations: no sockets, writing to filesystem, must use Google's DB system
- worth keeping an eye on in the future as a deployment option
Mountable apps in Rails 3
- will enable multiple apps that can share functionality
- a more versatile pluggable architecture (think Drupal/Wordpress-like plugins)
- example: an auth component that can be used as a SSO gatekeeper across different components (blog, admin section, etc)
Compass
- a CSS meta-framework that uses haml and sass
- can integrate popular frameworks like 960, YUI, Blueprint
- can create reusable mixins, constants
- export as expanded, compact, or compressed
- http://wiki.github.com/chriseppstein/compass
MacRuby
- a version of Ruby 1.9 that runs on top of Mac OS core frameworks
- Ruby types are ported to their Cocoa equivalent: string = NSString, array = NSArray, etc...
- so you can use Cocoa methods in addition to Ruby methods
- you can use Interface Builder like normal and use Ruby classes to power the interface
One Response to “RailsConf 2009 Notes”
Leave a Reply
Recent Posts
- Good Word - now with definitions!
(Friday 03/5/2010 – 2 Comments) - Good Word - Words With Friends Word Checker
(Thursday 02/25/2010 – 31 Comments) - Facebook App Development gotchas
(Friday 02/19/2010 – No Comments) - StoreKit SKErrorUnknown
(Friday 02/19/2010 – 1 Comment)

February 5th, 2010 at 1:54 am
[...] Jason Ting’s RailsConf 2009 Notes includes some basic notes about Rails 3 [...]