Nick's .NET Travels

Continually looking for the yellow brick road so I can catch me a wizard....

Australian Microsoft Developer User Groups

Back in 2002 when I, with the help of Power Business Systems, started the Perth .NET Community of Practice there was a lot of emphasis being placed on building the community by Microsoft.  All around the country the DPE team worked with user group leaders to help support the groups wherever possible.  This included flying speakers around each month, providing content if required and helping to co-ordinate venue and catering.  With a succession of failed activities, such as the MSDN Connection Program (great idea, weak implementation) and the Visual Studio 2005 launch event, to name two that come to mind, we now don't see anywhere near the support that we used to.  A lot of this comes down to budget, and the ever increasing range of developer orientated products that the DPE team have to know, promote and support. 

If you check out the MSDN Australia map of the user groups, located here, you can see that there are approximately 40 user groups around Australia.  You can begin to understand why the DPE budget doesn't go very far these days - back in "the good old days" there was only really a single developer user group in each of the major cities (with perhaps the exception of Sydney and Melbourne). Having said that, someone at Microsoft should really look at this list and remove those that don't appear to exist any more (such as Hobart) and those that don't appear to meet any more (such as Geelong). 

What I wanted to do in this post was highlight the developer user groups - the ones that are essentially the .NET user groups based in the major cities (my apologies if I don't include your user group in this list - feel free to contact me if you want me to expand the list). Hopefully this information is correct and please contact me if you think anything isn't accurate.

ACT

Canberra .NET User Group

3rd Thursday of the month, lunchtime (12:30 @ King O'Malley's Irish Pub) and evening (4:30 @ MS Offices). 
Co-ordinator: Athena

NSW

Sydney Deep .NET User Group

1st Thursday of the month, 6pm @ AMP building.
Co-ordinators: Nick Wienholt & Dan Green

Sydney .NET User Group

3rd Wednesday of the month, 5:30 @ MS Offices.
Co-ordinator: Adam Cogan

QLD

Queensland MSDN User Group

3rd Tuesday of the month, 5:30 @ MS Offices.
Co-ordinator: Mike Fitzsimon

Gold Coast .NET SIG

Adhoc, 6pm Griffith University.
Co-ordinator: Shea Strickland

SA

Adelaide Dot Net Users Group

2nd Wednesday of the month, 5:45 @ Innovation Centre.
Co-ordinator: Peter Griffith

 VIC

Victoria.NET Dev SIG

2nd Tuesday of the month, 5:30 @ MS Office.
Co-ordinator: Mahesh S. Krishnan

WA

Perth .NET Community of Practice

1st Thursday of the month, 5:30 @ Excom Training Centre.
Co-ordinators: Mitch Wheat & Alastair Waddell

Sydney - One Week On

On my wanderings around North Sydney in search of a place to live I came across this car and couldn't resist a walk-by photo - Nerd on Call, what a brilliant concept!

IMAG0026

A couple of people from Perth asked for a photo of me by the Opera house.  These photos aren't great (the HTC Touch only has a 2 Mega pixel camera) but they show how beautiful Sydney is under the night lights.

IMAG0048

The Sydney Harbour Bridge 

IMAG0049

The Opera House and Sydney by lights

More Update Issues

Two days ago a security update was released by Microsoft for Visual Studio SP1.  Full information is available here but it essentially states it is an issue with Crystal Reports for VS. 

image

Since I don't generally install that bloatware it would seem reasonable that I shouldn't have to download and install the update. Well not only does it come down as an Important update, it also won't install properly.  Actually that is slightly incorrect, it installs fine but then appears a few minutes later as a required update.  This has been documented by Jason Nadrowski and I suspect that Jamshed from Microsoft was going to contribute but his post has mysteriously disappeared (original link was http://blogs.msdn.com/jamshedd/archive/2007/09/12/seurity-update-ms07-052-is-constantly-reoffered-on-microsoft-update.aspx - sounds like sensorship to me!)

Update: There is a newsgroup thread (http://groups.google.com/group/microsoft.public.windowsupdate/browse_thread/thread/9e0660e486d4d595/6f799a41c761f959?#6f799a41c761f959) that talks about this where a Microsoft representative acknowledges this as a known issue that they are working on.  Me thinks some better testing is in order as this update issues seems to be affecting almost all users that don't have Crystal Reports installed (including a University where they have rolled out VS2005 to 90 machines, which all now claim there is a missing update!).

The Symbian Conversion

I've been a fan of Windows Mobile devices for the last couple of years for the sole reason that the development model is imho far superior that what's been available for Blackberry, Symbian etc.  However this is all changing as the mobile phone wars intensify.  With the introduction of the iPhone we are seeing a plethora of mobile web applications being built but of course this brings with it the pain found on the desktop of having to support multiple browsers on multiple platforms.

On the other hand we are starting to see Microsoft's position with regards to the .NET Framework loosen so that in the coming months/years we are likely to see a cut down version of the .NET Framework working across browsers/platforms.  And this move will hopefully mean that we can build rich media applications for mobile devices in a similar way as we can now build Silverlight applications for the desktop.

Of course this is all looking way to far into the future for most developers but something that is of interest right here, right now is the expansion into rich applications for mobile devices.  Today I was reminded to go across to the Blackberry developer site where they have a Visual Studio 2005 addin that gives you designer support for building Blackberry MDS applications that consume .NET webservices.  Unfortunately the MDS application itself still can't be written in .NET being the limiting factor when it comes to building cross platform applications.  Of course you can still build mobile browser applications for the Blackberry but then you loose the ability to sync data and work offline.

Earlier this month one of the team across at Red Five Labs reminded me that they were close to release.  I posted a while ago about their intitative to create a runtime for the Symbian S60 platform to run .NET Compact Framework applications.  As they approach a commercial release I am almost convinced to go and get an S60 device (the Nokia N95 or E65 look like nice phones). Unfortunately there are two limitations of this runtime that will prevent me looking at it in any seriousness:

  1. It's .NET CF v1 - This would require me to do a lot of rework to port v2 applications back to v1.
  2. Lack of a data platform - There is no local database supported.  On the Windows Mobile platform we have SQL Server CE(SSCE) or VistaDB.  Of these SSCE supports Merge Replication (and potentially Sync Services in the future).  This is a significant consideration when building applications that are designed to work offline.  Whilst investigating a few alternatives I did come across an MSDN article (whilst old, it might be of some value) that talks about a DataSet approach to syncing and persisting data - see the DataSet Server CE

Power Tools for .NET Compact Framework v3.5

Microsoft have just released the Power Tools for the .NET CF v3.5 B2 that can be download here, which includes:

  • Remote Performance Monitor and GC Heap Viewer
  • NETCF CLR Profiler
  • App Configuration Tool
  • NETCF ServiceModel Metadata Tool
  • Remote Logging Configuration Tool
  • NETCF Network Log Viewer

There are a few known issues (like 25+) but most of them are with the CLR Profiler.

Why do Australian Telcos make life so hard!

For a while now (in fact as long as I can remember) people have been complaining about Australian telecommunication companies, in particular Telstra.  Well today I decided to do the rounds of Optus and Telstra to see just how bad they really are.  A couple of weeks ago I got a 3 mobile broadband data card for my laptop so I got to experience that process too.  Here's a bit of a wrap up about my experience in each case:

The 3 Network

Out of the three networks I sampled 3 was by far the cheapest in terms of mobile data packages - $29 for 1Gb and combined with their capped plans is probably the best for the average business user.  Unfortunately they don't support devices that aren't HSDPA compatible, so my HTC Touch won't even connect to the phone part of the network.  Their plans are also excessively long, requiring you to commit to 24 months (this might be true of the other networks but I didn't get to the point of asking!).

In terms of customer services, once someone realized that you were waiting, and not just specing out phones, they were quite attentive.  That is until you agree to purchase something at which time their brains seem to drift off and the process which should have taken 5 minutes took almost 20 minutes.  Most of the staff, while friendly, are completely useless as they have shallow, if any, knowledge of either the phones or the network itself.

Optus

This network was by far the worst for customer service.  I guess it didn't help that I went in at lunchtime and there were a number of people waiting to be served.  Being slightly impatient I decided to grab one of their information brochures and flip through it.  Coming across their data plans I noted that at $29 for something minimal like 100Mb they were almost 10 x more expensive than 3. 

When I finally did get served, by a staff member who was hiding in the back room despite numerous people waiting, I asked why this might be they said "because that's the price it is...." - not very helpful.  I asked whether that was it, or whether he was able to provide any further assistance before turning on my heels and leaving.

Telstra

As I walked into the Telstra shop I was immediately greeted by on of the sales assistance who wasn't at all pushy but was able to provide useful/knowledgeable information on their network and their pricing.  Whilst Telstra also charge an arm and a leg ($29 for 70Mb) they were at least able to give a reason - This price applies to both their HSDPA service (NextG) but also their GPRS data (3 charge like a wounded bull when you drop back to GPRS mainly because it isn't their network).  Telstra also has much better coverage than any of the other carriers which helps to justify the high price.

The big word of caution about the Telstra network is that you have to use a Telstra approved device.  Even if the device is marked as supporting HSDPA it might not work on the Telstra network - big gotcha for rookie players.  They also don't support people with 2G only phones that want to move across without going up to NextG plans.

 

In summary, Australia is in a sorry state of affairs - how can data be so expensive for mobile users and the carriers be so incompetent?

Device How To Videos

A while ago I mentioned that MSDN has a series of "How Do I?" videos on a range of topics and that they have some relating to device application development.  Last night someone reminded me about these and I went back to the site to discover a number of videos on some quite interesting, and relevant, topics:

Everything is Go this Weekend

Things are looking up for a monster weekend of activity:

  • For those who don't already know I'm making the move to Sydney on Sunday evening, so there is a fair bit still to be done.  I've just got back from lunch with the residents from the Silicon Beach House and then later we're off to the pub for some farewell drinks.
  • Tomorrow is the day of the move - everything I own has to either be moved into storage or packed to come with me to Sydney - YAY!
  • The Hockey club has their wind-up event tomorrow evening
  • Today Dave and I signed the contracts for the next edition of [VS2005] and the website went live earlier this week - www.professionalvisualstudio.com. Any spare time I have over the next 6 months will be consumed with getting the best possible book out.  If you want to add comments or suggestions either drop past the website or find me on Facebook and ask for an invite to the reviewers group.

Another Day, Another Attribute

Today Hadley pointed out some non-intuitive behaviour of the DefaultValueAttribute.  Actually after you work out how Visual Studio interprets this attribute it does make sense but initially the logic appears to be flawed.  Ok, so what am I talking about? Well say you have a custom control and you have a property defined as the following:

private mTitle as String
<System.ComponentModel.DefaultValue("Hello World")> _
Public Property Title as String
  Get
    Return mTitle
  End Get
  Set (ByVal value as String)
    mTitle=value
  End Set
End Property

When you drop this control onto a form the Title property will appear in the property grid and you can specify the value that will be assigned to the property in the designer file, eg:

UserControl1.Title="Blah"

Now the weird thing is that when you look at the property grid the value appears to be set to nothing or an empty string, but surely we set the default value in the attribute?  wrong, what we set in the attribute is what the designer uses to check whether what you have typed is equal to the default value.  For example if I typed "Hello World" into the property grid it would remove the UserControl1.Title=xxxxx line from the designer file.  This attribute assumes that somewhere along the line you, as the developer, will have set the default value, eg:

private mTitle as String = "Hello World"
<System.ComponentModel.DefaultValue("Hello World")> _
Public Property Title as String
  Get
    Return mTitle
  End Get
  Set (ByVal value as String)
    mTitle=value
  End Set
End Property

VB 9.0 Feature Focus

In my previous post I commented that VB is coming of age in Visual Studio 2008 with better support for some of the debugging attributes.  One of the blogs that I regularly read is the B#.NET blog and recently Bart has been doing a VB 9.0 Feature Focus where he goes into a bit of detail about some of the cool new functionality that VB 9.0 has (most features are also supported by C#, but there are a few like the XML integration that makes VB a truely awesome language to code in).  Anyhow some of the posts to date are:

VB.NET Meets the DebuggerDisplay Attribute in VS2008

One of the most annoying things I find about working with the Guid class is that in order to see what the value is you have to go into a watch window and query myguid.tostring(), this doesn't sound like too much work but if you are used to relying on datatips it can quickly be quite annoying.  For a while I've thought about writing a debugger visualiser or type proxy to add my own datatip for the Guid class and today I got off my backside and did it.....

The steps for doing this are relatively simple:

  • New Project (VB.NET or C#, doesn't really matter - at this stage anyhow)
  • Add Reference: C:\Program Files\Microsoft Visual Studio 8.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.DebuggerVisualizers.dll
  • Add the following attribute to any code file (most likely assemblyinfo.vb)
  • Imports Microsoft.VisualStudio.DebuggerVisualizers
    <Assembly: DebuggerDisplay("Guid {ToString()}", Target:=GetType(Guid))>

Now build this assembly and drop it into Documents\Visual Studio 2005\Visualizers.  Open up a new instance of Visual Studio, open an existing or new project that uses the Guid class.  Run the project with a breakpoint set so you have an instance of a Guid that you can mouse over:

image

And hey presto you have a useful datatip for the Guid class...... WRONG.  What you see here is the datatip in Visual Studio 2008 for VB.NET.  In Visual Studio 2005 this only seems to work properly for C#, VB.NET doesn't seem to properly support the DebuggerDisplay attribute (Note you can still follow the above steps in either VB.NET or C# to create the implementing assembly, it's just the executing code that needs to be in C# in VS2005). 

Perth IT Communities on Facebook

Recent additions to Perth IT Facebook scene include:

I'm sure there are more great groups out there so please feel free to comment or link to them!

New Mobile Development Community Site

From the makers of the "Smart Devices Framework" the team at OpenNETCF Consulting have launched a new community website, http://community.opennetcf.com.  This follows a long trend of these guys supporting the mobile development community. 

In a previous post I talked about a Skype chat that Neil Cowburn frequently hosts.  This chat is something you can join and opt to never leave.  The benefit with this is that whenever someone asks a question you can be sure to see it, and normally an answer or two, whiz past - this is a great way to learn about mobile development.  Another benefit is that because there are people from all over the world on the chat there is likely to be someone connected when you have a question to ask!

Speaking of community sites, don't forget that http://www.sqlserverce.org is available for the community surrounding the SQL Server Compact Edition product.  Unfortunately I have let the site slip a little due to other time commitments but with my recent shift back into mobile development I am keen to get it back up and running.  If you have any suggestions for the site, please feel free to drop me a line.

Windows Update on Vista - Error 779

This is one of those posts where I complain about Microsoft and Windows Update (of which there seems to be a large number of people complaining recently, specifically on Vista with regards to updates released last week). For the last couple of months I've been ignoring a "Security Update for Excel 2003 (KB905756)" which has been failing with the ever useful Error Code 779.  When I first came across this error I rebooted a couple of times and tried a couple of things but didn't have the time or patience to investigate it further.  Following a couple of complaints by others about Windows Update on Vista last week I decided enough was enough and that I'd sort it out this morning.

Turns out that 2 hours later I was able to get the update to install.  This involved a certain amount of trawling of the Windows Update newsgroup followed by a bit more Googling. The things to try are:

  • Disabling firewall and anti-virus software (never a big fan of this but tried it anyhow to no avail)
  • Try downloading the update and installing it manually (didn't work)
  • Try running msiexec /p c:\<updatename>.msp /l*v c:\Update.txt /qn from an elevated command prompt (didn't work since this update was an executable.  Even after hacking around to get at the contents of the exe I still could get it to install)
  • Try renaming the %windir%\SoftwareDistribution directory (this is not a good idea is it effectively resets Windows Update and requires a reboot before the computer will again talk with the update service - and still didn't work)
  • Running the update manually was coming up against "Error 1913: Setup cannot update file C:\WIndows\system32\mapisvc.inf. Verify that the file exists in your system and that you have sufficient permissions to update it." After searching on this error I decided to take ownership of this file (again not something I like doing with system files) with the Administrators group on the local computer.  I then granted the Administrators group full access to the file and retried the installation - finally it gave one last error about not being able to locate an application file with the typical "please insert the product installation disc" prompt.  I inserted the disc and hey presto it installed (perhaps all I needed to do was to have the disc in the drive while the update was installing?)

Honestly what a painful process - I really pity the average user who comes across these issues and I can see why I often see computers with the red security shield in their taskbar! 

Advice for Morts: go buy a Mac - they seem to have fewer issues.

Advice for Microsoft: sort out your flag ship products.  Vista and Office 2007 are so bloated they struggle to get up in the morning.  We could do with less features and more stability!

Entity Framework - Something I can ignore for the time being

Well, when I say "can" ignore I actually mean I can't work with it at the moment using Sql Server CE. Apparently, according to Danny who has been great at posting an update regarding the decisions that have been made, the Sql Server CE made the decision to focus their attention on other aspects of the product in the lead up to the launch of Visual Studio 2008.  This will mean that we should expect another release shortly afterwards (most likely in line with Sql Server 2008 and the Entity Framework) which will ensure Sql CE users can work with the Entity Framework.

What this means for us product developers (ie ISVs) is yet another round of software updates, yet another round of compatibility testing and yes, you guessed it, yet another round of bug fixes ;-).  I'm not going to comment on whether Sql CE should be released in line with VS2008 or Sql Server 2008 but I think that it would be good to have slightly less frequent releases of this product in favour of product stability.  In particular getting setup to work with Sql CE and Merge replication (with the most recent bits) is a bit of a pig's breakfast.  Although this article does help considerably in understanding the various bits and pieces.

Visual Studio 2008 featuring Client Application Services

One of the neat features that Windows Forms developers get with the .NET Framework 3.5 and Visual Studio 2008 are the Client Application Services.  As both Brad and Daniel have posted about these services piggyback off the ASP.NET 2.0 services for authentication, authorisation and personalisation.  In the past in order to reuse these services in a client application you would have had to do all the hard yards yourself to not only communicate with the necessary webservices but also to cache information locally to support going offline.

To get started using the Client Application Services ignore all the MSDN documentation except the Walkthrough.  I tried to make sense of the documentation and it wasn't until I found the walkthrough that it all make sense.  Of course now I've been through it I can understand the Services tab of the project properties (see below).

image

In the past if you wanted to track application settings centrally you had to create your own settings provider that would communicate back via a webservice.  With the Client Application Services not only is the process done for you, there is even designer support for retrieving central settings via the "Load Web Settings" button on the Settings tab.

image

Perth .NET Community of Practice: Nick Wienholt on Code Generation

Next week Nick Wienholt will be in town to present his session on Code Generation.  The details are (full details on the user group site here):

Real-World Code Generation with Nick Wienholt

  • Topic:            Real-world Code Generation with Nick Wienholt
  • Venue:          Excom, Level 2, 23 Barrack Street, Perth
  • Date/Time:  Sept 6th, 5:30pm
  • Cost:           Free. All Welcome.

The user group is also organising a geek dinner at Arirang (Korean BBQ) on Barrack street.  As this will be my last user group before I head off to Sydney it would be great to catch up with as many of you as possible.  If you feel like coming please email Mitch and let him know (btw it's pay-your-own) 

Silicon Beach House gets a Blog

A big thanks to Dave for getting the website up and running for the Silicon Beach House.  Feel free to subscribe to the blog to find out what's going on in the house.  Unlike Big Brother there are no cameras, so no live feeds (although I'm sure that Bronwen will post some videos from time to time), and of course we don't evict people (well at least we haven't had to as of yet).

If you are involved in an IT company looking for space in the central Perth CBD please feel free to contact me as we still have a couple of spaces available for suitable tenants ;-)

Visual Studio 2008 Beta 2 Sync Services

It's taken me a while to get around to exploring what's new with the Microsoft Sync Services in Beta 2.  Given how far they had got with Beta 1 I half expected this to be pretty much baked.  Unfortunately this is definitely not the case.  Without spending too much time the following issues really prevent the designer from being any use at all.

  • Doesn't return tables that aren't in the default dbo schema. This is severely limiting, particularly if you are interested in using either the AdventureWorks or AdventureWorksLT databases as part of your investigation into how the Sync Services work.
  • Tables are not marked as BiDirectional. Despite setting the client option "Data to download" to "New and incremental changes after first synchronization" it appears that all the SyncTables are left with the default value of DownloadOnly. Although this is quite a simple fix, it needs to be done when the syncTables are being initialised.  Luckily the team have fix one bug which means the OnInitialized method does get invoked which you can override in a partial class to set the Direction property of the syncTable to BiDirectional eg:
Partial Public Class LocalDataCache1SyncAgent
    
    'TODO: Add initialization code here. OnInitialized() is invoked after the CTOR is called.
    Private Sub OnInitialized()
        Me._personSyncTable.SyncDirection = Microsoft.Synchronization.Data.SyncDirection.Bidirectional
    End Sub

End Class

Another Entity Framework Beta

Yesterday the ADO.NET team announced Beta 2 of the much anticipated Entity Framework and support tools.  Whilst the initial impressions from using the new designer were good, it quickly became evident that the necessary "back-to-the-drawing-board" has really cost the team. 

For example in previous CTPs you could convince the framework to talk with a SQL Server Compact Edition database by simply modifying the app.config file - this no longer works.  Connecting to the AdventureWorks database mostly works but there are fields that it fails to wire up correctly.

Interestingly enough, in previous versions the entity framework was driven by model files with code being dynamically generated straight into an assembly.  In this beta a designer file is generated which contains the class definitions.  Also, the three model files have now been combined into a single .edmx file, although the three sections are still evident in the xml schema. 

Imho the whole entity framework doesn't go far enough - there should be a divide between your class model (ie what gets compiled into your assembly) and your data model (ie what is in the database and might need to be changed in isolation from your application).  The latter should be deployed with your application and the entity framework should dynamically load the mapping between the data store and your classes at runtime.  This would decouple your application from any schema changes such that any change would simply require a change to the mapping.