Archive for November, 2009
Sunday, November 29th, 2009
Haml in my Camel
Trying something new .. HAML... I saw it a couple years ago, I was like "ehh.. umm.. nah" ... But working on the DevChix site, it seems like it will be our choice instead of erb for templates so I thought I'd give it a try.
So here's some straight up html + erb
PLAIN TEXT
RUBY:
<h1>Listing [...]
2 Comments » - Posted in Ruby, Ruby On Rails by nola
Tuesday, November 24th, 2009
Builder Pattern in Ruby
Call me crazy, but this is why I classify myself as a language geek. When I learn something fascinating, i wonder hmm how can I do that with X language? My last post I did an example of the Builder pattern as described in Effective Java by Joshua Bloch. The main motivation for me to [...]
1 Comment » - Posted in Ruby, java, patterns by nola
Sunday, November 22nd, 2009
Builder Pattern in Java
I have been reading Effective Java by Joshua Bloch and learned something new so I wanted to try it out.
Making long parameter lists in your constructor is not fun and prone to errors. Previously I thought that best way to handle this situation was to make a bunch of setter methods. This can get kind [...]
No Comments » - Posted in java, patterns by nola
Sunday, November 1st, 2009
GWT 2.0: UiHandler
I was pretty excited to find UiHandler, it makes the organization of code so much cleaner!
I am putting in the full code for both, so you can see the beauty for yourself! Pay attention to the comments where i put the gotchas that got me at first!
Before:
PLAIN TEXT
JAVA:
package com.rubygeek.sandbox.client;
import java.util.ArrayList;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.uibinder.client.UiBinder;
import [...]
