Devlico.Us
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @devlicious

Casey Charlton - Insane World

Hang the code, and hang the rules. They're more like guidelines anyway


NDepend ... the Shortest Review Ever

A long while ago I got a licence for NDepend ... I had used it previously but only on the trial version, where it had proved very useful in giving me a some pretty graphs that made sense to managment when my words did not.

I haven't actually got around to using it until this morning, when I thought I would run it over our current project to see where we were at. There isn't a hell of a lot of code in the project, so I wasn't expecting too many surprises - and largely I didn't receive many.

I was pleased to see our assembly dependencies were the right way around, and very pleased to see they were very near the centre line on the "Abstractness vs Instability" chart.

The only very mild surprise was to see this flagged up in multiple CQL checks:

RegisterforUpdates(String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String)

Obviously there is something wrong here ... and a quick word with the developer who wrote this established that he didn't know about the Binding Helpers in ASP.NET MVC so had passed every form field back into the controller via the parameter list. A quick hyperlink to him of Rob Conery's excellent tutorials on ASP.NET MVC and we have a much nicer method on the controller.

One small win for NDepend ... I look forward to many more as time goes on!

 


Published Aug 19 2008, 09:14 AM by Casey Charlton
Filed under: , ,

Comments

Kyle Baley said:

Re: Binding Helpers. I've also been using the Deserialize attribute from MvcContrib to pass objects to controllers. I found it makes the controllers easier to test.

# August 19, 2008 9:39 AM

Casey Charlton said:

Interesting point ... had of course forgotten the "how do I test this annoying method on the controller now that it uses Request.Form" aspect ...

I took a brief look at the MVCContrib bits here but didn't like it much, have been trying to stick to vanilla MVC for the moment as it is still in flux.

However I think we now need to look at this ... though we aren't unit testing controllers at the moment (or anything else for that matter) as the team is too inexperienced to bring in unit testing with the stupidly short deadline they have to deliver something, and to have them remain productive.

# August 20, 2008 3:18 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Casey Charlton

A somewhat passionate and opinionated developer, with occassional sparks of wisdom, and occasional useful information. Check out Devlicio.us!

Our Sponsors

Red-Gate!