Sunday, February 20, 2011

Building dynamic html with Jquery

While reviewing the jquery code for a project developed at syneity. I came across the following javascript where dynamic html was handcoded and then applied to a table, we had encountered several such situations and it was a buggy experience. This blog details the refactoring i made to the same.

The problem:

image


 

Thursday, February 10, 2011

A MVC “Add View” like Visual Studio Wizard.

Any one who has used asp.net mvc will have be entranced by the “Add View” and “Add Controller” features. This is implemented using Visual Studio Wizards, today we will look into how we can implement such a wizard. We will be using this wizard at SyneITY for our development process.

What will this wizard do?

Wednesday, February 9, 2011

Executing a T4 Template from the command line

A T4 Template is normally added to a project and this gets executed whenever the user adds the template to the project / whenever a user saves the text template. Now i had a requirement when i needed to execute the T4 template programmatically. I had the following options:

Options to execute a T4 text template programmatically:

  • Implement the ITextTemplating interface.
  • Use the TextTransform command line utility.

Monday, February 7, 2011

Refactoring the code out of the T4 template

T4 templates have been a great way to generate code in visual studio, and at SyneITY we use code generation where developers find themselves repeating things. T4 has helped us achieve much better productivity. Also special thanks to Tangible for their Syntax Highlighting without which T4 wouldn’t have been a piece of cake.

The Reason for Refactoring:

Sunday, February 6, 2011

Implement paging with CTE and Row_Number in Sql Server.

We needed to implement paging and this is how we at SyneITY went about it. Since we were using Sql Server 2008 we decided to go for using the Row_Number() function along with CTE (Common Table Expression).

Procedure