Ruby on Rails 1.2 has been released. In the announcement, David writes about the new features he announced at the RailsConf in July. Don't miss the video of his talk (the slides are here).

The main points of the talk:

  • what is REST and why it is good,
  • how implementing REST is available in Rails,
  • what is CRUD, how CRUD helps in designing your model (in a MVC application),
  • using mimes types, and content negociation, a powerful feature of HTTP, in Rails for an unified set of set of URLs,
  • how to access to REST web services using ActiveResource

I'm just glad that development tools improve to simplify REST-enabled and content negociation-enabled applications.

I'm already using theese HTTP features in my Météo Mobile application developed in PHP :

  • /meteo/bna/06 uses content negociation (examinates Accept header) to serve the most appropriate content type
  • /meteo/bna/06.html serves XHTML as text/html
  • /meteo/bna/06.xhtml serves XHTML as application/xhtml+xml
  • /meteo/bna/06.wml serves WML as text/vnd.wap.wml for mobile devices

For those that would like to implement content negociation in PHP, the main tip is to capture 406 errors to be able to serve content to (mobile) browsers that do not accept */* in Accept:.