Meet the robinsons ending song

Meet the robinsons ending song

Existing attempts have failed to achieve wide adoption because the y have tried to handle controllers, views, and models all at once Instead, I think a more limited, controller-only approach could work better. The first is already in wide use: Sinatra. Sinatra is arguably the most widely replicated Ruby web framework, having inspired implementations in, Clojure, PHP, Scala, and many o the r languages. Part of the problem with writing a routing API is finding a way to describe multiple URLs in a single string. This problem is solved if you handle each URL on its own. The res no middle routing layer with arbitrary action names. HTTP method and URL are all you need but handlers can filter on the user meet the robinsons ending song or o the r header information. Thanks to Rack, Sinatra apps can be embedded in Rails applications. Or, Carl Lerche is writing a Rails 3 plugin that provides this syntax to Rails controllers Jamis Buck introduced an implementation of REST as a plugin four years ago. Yet unlike o the r areas of Rails that have seen massive improvements, Rails implementation of REST is basically the same as it was in Rails A halfway approach could combine elements of the Rails 3 router syntax with the class method style of configuration thats already familiar to Rails developers. Class method and HTTP-style methods. class ReportsController AppController beforefilter:au the nticate resource/api/v1/reports/:id get :collection do end get :member do id end put :member do id end end Variations on this syntax could easily accomodate nested resources, singleton resources, or o the r custom URL schemes. For several years, Rails has charged forward and defined new, innovative syntaxes for writing web applications. Its time for it to happen again. An improved meet the robinsons ending song could get rid of stale controller actions, reduce confusion, reduce duplication, and improve the way we think about solving technical problems with web applications. I think the mere fact that a controller can be generated means that code shouldnt be the re. The res no intelligence in code that can be generated from a single resource name. you have a lot more room to raise the abstraction level and start getting declarative. I think making the controller more declarative is probably the end goal. Instead of the bulk of each action being an imperative mess, the controller can be heavier on the class-level configuration thats really proven itself in the model associations, scopes, plugin configuration, etc. class-level configuration directive in Merb/Rails 3 is a signal that controllers can head in this direction. Thoughts and reactions? Reply to topfunky on Twitter, write a blog post of your own, or comment at Hacker News. Video of Reg Braithwaite at RubyFringe. Quote is about 15:30 in. The original version by David Heinemeier Hansson, the n by Ulysses, the n by Koz and Jamis Buck toge the r, and most recently by Yehuda Katz, Josh Peek, and the Rails 3 team. Sample controller code.

  1. No comments yet.
  1. No trackbacks yet.

Leave a comment