Skip to content

Category Archives: Tutorials

Benchmarking a simple DOM based cloning template

10-Dec-09

Sara Chipps recently posted a simple DOM based clone template method she uses in one of her apps. "Easy HTML Templating with JQuery"

My template looks like this:
PLAIN TEXT
CODE:

<script id="ItemTemplate" type="text/html"

        <li class="item" value="|rowNumber|">

              <input type=”text” id=”input|rowNumber|” />

        </li>

    </script>

Now within [...]

Dependency Injection and Inversion of Control are not rocket surgery

03-Nov-09

I see a lot of people talking about how “advanced” techniques like dependency injection and inversion of control are and how their team won’t understand either technique.
 
Folks, this isn’t hard. In fact, both of these things are so simple I simply call it “using the programming language”.
 
Let’s look at dependency injection.
PLAIN TEXT
C#:

public class MyClass

    [...]

Mocks versus stubs and fakes

12-Oct-09

I dislike using mocks I dislike using dynamic mocking/stubbing frameworks. because it means my tests have an extra dependency beyond just the SUT (System Under Test). I often find myself spending more time getting the mock to work correctly rather than my app code. The lambada + generics based Mock suites (Moq, RhinoMocks, etc), [...]

7 Habits For Effective Text Editing 2.0

14-May-09

Why these jQuery worst practices aren’t.

12-May-09

jQuery ... Worst Practices
In this post, Steve Wellens tries to make the case for two common patterns your run across when using jQuery as "worst practices". Practices that are either superfluous or harmful to your code.
1) Wiring up events using unobtrusive JavaScript.
Instead of wiring up your elements events using jQuery, instead you should set the [...]

ASP.NET MVC Tip – Return specific views for specific errors.

18-Mar-09

Earlier I had said to keep your controllers as thin as possible, that doesn't mean that they should necessarily just be two, or one, lines of code.
Take an instance where you are retrieving items from a web service in your controller. Let's say that you get a 404 error and your service will throw [...]

Get Adobe Flash playerPlugin by wpburn.com wordpress themes