SqlDependency

I am at a Developer event at Microsoft right now, and the presenter just talked about some a way to setup a dependency on some data from sql server.

He didn’t go over it much, but it is something I should look into a bit more.

I would guess it needs to poll the DB or something, will be interesting to see how it works.

The Geico / Google Joke

A while back there was a lawsuit filed by Geico against Google.

They were angry that when people typed in Geico into Google, ads for car insurance would show up on the right under the google adwords program.

I thought this was funny, so I quickly placed an ad for the keyword “Geico,” and some guys from this website http://truckandbarter.com/mt/archives/2004/12/geico_sues_goog.html immortalized my joke with the following screen capture:

Back to school

Over the winter I was accepted into the graduate school of the University of Chicago, which may I please point out, is not UIC.

I am pretty excited about going to such a prestigious school. Northwestern is the only other school in the area who can compete with U of C, but they don’t offer a Masters program for Computer Science, U of C was the only place I applied to. I attended the DePaul open house but left feeling very unimpressed. For example, DePaul has “Web Programming with ASP.NET”, U of C has “Object Oriented Architecture and Design Patterns” (a great class). The course on parallel computing will get students access to the super computer facility at Argon Nation Labs. How sweet is that?

Anyway, it isn’t going to be easy with all the work I have going on, but if I don’t do it now I may never get back to it.

And I feel so inferior to my wife with her Masters degree! 🙂

Returning Business Objects from .NET Web Services

There are times when it would be nice to pass a business object over a webservice and consume it on the other side.

This is made somewhat complex by microsoft auto generated proxy system that builds a stripped down version of you object for the client to consume.

You can manually go in and modify the proxy class files, which is what I had done, but now there are some other options available to you to achieve this. This article talks about how you can get customize the proxy creation, so that you can auto generate your proxies whenever you want, and you won’t lose your custom code.

Here is another possible solution. But the latter link looks like it is doing a lot of mapping with the use of a wrapper class. A lot more work that I would want to do probably.

Unit testing of Data Access Layer code

One of the parts where Unit testing seems to fall apart, or become a giant pain at least, is in applications or parts of applications that rely heavily on data access from a large relational database like sql server.

You run some operations against the database and end up with a result set. Is that result set right? Ok it looks good, now what? Well some people would say that you should restore the DB to the point before you started this last test. This can be very painful if you are trying to run hundreds, or even simply dozens of tests.

In this article on MSDN the author goes over some options for avoiding the use of database restore. There is some talk about using mock objects in conjunction with NMock, which of course Fowler would like to remind you aren’t stubs, but the majority of the article focuses on the use of DTC to rollback changes made in each test teardown.

I had some problems getting DTC to run across machines, but it worked great locally, so there was some success in my tests.

Finally an update

Well we completed the move a while back, but getting updates to my site was not a very high priority for me, but I figured it was time.

Aside from all the crap with moving the house, I have been working a ton, and so has Kathleen. On top of that I have started back going to school for an MS in CS from UC, OK? But that is another blog post.

More to come.

Synchronizing the ASP.NET Cache across AppDomains and Web Farms

This article covers an interesting topic that has shown itself in my current project: using the Cache across appdomains and web farms.

In the end his solution is basically to create a mechanism to write out cache information to files that each app domain watches for changes (or so I gleamed from glancing over it) but in our case we are storing little bits and pieces and not large things. In other words, the added overhead of reading/writing to the filesystem would probably eliminate the benefit of using the cache for our application.