论坛首页 编程语言技术论坛

2011 RailsConf 回述

浏览 3070 次
精华帖 (0) :: 良好帖 (6) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2011-05-23   最后修改:2011-06-03

 

这周去了巴尔的摩的RailsConf, 感觉收获很大。本来打算写出来之后翻译成中文在贴过来,但最近比较忙没时间。 想大家看我写的简单英文应该没什么问题的。。还有就是我不是科班出身很多词不知到怎么翻译。 有问题请尽管问,我可以尽所能回答。

--------

 

 

Day 1 of RailsConf is the day of tutorials

 

I attended the HTML5 session by @subelsky in the morning and learned a bunch. Like everybody else, I have heard about the HTML5 buzz for a while, but never got deeper into it than scratching the surface. The session ran in the form of 13 labs, and drawing, sockets, native storage, and of course native media support are the highlights. In fac you can do many cools things with just html5 now.. such as this game. The presenter did a great job packaging the material as a series of easy to follow labs. You can get them here and follow it. It will all just take a couple of hours. 

 

I went to "Building Bulletproof Views" in the afternoon by the LivingSocial guys.. Solid presentation and I learned quite a lot.. I tend to agree with them that the rails view layer is wild west and is probably the least organized part of the framework, and I didn't see much "best practices" before on this layer - good work that they put this together. Interestingly, I found half of the issues are made really easy with using an authorizing framework like Compass. They also talked about some tools like formastic, goose (a gem for tab navigations), responsive design and the mobile web. Presentation is here

Also, the Envy Labs guys gave sessions on Rails for Zombies (beginner's course to Ruby on Rails) and Rails Best Practices. Check them out. 

 

Finally, IgniteRails is awesome! @drnic is hilarious

 

 

Day 2:

 

 

@dhh gave the keynote in the morning to unveil Rails 3.1 RC - asset pipeline, jQuery default, native CoffeeScript + Sass support and all. No big architectural changes but solid steps to make Rails more organized. He also hinted that pjax and backbone.jscould be there in Rails 3.2 (presentation layer MVC is a recurring topic this year).

 

Jeff Casimir / @j3 gave a very nice session on "Fat Models aren't enough", where he talked about better organization of code in the models, the presenter pattern (don't just pass a bunch of instance variables into the view, pack them up in a presenter class), scopes (or the no need of ) with lots of code snippets. Presentation here

 

Another session that I found really good is "Confident Code" by Avdi Grimm / @avdi. Presentation here. He talked about the Nil objects being over used in Ruby is so true. The idea of killing all nil in the code is refreshing (therefore eliminating all the checking).  I'll certainly incorporate that in my code.

 

Eric Ries, the godfather of the "lean startup" movement gave the evening keynote. I've seen him speak before, but it makes me think every time. If you are into building a software product start up, his work is a must read. Video is here

 

 

 

Day 3: 

 

Dr. Nic  @drnic 's opened up the morning keynote to talk about Ruby's history, but it's really from Engine Yard to get folks to use JRuby and Rubinius.

 

Aaron Patterson / @tenderlove (only person in both Ruby core team and Rails core team) gave an "Intense" keynote - you have to see it to know what's in it - it's definitely more than you think. :-) He dived into some under the hood stuff in Rails 3.1 improvements  - prepared statement caching, new serialization strategies, streaming response, reduced middleware stack. 

 

The "Controlled Choas" session is a case study of NASA transitioning from legacy system (yes, Java is now considered Legacy now!!). The reasons behind the switch are 1) they want a easier interface (SOAP to REST) and 2) They started to lose developers because nobody wanted to work on old technologies. They switched to JRuby to make use of the JVM. The result: happy developers, team moving much faster, much more maintainable code base. 

 

The two BoF sessions I went to were awesome -

 

Ryan Bates / @rbates (of the Railscast fame) led a walkthrough on the Cancan gem 2.0 version (for role based authorizations). It's still under development.. but is a huge step over 1.0. I have actually evaluated Cancan for one of my projects but found it somewhat limited on the finer level of controls. 2.0 would change that - I like where this project is going. 

 

Yehuda Katz / @wycats gave a presentation on SproutCore. This is one of the things coming up that I am really excited to dig into (the other is the Ruby EventMachine). It has matured much from when I looked at it last time - for one.. there's online documentation now! I think desktop like web applications are the way to go, and it's really cool to have a framework like SproutCore to make things easier. There was a heated discussion on SproutCore vs Backbone.js and Yehuda's message was: SproutCore has everything Backbone (mostly observers) has and more, and the argument that SC is too big is not so important in the bigger scheme of things. 

 

 

Day 4: 

 

 

Keynotes of Day 4 were some of the best:  Check out Corey Haines keynote here on becoming awesome. and if you are a manager and claims that people are your best assets you need to check out how to optimize for developer's happiness. Glenn Vanderburg gave an insightful presentation comparing software engineering with other engineering disciplines - are we craftsmen, engineers, architects, artisans all of the above, or none of the above? Watch it, it'll be worth your time. 

 

Yehuda Katz / @wycats talked about "Building Rails Apps for the Rich Client". I thought he was going to talk quite a bit on SproutCore but he barely touched it. I could not find the presentation for this so here is a summary: 

  • Rails can be very useful in making APIs for machine to machine communications. 
  • Q: If all I need is JSON, why do I need Rails?  Isn't something like Sinatra better? 
  • A: Rails is not trivial, a lot is hidden. It's a rich abstraction of HTTP. It takes care of a lot for you: sessions, cookies, security, standards, constraints, caching, etc. If you move away from Rails you have to do these yourself. and it's hard to make things work well together. Rails does a lot of awesomeness underneath. 
  • Some rules on API design: 1) root has to have resource keys 2) no nested URLs. 3) nested object should follow 1) and 2)

Passing JSON back to the rich client to have a JavaScript templating engine (SproutCore, Backbone.js, Mustache.js etc) to render is a trend.. and Yehuda is making the point that Rails is still a good choice for building APIs. 

 

 

I picked up some nice tips from the "Bridging the Gap between Rails and JavaScript in Rich Client Apps" session (presentation here). A very brief summary - how to reuse code across Ruby and JavaScript in your app? 

  • Write JavaScript code in CommonJS modules
  • Use IncludeJS to use them in Ruby
  • DRY!

 

Matt Kelly / @mkelly12 gave the presentation on Backbone.js, a popular JavaScript templating engine. As I said before, having a MVC front end structure is a trend building rich client apps... and it can really do magic.. check out the Chop app that backbone guys just released (make sure to drag and drop on the code). The presentation itself is a lot of fun too!

 

 

FINAL WORDS: 

 

I got a lot from this conference - it has certainly been information overload, but I came back home excited about all the people doing interesting projects. Met many people who I have known but never got to meet in person. It is very true that open source is all about the community, and RoR has the best community there is.. it almost feels like a fraternity. 

 

   发表时间:2011-06-02  
Thanks, nice memo.
0 请登录后投票
论坛首页 编程语言技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics