Format Code for your blog in a web page


You may have seen a comment I left in an earlier post about  a source code formatting plug-in for Microsoft Live Writer.  I still think that tool's pretty nice, but let's just say for the sake of argument that you're not a fan of Live Writer.  What's a blogger to do?

Enter the C# code formatter from  The name gives itself less credit than it deserves, since it also formats VB.Net, HTML, T-SQL, and MSH.  It lets you turn on line numbering and alternate line backgrounds, and colors can be manipulated with a stylesheet change.  Pretty cool.  And you can download the source code yourself and check it out if you want to see the RegEx that powers this cool tool.  Thank you, Jean-Claude.

What’s in your Start… Run dialog?

iisresetI use the Start ... Run dialog to quickly launch programs, rather than browsing through the hierarchy of shortcuts under Start.  If you've ever used the Run dialog, you'll know that is saves your last-used command, so it's there the next time you need it.

You know what's in mine???


You know why??

I'm debugging a web application in VS 2005.  It's an n-tier app, so I've got a solution with two projects -- a Presentation-tier web site, and a Business-tier web service.  Apparently, this is enough to throw IIS and/or Visual Studio into complete disarray, because I seem to spend more time resetting both of these than I spend on debugging.

I've tried running both of these projects using VS' built-in development web server, I've tried running both in IIS, and I've tried one in each.  I either lock up IIS or I'm not able to debug ("no symbols loaded" on my breakpoints).  I've googled this, and I've tried all of the stupid tricks in all of the articles I've read.  Some seem to help for a few minutes, and then I'm right back where I start.  I'm so sick and tired of chasing this -- words fail me.

I love the Visual Studio environment to no end, but at moments like this, I really wish I were deploying on Apache.

Does anyone have  a silver bullet for this (and spare the "switch platforms" bit -- it's not an option in this case)?

ASP.Net Dynamic Data WebSite – This blew me away!

asp_dyn_data Here's another gem from Scott Guthrie.  I saw the announcement for this technology yesterday, and I completely missed how big it was.  I saw Scott's post this morning, and watched the video on a whim, and I was absolutely stunned.  This is huge.

The video that accompanies the blog post is done by David Ebbo, and it is absolutely amazing.  The "zero-to-website" time on this demo is flat-nothing, and there's tons and tons of sophisticated behavior shown in this demo that you'll have to see to believe.

Honestly, you'll appreciate the functionality shown here most of all if you've ever had to implement any of this stuff the hard way.  Handling customized grid cell rendering, editing, and validation, dynamic generation of columns, in-cell dropdown boxes, and so on -- it's true that these things are getting easier all the time, but it's generally still messy by the time you're done.  This demo knocks this stuff out without breaking a sweat.

You may also be aware of any number of code generation tools that will also whip out a working web application based on a database schema, but I think you'll agree that the approach and the execution here is really different.  Some of the scaffolding concepts here will be familiar to Ruby-on-Rails developers -- it's not a code-generation experience as much as a framework experience.  Once this site is made aware of your data, stuff starts happening automatically.  Probably the closest equivalent to this technology in the .Net world would be Subsonic, which does some of this scaffolding at the DAL and Business-Logic levels, but doesn't quite measure up to the Dynamic Data WebSite in terms of UI flexibility.

I haven't had a chance to play with this yet, but if there's one area I think  could be a weakness, it's going to be the rather direct link to the database.  This is the sort of thing that's going to show up as you start trying to work this into enterprises that are particular about how their applications' tiers are implemented, and when you start hitting really complex scenarios involving composite objects.

As an example, Rocky Lhotka's CSLA Framework is much more enterprise-friendly.  Its ability to deploy flexibly into single-tier environments and multi-tier environments, and to change the interconnect protocol with config-file changes lets you deal with demanding deployment scenarios.  Its use of "real" business objects also provides a helpful abstraction layer when you need to stitch several database concepts together to make a business object.

Since the Dynamic Data WebSite depends so completely on Linq, it's pretty static in its deployment model.  For the time being, this is going to rule out deployments where a separate business objects tier is mandated for performance or scalability reasons.

Part of the value of a technology like this, though, is to demonstrate concepts that might be of value elsewhere.  The scaffolding abilities, use of partial classes and partial methods, and aggressive use of custom attributes are pretty cool ideas that might jump-start some other tools, too.

Additional reading on Linq's static deployment model:

2008 will be the Year of the Web Worker because…

I don't normally jump on these sorts of bandwagons, but I saw this group writing topic on Web Worker Daily last week, and the timing couldn't have been better.  We'd just received our first snowfall of they year, you see, and the answer couldn't have been more obvious.

I believe 2008 will be the Year of the Web Worker because people can't drive anymore.  They can't drive when it's sunny, and they sure as hell can't drive when the roads are the slightest bit iffy.

We got about four inches of snow last Tuesday night, into Wednesday morning.  It took me almost two hours to get into work in the morning.  With clear roads, I could make the drive in about 20 minutes; most mornings, I'm there in a half hour, door-to-door. 

When I drove out of my driveway, I drove through about four inches of snow, but as soon as I got about two blocks from home, between the traffic and the snow plows, the roads had no more than 1/8 inch of slush on them.  Nowhere was there any real snow on the roads to speak of.

Yet, the roads were completely blocked.  It took me an hour just to get to the highway.  And the whole time, all the cars are sitting there burning gas and time.

The cost of this idiocy to our economy has to be staggering.

We seem not to want to educate drivers on how to handle this white stuff, and to be fair, I don't know that more education would do the trick while you've still got idiots talking on their cell phones and who knows what else while they're supposed to be driving.  No, I think the only reasonable way to go here is to do more telecommuting.

Does that constitute "the Year of the Web Worker?"  I don't know, but it's got to help.

Two new RSS tools you should know about

aideRSS_logo You know I love RSS, so I was all over these news items.  The first one showed up in my reader this morning promising to analyze a feed and rank the best posts, so I just had to give this a try.  AideRSS will load your feed (or someone else's, if you prefer) and compute a "PostRank" for each post.  The PostRank appears to be driven mainly by "conversations" in the blogosphere (technorati,, and so on).  I ran into some problems where aideRSS coughed up a lung trying to analyze some feeds, but I'll assume that they're still working the bugs out.  As this service solidifies, I can see it being a real asset to the web manager.

The second announcement I saw was from Microsoft.  They'd previously been working on a research project called Simple Sharing Extensions (SSE), and it's gone live now as FeedSync.  The idea here (Ray Ozzie was originally behind this) is to use RSS as a transport for a multi-point peer-to-peer synching mechanism for whatever you'd want to synchronize.  Obviously, RSS doesn't need any help as a standard, but in order for FeedSync to take off, it's going to have to punch through the adoption curve catch-22.  Still, this could be a godsend for things like calendar syncing.  If you're an architect, I'd keep an eye on this.

MS Software Factories are a PITA!

pic08909 That's a pretty broad accusation, so in sake of keeping this rant short, I'll limit my criticism to the Dependency Injection problems in these implementations, and reserve my right to complain about the rest of these factories later.

I saw an article on the MS Practices and Patterns site that mentioned a Web Client Software Factory.  Given my earlier experience with the Web Services Software Factory, I didn't necessarily expect this to be the greatest thing since sliced bread, but in my experience, there's almost always something to be learned from seeing someone put a framework like this together, and I wanted to take a look.

I looked in the downloads section of the PNP site, and found a page for a Web Client Software Factory Sample.  Cool.  I downloaded it and tried to install it.  Oops, I hadn't actually installed the factory first, so I had to go get that and install it.  And then I installed that, a nd got slapped down because I didn't have Guidance Automation Extensions (GAX) installed.  Small point of clarification: I actually did have GAX installed, but it looks like it was the wrong version.  Thanks for the distinction on the error message.

After downloading the newest GAX, its install errored because I had an older-version GAX installed.  Grrrr!  So you can see where this is going, right?  I tried to uninstall GAX, and the uninstall failed.  It told me that the uninstall had failed because there were a bunch of software factories installed that depended on GAX.  In order to upgrade GAX, I was going to have to uninstall ALL OF THE SOFTWARE FACTORIES I'D ALREADY INSTALLED, then install GAX, and then, presumably, go find updated versions of all the software factories, because the old ones wouldn't have worked with the new GAX.


So this is where I bailed.  Absolutely unacceptable.  Isn't this ***precisely*** the sort of DLL hell that the .Net framework was supposed to relieve?  I haven't checked to see if any of my "old" software factories still work - I'm sure I'm in for another treat when I try that.

This is grounds to strike the word "Enterprise" from anything within ten yards of this junk.  Immediately and without prejudice.