.Net


7 February 2007 in .Net & Code & Microsoft | Comments (2)

This evening I delivered a quick presentation on SQL Server 2005 Compact Edition (SQL CE). Below is my demo project that shows how to connect and execute SQL commands. Note that if you run my code you’ll need to update the location of the database file in the connection string. You will also need the SQL CE Runtime (link at the end of this post)

Download the demonstration project

Product overview

Advantages of SQL CE:

  • Tiny footprint, 1.7MB
  • Replication to SQL Server, great for Smart Client and Mobile applications
  • Works on Windows XP, 2003, Vista, Windows Mobile, CE, Smartphone
  • Single file for the database makes deployment easy
  • Zero cost!

Limitations of SQL CE:

  • Maximum database size of 4GB
  • Not all SQL data types or features (you have to sacrifice something :)
  • Note that most of these limitations won’t be an issue for most of you.

Overall it makes great sense to be hooking SQL into any desktop applications. Given the simplicity of integration and small file size it makes a great case for just dropping a SQL engine into any application that needs to store data (much much sexier than managing xml files or any other hybrid data repository).

Links

Microsoft SQL CE DataSheet

Microsoft SQL CE Download

Microsoft SQL CE Homepage

– JD

Average Rating: 4.6 out of 5 based on 272 user reviews.


16 November 2006 in .Net & Code & Microsoft & Tools & Windows | Comments (0)

I was going to blog quickly about the other fifty Microsoft products that have gone gold but it seems nearly every blog on the planet is talking about it. So I thought I’d just mention that PowerShell 1.0 has been released :)

PowerShell is a fantastic replacement for your command prompt of old and has a wealth of new functionality. I’m still trying to get used to it but those who grok it completely rave about it so I’m sure the more I learn the more I’ll love it.

So if you haven’t played with it or are using the beta then go and grab it. Oh, and F7 still works in PowerShell ;)

Download PowerShell RTM

 - JD

Average Rating: 4.6 out of 5 based on 253 user reviews.


26 October 2006 in .Net & Code & Microsoft & Tools | Comments (2)

Recently I’ve been doing some work with CruiseControl.Net 1.1 and setting it up to build my work projects. I’ve been using earlier versions of CC.Net at home (what? you don’t run a continuous build environment at home? for shame…) but that has been using Nant for most of the tasks.

For this implementation I decided to try and only use MSBuild and have found it surprisingly easy to work with. Every time I think I’ve hit a wall or found something it cannot do I find some great community additions that add more tasks that I require. One project seemed to offer a considerable number of tasks.

Some of the tasks supplied include:

  • Zip & Unzip
  • Subversion support
  • NDoc generation
  • XML reading & writing
  • Control windows services
  • FTP upload & download
  • SQL Execute

There are a pile more and some of these could be done by just calling against executables but being wrapped up as tasks is a more elegant solution.

The MSBuildTasks Project

 - JD

Average Rating: 4.4 out of 5 based on 266 user reviews.


23 October 2006 in .Net & Code | Comments (3)

This long weekend I’ve been doing a fair bit of coding and catching up on some tech reading online in the domain of business objects, testing and WPF development. I managed to find my way to an article on The Code Project which discusses the use of interface I hadn’t heard of before – IDataErrorInfo and goes into some detail on how to write what I consider to be some rather clever validation code for your business objects.

The error information provided by an object implementing IDataErrorInfo is automatically picked up by controls that the object is bound to (for example, if the object has an error based on the data entered the control will automatically notify you about the error without you, the developer, having to explicitly wire it up). I won’t go into too much detail about IDataErrorInfo since it is covered in the article and has links to MSDN as well with more information.  

Paul’s article goes into further detail about implementing the business rules for validating business objects. The implementation discussed made a lot of sense and looked quite elegant, I will certainly be looking to follow this design with any business object design I’m doing in future.

Paul Stovell, the article author, has a great blog as well which he posts about WPF and some more interesting topics of .net.

Code Project Article: Delegates and Business Objects

 - JD

Average Rating: 4.9 out of 5 based on 215 user reviews.


24 August 2006 in .Net & Code & Events & Intergen & Windows | Comments (3)

teched2006.jpg

First off, it was fantastic. I’ve only been to TechEd twice but Microsoft put on a great event. Everything went unbelievably smoothly and the atmosphere was really good. We arrived on Sunday afternoon and everything was already humming.

I managed to attend quite a few sessions and all of them had great speakers.

One thing that I didn’t expect, but was happily surprised about, was that the Live initiative really is shaping up to be a compelling offering across the board. My earlier reservations have been quashed and I’m looking forward to the further development of the Live platform over the next six months. I guess the key message I would share about this is that perhaps while the live.com portal might not be your kettle of fish, the other services really are quite compelling.

Speaking of Live, the Web in general was well discussed. Rowan Simpson from TradeMe presented a few times and was an excellent speaker. I think he added some balance to the event – making it clear the back end doesn’t matter if you don’t solve a problem for your end users in an easy to use manner. Congratulations to them on achieving 1 billion page views per month as well, that’s impressive.

Office 2007 was represented very well at TechEd. I attended several sessions about Office and picked up a few things. The whole stack of Office, Vista and Live is going to be compelling.

Intergen, where I work, was running the hands on labs again this year which is always enjoyable and a great way to meet other people attending TechEd. Hopefully everyone tried them out and learnt a lot.

TechFest was a heap of fun. It was similar to last years event however that was great considering the success of last year. This was another great place to meet other people in the industry but, sadly, we couldn’t convince any of the ladies at TechFest that were near to jump up on my shoulders for The Feelers however I was pleased to see more representation of woman in technology at TechEd this year :) . Some of us ended up at Globe and had a great time there until the wee hours (as well as meeting even more great folks).

Then last night we had the mad dash to the airport. As much as I love TechEd it’s just long enough to make me appreciate being back in my own bed :) I’m sure everyone else had a great time.

This post is quite a quick brain dump of my thoughts, I’ll probably follow up over the next few days with this I remember as being useful or cool :)

- JD

Average Rating: 4.6 out of 5 based on 282 user reviews.


18 August 2006 in .Net & Code | Comments (0)

Just a heads up to folks who still work with Visual Studio 2003 that Visual Studio 2003 SP1 has been released and includes a tonne of fixes. A reasonably big 150MB+ download but should be worth it.

Download SP1 here

Read the release notes here

 - JD

Average Rating: 4.5 out of 5 based on 248 user reviews.


17 August 2006 in .Net | Comments (2)

Lawrence from Intergen has started his blog which I’ve hosted on my domain. Rather than being the usual blog about random things Lawrence is writing in the style of a game journal. He’s currently developing a cool flight game using Managed Direct X 9.0c and C# (don’t all geeks want to write a game? :) ). I’ve been having a play around and so far I’ve been really impressed.

You can check out his screen shots which have come a long way already and perhaps discuss and provide comments about his development. It will make his day :) )

RSS Feed Sharky’s Blog

 - JD

Average Rating: 4.4 out of 5 based on 196 user reviews.


17 August 2006 in .Net & Code | Comments (3)

Having only been out a couple of days there are already plugins for Live Writer coming out which is fantastic to see. There have been some people ripping on Live Writer for missing some features (like tagging and flickr support) and disregarded what I see as one of the most powerful features of Live Writer – a pluggable API (download the SDK here).

Already up are the following plug-ins:

  • Flickr4Writer – A plugin to insert your images from Flickr
  • Tag4Writer – A plugin to insert tags (Including Technorati integration)
  • Currently Listening – For all the people who think we want to know what you’re listening to ;)

I’m looking forward to seeing some of the more funky plugins that come out over the next few weeks :) Keep in mind these are first version plugins so your mileage may vary.

 - JD

Average Rating: 4.9 out of 5 based on 179 user reviews.