try-catch-FAIL

Failure is inevitable

NAVIGATION - SEARCH

Daily Link Roundup for Jan. 28, 2009

ASP.NET MVC Release Candidate Yup, the RC is out, read about it here and here, then grab it here, and upgrade your projects by following directions.  Watch out for bugs though, apparently a few surprises made it in to this release. MonetDB Not really news, but I've been looking a bit at MonetDB.  It makes some pretty ambitious claims, and since it appears to have been built with information retrieval in mind, it might provide a more suitable storage mechanism than SQL Server for the system at my day job.

The pain and horror of hand-coded data access code

At my day job, we finally decided to cull out a couple of columns that were no longer needed in our database schema.  We could have left them in, but since they were in a table that typically ends up with several hundred million rows, we thought it *might* actually save us some space in the long run.  Besides, taking out a couple of columns should be easy, right? WRONG Let's see what all this change actually entailed.  Obviously we had some code that was still wrapping these properties in our object model, so I had to remove the properties.  Then I had to update their tes... [More]

Alternatives to Relational Storage, Part 1 - Introduction

As you might can tell from Friday's post, my recurring obsession with persistence has flared up again.  In all my years of development, I have still yet to find a solution that feels "perfect".  Perhaps the holy grail of storage is impossible to obtain.  Perhaps there is no perfect solution.  Maybe it's some Matrix-style philosophical issue, and the idea of a perfect persistence solution is a dream that us primitive developers refuse to accept.  In any case, I thought it was time to (once again) survey the landscape of solutions to see what's changed since I ... [More]

Daily Link Roundup for Jan. 26, 2009

Thoughts about IRepository<T> If you use NHibernate or are just following "best practices" and wrapping all your data access code in a repository class, check this out.  The post makes some good arguments against exposing IRepository<T> directly.  From personal experience, I can tell you that exposing anything to clients that ties them to the underlying API being used (in this case, NHibernate) has a good chance of coming back to bite you.  Decoupling them from the underlying API means writing more code though, so you need to decide whether or not the ad... [More]

Data Storage: Why is the answer always &quot;relational&quot;?

I've been thinking a lot about persistence and storage lately, and I think I've finally come to the conclusion that relational databases are almost universally being used incorrectly, and that many times an alternative persistence medium is actually a much better solution.  I think relational databases are good for holding data that needs to be aggregated across (for reporting or other types of heavy analysis), not for things that are inherently object-oriented tasks.  We spend so much time these days trying to work around the object-relational impedance mismatch when we could instea... [More]

Unit Testing in .NET Part 5 - Moq-ing your way to simpler tests

Previously on "Unit Testing in .NET", we've looked at: Introduction to Testing Your First Unit Tests Asserting That Your Code Rocks Overcoming Testing Hurdles That means you should be comfortable with the all the fundamental concepts of software testing, and you should be equipped to deal with some common testing headaches.  In this post, we're going to look at how to simplify testing via dependency injection and the excellent mocking library, Moq. What is mocking? Mocking refers to the act of substituting a simulated object in place of a real object.  In ... [More]

Daily Link Roundup for Jan. 22, 2009

Delete Links == Security Hole I don't completely agree with this post (if your delete action isn't protected by some sort of authentication and authorization system, well, your data probably deserves to be wiped), but fundamentally I agree that GET requests should *get* something, not delete it.  I like the idea of using AJAX to send alternate HTTP verbs, guess I'll have to play around with that. Web Design Trends for 2009 Smashing Magazine has posted even more trends for 2009.  If you're working on a new site and want some inspiration, check it out.  You can also check o... [More]

Daily Link Roundup for Jan. 21, 2009

Alt.NET Podcast on Object Databases In recent months, I've started to think that many applications use a relational database when they really don't need one.  I was glad to hear that I'm not the only person thinking that way.  If you are working on a new project, be sure to shop around before you settle in on a relational database.  You might be surprised at how diverse and mature the data persistence arena is.  Web Platform Installer Released Microsoft has shipped the final 1.0 release of their Web Platform Installer tool.  This tool ... [More]

Daily Link Roundup

I haven't done the best job in the new year of making three blog posts a week.  Sorry, but things have been crazy-busy, just not crazy-busy with bloggable stuff.  So, in an effort to post more frequently, I'm going to (hopefully) start posting a few links to other blogs, tools, stories, etc. that are worth checking out.  I promise this isn't going to become another link-listing blog; I still plan to shoot for three quality posts a week.  But, since I scan about 40 blogs every morning anyway, I thought I could at least pass on any useful tidbits.  This won't be like som... [More]

Unit Testing in .NET Part 4 - Overcoming Testing Hurdles

By this point in the series, you should know quite a bit about the basics of unit testing in .NET.  You should be able to write unit tests using NUnit, and you (hopefully) understand the value that unit testing brings to the table.  As you've started to apply what you've learned though (and you are applying what you've learned, riiiiight?), you might have run into things that were difficult to create test cases for.  Worse yet, maybe you ran into things that you couldn't test at all.  Fret not, as post 4 in this series is here to save the day.  In this post, we'll look... [More]