Sunday, 30 April 2006

Microsoft Australia - Tech.Ed 2006

Snazzy web page too!

I'm planning to drive over with my family, so we can catch up with the in-laws and Sydney relatives at the same time.

Thursday, 27 April 2006

Notifying webmasters of penalties

Google are making it a bit easier to find out how they are indexing your site and any problems they are finding along the way.

Because I use Blogger's BlogSpot domain, I can only customise the template for the page - not add any extra files to the site. However the sitemap facility does support Atom 0.3 feeds, which my blog does have, so I've pointed it to that feed. It says it will take a few hours to update, but it will be interesting to see what it says about my blog once it is finished.

Wednesday, 26 April 2006

NDepend

"Understand and control the architecture of your .NET application"

Scott Guthrie coming to Australia

Scott Guthrie will be speaking at the Microsoft TechEd Conference in Sydney later this year!

Sunday, 23 April 2006

Mozilla patch and CodeCampOz

Two interesting things have happened in the last couple of days - I've had another patch accepted into the Mozilla source code repository, and I've driven to Wagga Wagga with Roger, Gary and Dat to attend the 2006 CodeCamp.

The Mozilla patch fixes a problem that some users had noticed with Firefox 1.5 when they were pasting web content into Outlook 2000 plain-text emails. An unusual case, but it looks like the fix was pretty simple and didn't break the functionality for other users. The patch is checked in to the "trunk" and should make it into Firefox 2.0 - I'll try to get it into a future 1.5 update but that may be over optimistic.

The drive to Wagga went well. It's good to have Dat along on this trip (he couldn't make CodeCamp last year). So far the presentations have been really good, though I confess I (again) didn't pay attention in the BizTalk session :-)

Thursday, 20 April 2006

Design for Operations Integration Kit

This is interesting - it's a sample that generates work items in Team Foundation Server when a .NET application has application errors or performance problems.

The only problem I can see is that it apparently requires MOM on the server where the applications are deployed.

We currently just generate e-mails with the exception details and send them to the developers. Still, if the dependency on MOM could be removed then this could be useful.

SQL Server 2005 SP1

SQL Server 2005 Service Pack 1 has been released

There are also "April" releases of a number of other SQL 2005 tools:

Wednesday, 19 April 2006

Setting TFS work items to default to be unassigned

Wouldn't it be nice to have your work items in Team Foundation Server default to be "unassigned", so that it is easier to determine what jobs are being worked on and what are unallocated?

Well it turns out this is possible.

First of all, you need to export the work item definitions that you want to customise:

cd "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE" witexport.exe /t tfsserver /p ProjectName /n Bug /f c:\Bug.xml witexport.exe /t tfsserver /p ProjectName /n Task/f c:\Task.xml

Now open these .xml files, locate the "Assigned To" field and update it to be the following:

      <FIELD name="Assigned To" refname="System.AssignedTo" type="String" reportable="dimension">
        <HELPTEXT>The person assigned to do the work</HELPTEXT>
          <ALLOWEDVALUES expanditems="true">
              <LISTITEM value="[Project]\Project Administrators" />
              <LISTITEM value="[Project]\Contributors" />
          </ALLOWEDVALUES>
          <PROHIBITEDVALUES>
              <LISTITEM value="Project Administrators" />
              <LISTITEM value="Contributors" />
              <LISTITEM value="domain\tfssetup" />
          </PROHIBITEDVALUES>
      </FIELD>

What this does is limit the users that are displayed in the "Assigned to" drop-down list box to be just the direct project administrators and contributors.

Import these back into TFS:

witimport.exe /t tfsserver /p ProjectName /f c:\Bug.xml witimport.exe /t tfsserver /p ProjectName /f c:\Task.xml

Next, from Team Explorer, right-click on the team project and select Team Project Settings | Group Membership.
Click on the 'New' button and create a new project group named "Unassigned".
Select the [Project]\Contributors group and add the [Project]\Unassigned group as a member.
Now, select the team foundation server from with the Team Explorer, and right-click and 'Refresh' to reload the new templates.

ADSL2+ is here!

In the time it takes to have a shower, our broadband connection has been swapped over and we now have ADSL2+!

ADSL1 (Before, Telstra DSLAM)
Upstream Downstream
SNR Margin 24.5 dB 24 dB
Line Attenuation 34.5 dB 20.0 dB
Speed 256,000 1,536,000
ADSL2+ (After, Agile DSLAM)
Upstream Downstream
SNR Margin 9.0 dB 9.0 dB
Line Attenuation 38.5 dB 21.0 dB
Speed 942,600 11,467,480

Internode have the facility to customise the ADSL2+ profile, so tweaking that may improve things slightly. I've also got a Central Splitter that I plan to install as part of our house extensions so that should help things slightly too. But you can't complain about a 10x improvement!

Data constraints in a multi-tier application

I'm wondering about what are the best practises, particularly in a .NET world for this kind of scenario, which must be pretty common. My goals are to a) have decent performance and b) have as few instances of separate (but identical) constant values as possible. Here's the scenario:

  1. You have a database with some tables, and say a table has a varchar column with a maximum length of 255 characters. All good so far! (Constant count = 1)
  2. You then create a .NET 2.0 DataSet with TableAdapters for that table, so now the DataSet also knows that the column has a MaxLength of 255. (Constant count = 2)
  3. You now create a business object which has a property which also maps to the same column (and would be persisted by passing it back through the DataSet/TableAdapter from step 2). You add checks to this property to ensure it also never gets larger than the maximum length allowed. (Constant count = 3)
  4. You create a web form (or a Windows Forms for that matter) that has a text field for the user to edit the same column. You set the maxlength attribute of that text field so the browser restricts the user to the size limit for that field. You also add a server-side validator to validate the text field and enforce that size limit (just in case their web browser ignores the maxlength attribute). (Constant count = 4)

We've managed to embed the value '255' at least 4 times in our application! While that may not bother some people, it it does annoy me. The concept of having a single constant that represents a value and allows you to easily change the value in one place should you need to is something I've adopted for a long time.

So how can we reduce this down?

Assuming that we're going to stick with a normal relational database and keep the limit for the column there, then that's one instance we can't remove.

It is true that we could use database queries to retrieve that value and use it all over our app, but I'm pretty sure the performance for that would not be ideal, and it does mean that some potential compile-time checks might be missed.

If you assume that your UI tier only talks to the business layer, and the business layer is the only thing that talks to the data layer, what is the best way to percolate through these kind of values with as few separate constants as possible? If I change the length of the column in the database, I want to change as few constants in my code as possible, so that there's less chance I miss one and cause a problem with the application.

I'd be interested in other people's thoughts, or if anyone has links to content that covers this topic.

Friday, 14 April 2006

"Hey, that's me!"

I just noticed there's a link to my blog on the Australian SQL Server User Group home page - I'm not sure how long it's been there, but then I don't always look up in the top-right corner :-)

Which reminds me, when I have some spare time I need to see if I can fix the layout problem with their Forums area in Firefox. I also put my hand up to add some RSS feeds to the site which I haven't done anything about yet.

Returning to a positive note however, I'm pleased to see that the Adelaide SQL group is doing really well at the moment. Maybe it's our jet-setting leader, or the great speakers, but we are getting regular crowds of 30+ and I'm always learning something new each time I go.

Thursday, 13 April 2006

The 'Atlas' Control Toolkit

Brad Adams mentions the release of the"The 'Atlas' Control Toolkit" - I think we will use this.

How to subscribe to Tfs alerts for new workitems only

Something to remember - BisSubscribe.exe is the command-line tool for maintaining alerts for Team Foundation Server

This tools is installed on the server, and by default ends up in the following path:

C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\TF Setup

Supposedly, you can list all the events that can have alerts attached to them by using the web service on the TFS box - eg. http://localhost:8080/Services/v1.0/registration.asmx/GetRegistrationEntries but this fails with an exception for me.

Wednesday, 12 April 2006

"Atlas" April CTP Release

We've taken the decision to run Visual Studio 2005 Professional for now (until we figure out the costs of going to Team Edition)

I thought this also might be the ideal time to do a complete reload of my workstation. A chance to re-install everything from scratch and lose all the accumulated rubbish that ends up on your PC after a year or two of use.

This isn't something I do often, as it take about a day and a half to reinstall the OS + all the various applications that I regularly use (approximately 50 on my list)

But one day on, and my list is already out of date! Time to uninstall the March CTP of Atlas and try out the April one. Roger's already making use of Atlas in our new Online Assessment Tool that we're working on, so this is relevant to us.

Monday, 10 April 2006

A birthday surprise

Another year older, and I'll also be getting ADSL2+ on the same day :-)

Friday, 7 April 2006

Visual Studio Team Foundation Server MSSCCI Provider

Enables integrated use of Team Foundation Version Control with products that don't support Team Explorer integration.

Wednesday, 5 April 2006

ZedGraph

I came across this free .NET graphing/charting component. It work with Windows Forms as well as ASP.NET.

Tuesday, 4 April 2006

ASP.NET Connections Tips and Tricks Slides+Demos Posted

Scott Guthrie's ASP.NET tips and tricks