>ASP.NET MVC v2 Validations – Part 2

>So, according to the comments on the first answer in this StackOverflow post, it appears that there is nothing included to perform client-side validations of model level attributes.  This seems like a much bigger oversight than  the other things I’ve seen missing.

And, now, I don’t believe I can use the built-in validations.  It’s just is too limited, has too many capabilities missing, and too many work-arounds feel so much like hacks that I’m going to go back to the jquery validation library.


>Today is the last day for six co-workers of mine, five from my IT team.  I’m very sorry to see them go but business is what business is. I wish them all the best.

Deployed First ASP.NET MVC Application

Last week, I deployed my first ASP.NET MVC application at work.  Besides being our first ASP.NET MVC app, it is also the first app where we are testing for multiple browsers; IE7 (using IE8 emulation), IE8, Firefox and Chrome.  And that has taught me a number of things to watch for between the browsers.  The most recent item to catch me was a difference between IE and Firefox in handling “empty” nodes.

If you have a div named “node” and you have the opening and closing tags on separate lines, the jquery statement $(‘#node’).html() will return different results in different browsers.  IE returns an empty string  while Firefox and Chrome return the carriage return and any spaces that might be present.  Since I was checking for an empty string to trigger some processing, it wasn’t working in anything but IE.  Putting the open and close tags for the div next to each other fixed Firefox and Chrome.

I get why Firefox didn’t work.  In fact, I would argue that Firefox & Chrome worked correctly and that IE should not have worked.  My point is that just because you test and have the site working, it doesn’t mean the site works.  If you want true cross-browser compatibility, all web interface tests have to be run against all browsers.

And that begets the real problem.  How do you figure out what browsers and what versions to test?  The list will get very big very quickly and that gets expensive.  While unit tests will help with some of this, they do have limits when it gets to exercising the interface through multiple browsers unless you buy some very expensive tools.  And that’s before even considering the problem of multiple versions of IE or Firefox running side-by-side.

It shouldn’t be this hard to build an “ajaxy” web site that is compatible with the major browsers.


>I’ve started to look at some of the NoSQL databases that are being talked about a lot.  I decided to start by playing with Mongo, using the c# driver posted by samus (Mongo c# driver) on github.

So far, it’s pretty interesting.  I’ve done some basic performance testing and it is pretty fast; seemingly better than the SQL Server I’m used to.  And that’s with no performance work and not worrying about it.  Granted by databases aren’t big yet but still.  For it to be fast with me not understanding the product that fully yet is pretty good.

Plus, creating databases and collections in the store is easy.  You just reference them and they are created.  I wish SQL Server had a way of letting the request create the data.  That would  be a nice feature to add though I can just imaging the number of problems that would create in performance and data management.

I do wish the driver would take either a JSON formatted string to populate the document or that it would use reflection to populate the document.  And then do the opposite to get the database stuff back into the model. Ah well, I know what I’ll be working on next with this.