NetManiac

Witold Rugowski on web20 wave with Ruby on Rails

RuPy 2007 or why Rails still amazes me

Posted on April 18, 2007 - Filed Under JavaScript, Ruby, RubyOnRails

Last weekend I was speaking on RuPy conference. I had time to take part only on Sunday, so I missed first day, and what is probably key event of every conference, evening meeting in bar. Well, maybe next year.

For RuPy I had to refresh my speaker skills (last my speak on conference was something like in 2002). Well, I hope I did useful presentation. For me was very useful ;-) since I have learned a few new things. First, I was talking about EJS templates (minus mor plugin by Dan Webb). EJS provide efficient way to generate JavaScript code from Rails view level. Well day before my presentation I found simpler solution, than EJS to JS generation. In action set headers["Content-type"] = "text/javascript" and in RHTML template write JavaScript code with well known RHTML symbols <%= and <%. I did not found this though last few months – Rails still makes me nice surprises ;)

I was struggling with send_data a lot to generate code for RNS and solution was so simple. But, anyway, as I said in Poznan – I will still use EJS templating system. When I need to generate a lot of JS code I see two reasons to use EJS. First, that having another extension (.ejs) to separate JS views is right way, and secondly (and most important) EJS provides js helper, which escapes Ruby output to JavaScript safe string (like h helper for HTML in RHTML templates).

Second thing I learned from my presentation is that I can bear well with public coding… Result? Probably in May I will prepare session with live coding to introduce Rails and Ruby to people who did not drink Rails Kool-Aid yet. I will disclose more details ASAP I will know more – when, where and what exactly.

And talking about my presentation – You can download it: slides in PDF (with some remarks) and code from live session.

Popularity: 3% [?]

Hits for this post: 3722

Similar Posts

Comments

2 Responses to “RuPy 2007 or why Rails still amazes me”

  1. RuPy : NetManiac on April 14th, 2008 11:06

    [...] RuPy 2007 or why Rails still amazes me [...]

  2. RuPy 2007 – szafranek.net on October 1st, 2009 23:03

    Kramer auto Pingback[...] :).I also have to mention impressive presentation by Witold Rugowski. His topic was pretty basic (EJS templates for JavaScript in RoR), but the presentation itself was a great performance: he typed and successfully executed fully [...]

Leave a Reply