Archive of Open Source

Slim Templates

Posted by Kevin McKelvin on September 18, 2011 in Open Source, Ruby

The Slim template engine seems to have gained a lot of popularity in the Rails community recently. Their site describes it as 'A lightweight templating engine.' For a long time I've loved Haml, taking the approach that I'd rather describe my intent than hard code HTML tags all over the place.However, in hindsight having used Slim for a while it appears Haml might have stepped a bit too far away from HTML, including some cryptic syntax like '%' signs to declare tags.  Slim takes a step back towards HTML.  It still uses the significant whitespace element of Haml and removes the annoying

Continue ReadingLeave a Comment

Entity Framework 4.1 Hooks – DRYing it up with EFHooks

Posted by Kevin McKelvin on June 21, 2011 in Entity Framework, Open Source

One of the things I fell in love with about Rails is its automatic management of timestamps on data.  When you create a new entity, it sets the created_at field.  When you Update it, it sets the modified_at timestamp.For a long time I’ve used NHibernate as my ORM of choice for .NET and registered listeners for the pre-insert and pre-update events in NHibernate to handle this for me.  Now that Entity Framework 4.1 is out and becoming more useful I was interested in seeing how similar things could be done.Entity Framework’s extension points are very limited compared to what NHiber

Continue ReadingView Comments (2)