August 2005 Entries

.NET Is Hard

DonXML and Sahil have been talking about the E-week article “DBAs Bar Door Against Big Bad .Net Wolf”. Both guys have some good insight. One paragraph in the article struck home with me: Much of the problem has to do with the fact that .Net is just too hard, Dobson said. "Most IT pro people—I'm talking about the DBAs—did not embrace .Net" when it first came out in 2001, he said. True, true. Just the other day I was working with a DateTime value in C#, but what I really needed was a string with a plain ol’ U.S. formatted date....

Something Moved

I sat down to my desktop this morning and my wrists reminded me I’ve been spending a great deal of time with the mouse and keyboard these last three weeks. After logging in, I decided it was time for a change. I stared intently at the taskbar on the bottom of my screen. I began to imagine applications launching, menus opening, commands executing. I could feel the energy start to form around me. I concentrated on synchronizing the patterns in my brain - pouring them into the silicon mind before me. I began to hum the note three steps below...

Crushed

I’m crushed with some heavy duty projects. The hours fly by like a compressed binary stream, and I’ve had no time to coalesce ideas into a well-formed post. I do, however, have a collection of random thoughts I can share. You probably can’t tell the difference between this post and all the rest…. Marketing On Monday I met the new marketing director. After shaking my hand he looks at me and says: “I never lie to potential clients – I always check with engineering first to know what we have”. I’m going to take up an office collection to ship him...

Unit Testing and Refactoring in VS 2005 Beta 2

I started some new work on a .NET 2.0 project recently and decided to dive headfirst into the unit testing features in 2005. The auto-generated tests seem to have a fundamental flaw and I’d recommend avoiding them (at least in beta 2). It’s easy to put the cursor on an existing class, right-click and select “Create Tests…”. Visual Studio will generate a boatload of code at this point, including a unit test class with a test method for each method and property on the target class. The stubbed out test methods are setup to work through an accessor class. If you create an Account...

What AJAX Should Not Be

Continuing on the AJAX theme, I have a couple ideas about what AJAX should not be: AJAX should not be hard to debug. The moment I see a developer machine with a packet sniffer in one window and a script debugger in a second window, I know it’s time to fire up Microsoft Project and make some adjustments. A good AJAX implementation will have tracing, logging, and diagnostics built-in. AJAX should not be hard to test.Automation == good. Room full of interned monkeys clicking randomly == bad AJAX should not be SmartNavigation 2.0SmartNavigation (obsolete in 2.0) uses a clever trick...

Thoughts On AJAX

Wally asks: “What is AJAX?” I hope AJAX will be invisible. I hope developers don’t have to think about AJAX anymore than they think about the inner details of the HTTP protocol. I have no inside information on the ASP.NET team’s Atlas project yet, but I’m hoping to use it like so: <asp:Image runat="server" ID="MagicImage"            ImageUrl="32457.png"            AsyncPostBack="true"            OnDrag="MagicImage_OnDrag" /> The above snippet demonstrates two features: 1. High frequency events like ondrag, which we previously could only handle with client side script, will be available on the server. 2. The presence of an AsyncPostBack property...

ASP.NET Themes On A Sunday Afternoon

I was looking forward to softball this weekend. I had a feeling the coach would move me from 3rd base to the shortstop position because our regular guy was out this week, and I was right. In the 3rd inning I fielded a well hit double play ball. I turned to throw to second when *BAM*. It felt like someone hit me in the back of a leg with a steel pipe. My teammates said I just collapsed. I remember laying in the dirt thinking “so, this is what it feels like to rupture an Achilles tendon”. Fortunately, the X-Rays came back negative...

Eureka!

Many experienced developers do not like the new ASP.NET 2.0 project and compilation model at first, including myself. It was new, it was different, and I felt I had lost total control of my code base. In his post “VS 2005 Beta 2 IDE and web projects evaluation - level 200”, Jeffrey Palermo feels the new model is suitable only for the hobbyist, and is leaning towards using class library projects to develop applications in ASP.NET 2.0. With ASP.NET 1.1, creating a web application as a class library instead of a web project was worth the trouble - if for...

Speaking Of Debugging…

I’ll be in the SmartClient track at VSLive! 2005 Orlando to give a presentation on Debugging in Visual Studio 2005. There are too many fantastic speakers and topics at this conference to list here, so I’ll just point you to the agenda. With new features like Visualizers, DataTips, and Tracepoints, the 2005 debugger is better than ever. This presentation will be one hour of fun.

Page Controllers and Stand-alone Code Migration

The recently unveiled “Common ASP.NET 2.0 Conversion Issues and Solutions” document is a must read for anyone who plans to move a 1.x web application to ASP.NET 2.0. The document explains why one of the thornier areas will be fixing stand-alone (SA) class files that reference types in a code-behind (CB) file. In 1.x you could add stand-alone .cs or .vb files to a web application, and the code inside the files could reference any type in the web project because all the files compiled into the same assembly – the one you find in the bin subdirectory. In 2.0 the stand-alone files will...