warning: Creating default object from empty value in /home3/ideaquar/public_html/hugoestrada/modules/taxonomy/taxonomy.pages.inc on line 33.

DCRUG meeting bullet point summary

ruby icon

I just came back from the meeting, and as usual, it was pretty stimulating.

In the first presentation several good ideas were presented about refactoring:

* A method should only have 8 lines (six if you are good enough)
* Use presenter objects and avoid helpers
* Use more ruby and less rails
* Refactor ideas together as well as repeated lines of code

The idea of the presenter object is interesting. It is similar to the ViewModel found in .Net MVC or in MVVM. My understanding of the presentation is that it is a ViewModel on steroids, where some of the rendering occurs within the object. I like that idea, and it should be easily translated into .Net. There was no mention of a business layer. Maybe the idea is that business rules should be applied to the model? I will have to research that.

The second presentation had to do with using jruby to create a restful service on top of an existing java application. Some of the interesting ideas learned from this presentation are:

* Java code can run faster than C++ code
* Ruby's meta programming can reduce the amount of code dramatically, and make the code more readable
* Ruby's meta programming seem very similar to writing code and using eval in other languages, except that you are working on the objects directly
* They used cucumber to do integration tests. I really should learn about this.

Overall the presentation gave me ideas on practical applications of using jruby or ironruby.

An interesting factoid that was mentioned during the meeting is that a symbol in ruby is not destroyed by garbage collection. Once it is created, it will stay until the process ends.

Syndicate content