haml and sass for ColdFusion | crazy ideas
Published on
I recently took a Rails two day class and was exposed to haml and sass toward the end of the training. Similar projects about reducing the noise and ugliness of basic html and css markup. haml for cfml might look like this.
#profile
.left.column
#date= print_date
#address= current_user.address
.right.column
#email= current_user.email
#bio= current_user.bio
instead of the norm cfml and html
<cfoutput>
<div id="profile">
<div class="left column">
<div id="date">#print_date#</div>
<div id="address">#current_user.address#</div>
</div>
<div class="right column">
<div id="email">#current_user.email#</div>
<div id="bio">#current_user.bio#</div>
</div>
</div>
</cfoutput>
SASS would have the same effect for css but is easier to implement since it doesn't affect the CFML engine. Today an article was posted about Compass, SASS, CakePHP and could easily be adapted for cfml.