15. March 2007 21:16
In my last post I left you hanging to see what would happen when I created a new .sync item from the Add New Item dialog. So here you go, the following is what the synchronisation configuration screen looks like in the March CTP - bearing in mind it is likely to change, so if you don't like it say so at http://connect.microsoft.com.
For anyone familiar with the MS Sync Services you will immediately see that under Database Connections you can define both a server and a client connection. This uses the same set of connection strings that are defined within you app.config file for you application. You can either use an existing connection or create one using the New button.
Under Synchronisation we have the option of specifying how frequently a synchronisation is attempted. There are a whole bunch of different rules that could be used to define when a synchronisation should be executed so I suspect that this is too simplistic for most developers. The last option here is the "Synchronize tables in a single transaction" - this can be particularly important where you have relationships between tables (for example orders and order details) and you want to make sure you either get everything or nothing (ie all my order information, or none at all).
Clicking the Advanced + button expands out the dialog to include the following settings:
One of the nice features of the MS Sync Services is its ability to be split so that the client and server logic doesn't all run locally to the application. This might be across webservices, wcf or the macaroni protocol (basically it doesn't matter how the data gets there so long as it does). The advanced settings allows us to configure how the designer generates code. For example you could elect to only generate client, only server or both client and server code. You might want to split the code across two projects (for example the client code might be in the application assembly, which the server code might be in a supporting webservice project).
Going back out to the main dialog we can see that there is an Add Item button. This opens the following dialog which allows us to specify which tables from the server we want to synchronise to the client.
As you can see there is only one table in my database, called Attachments. The designer uses the Sync Builder to generate the Sync adapters it needs. As such this dialog is really configuring the Sync Builder so that it can in turn generate the appropriate Sync Adapters. For more information on how the build works, and as such how these parameters work head across to the MSDN Forum or to www.sqlserverce.org and subscribe to the Sync Services FAQ.
14. March 2007 21:00
It has taken me a while to get an opportunity to play with the March Orcas CTP but I figured that I could do without a couple more hours of sleep to have a play. I'm just going to post a few things I noticed - some a small, some a not....
First things first - you have to hand it to the product team they really know how to deliver features that are going to make a difference to every developer I know. Take for example the following screen shot of the right-click shortcut on the solution explorer - notice anything cool?
Yeh, that's right, they have rounded the corners. This has been extended to the Ctrl-Tab dialog where they have not only rounded the corners, they have also added a preview of the document you are about to navigate to.
Ok, so now onto something more interesting. As most of you will know I have a particular interest in SQL Server Compact Edition (SSCE - www.sqlserverce.org) and the MS Sync Services (aka Occasionally Connected Services, OCS). Despite only recently releasing v3.1 of SSCE the team has been hard at work and the March CTP already has v3.5 of SSCE. It also has not only the CTP of MS Sync Services, but also the first cut of the designer dialogs to facilitate working with this framework.
After creating a basic windows forms solution you can go to the Add New Item dialog (the usual way - right-click solution explorer, Add New Item), which looks like...
You will notice that I've highlighted the Local Database Cache option - which generates a .sync file, and the Service-based Database option - which generates a .mdf file (error in the image - should be .mdf). This is an interesting move for this designer as we can now create SQL Server Database file (.mdf) and a helper class for working with MS Sync Services (.sync).
Unfortunately I will have to leave you hanging on to see what the .sync file is and how the designers look as I really need to get some sleep....
14. March 2007 19:41
One of the significant improvements made in Visual Studio 2005 was in the device emulator technology. In fact so profound was this change it was badged as Device Emulator v1 - this is mainly because it is the first version that could run as a standalone application without requiring Visual Studio to be installed. Recently the product team have released version 2 of the Device Emulator which will install over your existing emulator. Note that if you have downloaded and installed the Windows Mobile 6 SDK you will already have this emulator installed. More information on the announcement by Anand is available here
11. March 2007 12:23
Geoff Orr makes a comment about how easy it is to implement IComparable so that items can be sorted in an arraylist. I would like to extend this by saying that in .NET v2 there is an IComparable(of T) which you should also implement. Something like this would work:
Public Overloads Function CompareTo(ByVal obj As Object) As Integer Implements IComparable.CompareTo
If TypeOf obj Is CostCentre Then
Return CompareTo(CType(obj, CostCentre))
Throw New ArgumentException("object is not a CostCentre")
Public Overloads Function CompareTo(ByVal costCentre As CostCentre) As Integer Implements IComparable(Of CostCentre).CompareTo
I must admit that I'd prefer to use the C# anonymous method to implement sorting on an as needed basis. For example:
List<CostCentre> lst = new List<CostCentre>();
lst.Sort(delegate(CostCentre x, CostCentre y)
11. March 2007 05:40
It's always amazing what you find when you trawl through your unread emails. Normally I'm pretty good at reading and processing those emails that need immediate attention, which is why this email got passed over until now (only a week or so old). The innovative team over at Red FIVE Labs
have ported a version of the .NET Compact Framework v1 to the Symbian OS. How cool is that! You can now run your applications, apparently "without change". Although there are a number of conditions that are layed out in the FAQ - such as in v1 they are really only targeting smartphone style devices and there is no support for SQL Server CE (since this is clearly a native win mobile application)
10. March 2007 19:44
In the midst of all the hype surrounding the release of SQL Server 2005 Compact Edition (ok, so maybe I got a little too excited that MS have released the silly no-desktop licensing constraint on SQL Mobile) I must confess that I stopped looking around at alternative lightweight databases for application development. As part of trying to promote www.sqlserverce.org as a community of interest around SQL Server CE I setup a couple of Google Alerts to monitor posts around the product. This morning I received a number of email alerts, of which one particularly caught my eye.
The alert that got me really interested was about a relatively new product called VistaDB. Now don't be confused by the title as it appears to have nothing to do with Windows Vista (contrary to what the name implies). According to their product description "VistaDB 3 is the world's first fully managed and typesafe embedded SQL database engine designed specifically for Microsoft .NET Framework, Compact Framework and Mono."
I haven't had an opportunity to download and evaluate this database yet, but if half the functionality is available that they claim in the product comparison with SQL Server 2005 Compact Edition it could well be a good competitor in the space of application databases. Of course don't forget that data synchronisation is one of the largest problems with building occasionally connected applications and that in order for this database to succeed it needs to support one or more of RDA, Merge and/or MS Sync Services. The first two are unlikely but I can see that it wouldn't be too hard to build a client sync provider for VistaDB.
Update: I just came across a couple of interesting blogs:
- The VistaDB product blog, of which the announcement about v3 is here.
- Ken Cox has dropped his 2 cents worth, plus pointing out that Microsoft MVPs are being offered a free version.
9. March 2007 17:11
Following Mauricio's post on the good and bad points of travel I thought that I'd add my 2 cents worth with regards to Qantas. Upon leaving Wellington this afternoon I arrived at the airport to discover that not only did the regular check-in queue have a massive line, the business/Qantas club queue had one too. Honestly, given I pay a premium for being a Qantas club member I was a bit frustrated that I have to queue!
Thinking that my time was better spent eating and talking to Meg I decided that given I had an hour or so to kill that I would go up to the Qantas club lounge. Of course this involved being given the 3rd degree at the gates because I hadn't checked in....
Later, upon arriving in Auckland and proceeding to the International terminal I was pleasantly surprised to discover a dedicated business/Qantas club check-in lounge. There, they not only check you in, they also pre-clear you for immigration. Going upstairs to immigration and there is a 30 minute queue, luckily pre-clearance means you get to go through the same fast track lane as the airline staff!!!! Big thumbs up to Auckland airport - it was almost worth the $25 departure tax that they wack you with (why isn't this tax included in the ticket like most other taxes?)
Update: After I made this post I left the Qantas club in Auckland and proceeded to the gate where I discovered a 500m (I kid you not) line for, you guessed it, another security check point. For all flights going to the US passengers now need to submit to a second security check where laptops have to be removed from bags, you walk through the metal detectors and are then wanded, and basically any fluids are confiscated. This whole process ended up delaying the flight by 30mins or so.
On the plus side, upon arriving at LAX and collecting, then rechecking, my baggage I went to the Alaska lounge. They accepted my Qantas club membership and best of all they have FREE WIRELESS (why this isn't the standard amoungst airport lounges I don't know)
8. March 2007 21:02
The last three days I have been back in Wellington, NZ, working with the rest of the development team at Intilecta. We are currently in a transition period between the end of Version 1, which we officially signed off last week, and the commencement of Version 2. Like most development schedules there are always odd jobs that get postponed. In our case it is really about maturing our development process and tools.
For version 1 we were using SourceSafe (and praying to the MS gods that it would survive) primarily because the whole team was based in the Wellington office. Now that the team has spread out physically using SourceSafe has just proven too frustrating due to the way it checks code in/out. Anyhow the first task in refactoring our development tools has been to ditch SourceSafe and to wheel in Subversion. I must admit I have been extremely impressed with TortoiseSVN (integration into File Explorer - including Vista) and Ankh (integration into VS2005 - although doesn't use standard API it does a great job).
The next step in the process is to upgrade our build process. Up until now we have quite successfully been using CruiseControl.NET, although I must admit we have had to put a number of cludges in to get auto product versioning and correct labelling both within SourceSafe and CC.NET. Again I have been pleasantly surprised with the latest version of cc.net and in particular the way that it integrates with Subversion. What we want to be able to do is for the daily build we want the revision from Subversion (assigned whenever someone checks code in) to be the final digit in our product assembly version numbers (eg <major>.<minor>.<build>.<subversion revision>). We also want this version number to be the label that appears in CC.NET.
To achieve the first part we use a command line utility that comes with TortoiseSVN called SubWCRev which allows us to take a template file (eg assemblyinfo.template), replace appropriate keywords (in this case $WCREV$) with subversion information (in this case the latest subversion revision number) and generate a file that can be built as part of the build (in this case assemblyinfo.vb). All our projects simply reference this file to ensure they all have the same assembly version number.
The second part was a little more tricky, or so we thought. Initially we thought we would have to do all the processing to retrieve the revision number and to implement a labeller that works with cc.net. A bit of searching revealed that others had tried to achieve the same result and in fact the latest version appeared to have a new labeller called the lastChangeLabeller. At least the documentation in the current stable release (v1.2.7) seemed to imply that it was included. In actual fact it is only included in one of the intermediary builds (we are using 188.8.131.5228). With this labeller in place cc.net is reporting the version of our product (as defined by the assembly version number).
I would be interested to hear what others have done in terms of automating the versioning of assemblies as part of the build process.
8. March 2007 14:04
Earlier today the team at Intilecta were talking about where to get stock images from. The obvious candidates being Clipart, online collections, creating them ourselves... My contribution to the conversation, that I was surprised no one knew about, was the Image Library that ships with Visual Studio 2005. If you go to C:\Program Files\Microsoft Visual Studio 8\Common7\VS2005ImageLibrary there is a zip file VS2005ImageLibrary.zip which when expanded gives you a selection of sock images and icons of various resolution. This is a great starting point for simple applications!
8. March 2007 07:21
In case you haven't seen this link, SP2 for the .NET Compact Framework v2 has been released and is available for download here.
Neil Cowburn has a couple of great screenshots of the Remote Performance Monitor running under Vista. He also pointed out that instead of using Sandcastle command line I should try the Sandcastle Help File Builder, available via CodePlex http://codeplex.com/shfb/
7. March 2007 21:47
Ok, so we have all seen/felt the pain that Vista has caused - none more than in the developer community where we not only have 3rd party applications that don't play nice, our main development environment doesn't even work properly. I'm sorry but can you, as a fellow developer, honestly say that you feel L.O.V.E
d by microsoft? Some good news if you aren't, not only is SP2 for SQL Server now available, I noticed that the Update for Visual Studio 2005 is now available here
7. March 2007 21:39
SoftTeq partner, fellow Perth-ITe and co-ordinator of the Perth .NET Community of Practice, Alastair has posted a link to the March 2007 CTP of Sandcastle - a documentation project for .NET similar to what NDoc did. I posted on this back in August last year where I observed that the process of using the tool was less than obvious.
I figured since I had so harshly condemed it last time that I'd better go across and take a look. Well I got as far as reading the instructions for installation (didn't even download it this time). In the instructions there is a link of to another set of instructions for working with a sample project - this has 12 steps!! I'm sorry but 12 steps to RUN a sample just doesn't cut it. No thanks, try again Microsoft.
7. March 2007 09:15
Both Grant and Mitch have started talking about a plan by Readify to create a TFS in the Cloud solution. Here are my 2 cents worth....
Clearly price is a major consideration from the point of view of a development shop and after taking a look at the various options I doubt that TFS in the cloud is going to be able to reduce this – ok, so you might be able to get rid of the once off server licensing, but you still end up paying a per seat license. One area that would be great would be if you could combine TFS in the cloud with the benefits associated with the partnering program. For example if I’m a certified partner, so I get 10 CALs, I can sign up for your TFS in the Cloud solution and only pay a relatively small amount for each user (ie the incremental cost (+markup) of hosting an additional user) instead of the amount inclusive of the CAL.
I guess the real benefits of a TFS in the cloud would be the fact that a team doesn’t have to host it themselves. In addition any upgrades or additional tools could be provisioned by the hosting company which means that all the subscribers benefits. The other thing would be if you could establish a community around the TFS in a cloud – the typical forums would be useful for people to share experiences.
I think when it comes down to it, it really comes down to a decision by an organisation as to whether they want to host their own TFS server(s). For what it's worth if there is zero cost difference, I would much prefer to see this outsourced as it is one (or more) less thing that can go wrong for the dev team.
5. March 2007 16:53
Over the weekend I think my brain must have been fried by the warm weather Perth was experiencing (either that or it was a result of the closing party for the Verandah Club - part of the Festival of Perth). Firstly I failed to notice that the SDK for Windows Mobile 6 had been released.
Secondly, and by far the worst of the two offences, I managed to forget my laptop charger in Melbourne airport - Doh! Luckily the other mobile warriors in the Intilecta office (where I am currently) all use the same model of laptop, so while I source a replacement I can sponge power off them.
3. March 2007 19:57
I was just looking for someone in my IM contacts and noticed that one or two of my contact now have this "I'M" logo against their name. Intrigued I figured I'd try a search to see what it was. Unfortunately "I'm" by itself doesn't yield very good results; However in conjunction with "Live Messenger" I was pointed towards a new initiative from the Live services team. Check out the "I'm making a difference" program for more information about how your IM conversations can aid "organisations dedicated to social causes". You will observe that there is now a link from this blog (see news section on the left) and an icon against my name in Live Messenger!. Alternatively you can click this button to get involved:
This program was quite well timed as I had just finished reading Alastair's post about "An Inconvenient Truth" and how we all need to contribute and make a difference. If you are in Australia tonight you should take the Carbon Test and see how you can improve your daily life to reduce your carbon emissions.
Update: I should have pointed out that at the moment this program is US only. You can easily fool the website by claiming you are living in the US but this won't do much good as the programme itself is tightly controlled and non-US conversations won't count towards the money.
28. February 2007 17:03
I've signed away another 6.3Gb of my broadband quota to downloading the latest CTP of Orcas (Visual Studio vNext) which you can do also from here
. This is supposed to be one of the first build that contains a number of new features - including I hope v3.5 of the .NET Compact Framework (although this isn't confirmed yet)
28. February 2007 10:54
Ok so maybe not Vista itself, but applications/service packs that get released for Vista IMHO need more testing before they are released. This includes service packs that Microsoft releases. What I'm referring to is what Jeff Wharton talks about in this post where SP2 for SQL Server installs perfectly under Vista except it falls apart when trying to update security privileges if the sql instance isn't running - obvious test you would have thought!!
I was introduced to Jeff by Rob Farley as a fellow Australian developer who also sat the beta exam: 071-540: TS: Microsoft® Windows Mobile® Application Development. I found out this morning that I passed the exam and that it has now been published for anyone to take. Jeff also runs the canberra sql server user group.
23. February 2007 22:04
This is a call out to all bloggers based in Perth, Western Australia. Please let me know if you want to join the recently set up Perth Bloggers
22. February 2007 12:36
Over the last couple of years we have really seen an acceleration of mobile devices. While this has primarily been in the consumer space - a friend recently purchased a phone that takes better pictures than my analog camera - the adoption in the enterprise has started to kick in. With the advent of technologies such as Direct-Push (part of the Messaging and Security Feature Pack update to Windows Mobile 5) the off-the-shelf Windows Mobile devices are at a point where they can be deployed and managed within an enterprise. Confirmation of this trend came through an interesting bit of research done by Forbes entitled "Enterprise Mobility Megatrends" which can be downloaded here.
In last 6-8 months working with the team at Intilecta we have built the desktop version of our product and we are now investigating a mobile device version. Unlike traditional windows applications which are usually written to communicate directly to a server (either truely direct (ie SQL on the wire) or via a webservice) ours abstracts the data layer through the use of merge replication. This enables to work locally, while still having a central data repository. Where am I going with this? Well the advantage of our architecture is that porting to Windows Mobile will reuse much of the existing code base - in fact since day 1 we have been doing a parallel build against the .NET Compact Framework to ensure that the task of porting will be as simple as possible. If you want to know more about the use of SQL Server Compact Edition for client applications make sure you subscribe to the feeds at www.sqlserverce.org.