benhart

Stories submitted by benhart

Code Contracts - TDD in a DbC World (codebetter.com)

submitted by benhartbenhart(100) 3 years, 2 months ago

As developers start to discover the upcoming Code Contracts for .NET 4.0, it's important to understand not only Design by Contract, and TDD, but how they can complement each other. For business value, we as developers need to flush out our design through the use of TDD, and we can refactor into using contracts for our constraints over time. With these methodologies in place, the edge cases will melt away and help us ensure DRY and write more concise code directly having business value. read more...

add a comment |category: |Views: 27

tags: another

MvcFluentHtml - Fluent HTML Interface For MS MVC(lunaverse.wordpress.com)

submitted by benhartbenhart(100) 3 years, 2 months ago

A few weeks ago I attended a presentation at the KaizenConf by Jeremy Miller and Chad Myers in which they showed their “opinionated” approach to MS MVC. One of the things that caught my attention was the fluent interface they had created for HTML generation. So I went home and started working on this for my own application. read more...

add a comment |category: |Views: 152

tags: another

Unit Testing in JavaScript(notesfromatooluser.com)

submitted by benhartbenhart(100) 3 years, 2 months ago

Last week a colleague asked for my help finding better unit test tools for Java Script. He's done some digging on the state of the art with JavaScript unit tests and finds the whole lot wanting... read more...

add a comment |category: |Views: 12

tags: another

I digg kicking that link into the zone of votes(blog.benhartonline.com)

submitted by benhartbenhart(100) 3 years, 2 months ago

So many means to share development related content these days. What's a poor developer to do? read more...

add a comment |category: |Views: 5

tags: another

NHibernate Starter Kit(blog.benhartonline.com)

submitted by benhartbenhart(100) 3 years, 3 months ago

A Visual Studio project template for getting started with NHibernate. Contains only the basics (binaries, example entity + test and schema generator), but enough to hit the ground running. read more...

add a comment |category: |Views: 93

tags: another

Mocking ASP.NET MVC HtmlHelper using Moq(blog.benhartonline.com)

submitted by benhartbenhart(100) 3 years, 3 months ago

HtmlHelper is used quite frequently in ASP.MVC. It has a number of dependencies, so testing the numerous extension methods on it (both default, and added) can make for some ugly code. This simple code sample shows how to mock out the dependencies (ViewContext for one) using Moq. read more...

add a comment |category: |Views: 397

tags: another

NHibernate objects dirty on load with nothing set in between(blog.benhartonline.com)

submitted by benhartbenhart(100) 3 years, 3 months ago

While easy to do, an incorrect mapping file can have you ignorantly firing off multiple updates to a database when flushing your session. This post demonstrates, and reminds you to watch how you've mapped your enums. read more...

add a comment |category: |Views: 41

tags: another

Layers are not tiers(blog.benhartonline.com)

submitted by benhartbenhart(100) 3 years, 3 months ago

Another plea for us all to please adopt the correct terminology when referring to layers and tiers in the context of solution architecture. read more...

add a comment |category: |Views: 17

tags: another

Dependency Inversion for Dummies: Constructor Injection(blog.benhartonline.com)

submitted by benhartbenhart(100) 3 years, 3 months ago

An introduction to dependency inversion. read more...

add a comment |category: |Views: 55

tags: another