I'm famous: http://blogs.technet.com/itproaustralia/archive/2008/03/06/technet-vodcast-of-the-sydney-heroes-happen-2008-event.aspx

Watch out for the good looking guy at the end... :-p

I had a great time the other day at the launch event. It was great getting a chance to check out the new improvements in VS, SQL and Windows 2008. And I had a blast catching up with the DPE guys. The free copy of Vista and Windows Server will definitely not go to waste.

BTW, thanks for putting me on the spot Deeps... ;-)

Technorati Tags:

I managed to download and install IE8 today, after hearing it was available from the Microsoft web site.

The overall setup experience was quite painless, and it managed to keep all my settings from IE7.

The first page that loads after installing introduces the new features of IE8 - i.e. Activities, WebSlices and IE7 Emulation.

Activities

Activities give users ready access to the online services they care about most from any page they visit, and developers gain an easy way to extend the reach of their online services. It’s as simple as selecting text to get started with an Activity.

First up, I installed the Windows Live Translator activity and browsed to a site. Highlighting some text gave me a context menu that had the translator activity in it:

image

I thought this was quite a nice little feature... :)

 

WebSlices

Developers can mark parts of webpages as "WebSlices" and enable users to monitor information they rely on as they move about the web. With a click in the Favorites bar, users see rich "WebSlice" visuals and developers establish a valuable, persistent end-user connection.

So next I thought I'd try the Facebook WebSlice. I logged into facebook and installed the slice from the toolbar:

image

image

This put a new button in my favourites toolbar. But unfortunately, it didn't work too well...

image 

I also noticed that facebook wanted me to upgrade to IE6 or any other browser...

image

So I thought I'd try...

IE7 Emulation

Hitting the IE7 Emulation button on the toolbar actually annoyed me a little:

image

Couldn't this just emulate the tab...?

Anyway, I opened another IE window, emulated it and voila! The facebook warning disappeared. That's the extent of my testing this feature for today... :)

Other Niceties

The Developer Tools is built-in for some testing fun. I'm really looking forward to using it for sifting through page responses and comparing some of the IE7 and IE8 responses.

The "Are you sure you want to close all tabs" message that appears when you try to close IE with multiple tabs open has morphed to give you the option of just closing the current tab. I always thought a cancel button in these cases is silly because the big red cross in the top right and the Escape button are just as good.

image

The Address Bar changes how you look at the address of the current page by only making the domain name text black and the rest gray. I'm not sure whether this is for security or just usability, but I like it.

image

Comments

It's definitely RAM hungry. Only 5 tabs open and already 110MB in use...

image

It hasn't crashed in the last hour so that's good. :) I'm planning on just using it like IE7 and seeing how I go. I'll definitely keep posting about any oddities and niceties I come across.

Scott Hanselman posted about some cool Visual Studio themes so I thought I'd put mine out there.

image

As you can see, it's the simple white-on-black. It uses blue class names, purple strings, orange key words, and yellow highlighting. One of the things that some miss is the snippet fields. I've ensure that the fields are white on green and the dependant fields are green highlights.

I've been using this theme for quite a while now and am really enjoying it. It's a variation of something Paul Stovell gave me a while back.

It's available for download here. Give it a go and let me know what you think...

I was considering getting a KVM the other day, but stumbled across an open source application named Synergy.

It's a pretty nifty little app that lets you share a keyboard and mouse across two or more machines. This means that I can have my laptop sitting next to my desktop monitor and use the keyboard and mouse hooked up to my desktop to control the laptop.

The setup experience is the only hitch to this application. It's not totally user friendly, but it's not that hard to figure out.

Firstly, chose which machine will be the server and run the application on it. Choose the option "Share this computer's mouse and keyboard (server)" and click Configure.

image

Then, setup a screen for the server and the client machines by clicking the + button under the Screens list. This will give you a screen where you can type the names of the machines and modify the behaviour of the switch. It's probably best to leave the behaviour as standard at first and modify this later if required.

image

Now you should have (at least) two machine names in the screens list, it's time to setup the switching behaviour. Under the Links list, there are a couple of text boxes and drop downs. The easiest way to tackle these is to picture where your laptop screen is in relation to your desktop screen. My laptop is on the left of my desktop so I just selected "left" from the first drop down, then my desktop name, then my laptop name and pressed the + button. This means that when my mouse pointer goes over to the left edge of the desktop screen it will become my laptop's pointer.

clip_image001

I also need to setup the behaviour for how to go back to the desktop screen, so I just selected the opposite of what I had before.

image

Now I press OK to close the configuration screen and press start to start the server. If you haven't set it up properly you will get a crazy error message, so just close Synergy and start again. If you're running Vista (and/or a good firewall) you should be prompted that Synergy is trying to do something funny, so just let it. If you're running a firewall and you're not prompted, go to the firewall settings and make sure that Synergy is allowed to communicate.

Lastly, I need to connect my laptop to the server. I did this by opening Synergy on my laptop, which is a client machine, choosing the "Use another computer's shared keyboard and mouse (client)", and entering the name of my desktop (server) PC.

image

Now when I press start (and cross my fingers) the client connects to the server and I can freely use my two computers with the same keyboard and mouse while Synergy runs with an icon in the system tray.

That's it! It's simple was you get through the slightly cryptic UI, and it really works quite well.

Technorati Tags: ,

Today was my first day presenting at RDN. It also marked my second and third user group presentations ever.

I can quite safely say that I am one of the least presented members of the Readify team, which is the main reason I took up the challenge of presenting at this level.

The Depth session was presented by Damian Edwards on CSS with ASP.NET using Visual Studio 2008. It was a really good session that gave me a great insight into CSS and hopefully will stop me from ever using tables again... :-)

My presentation was on SQL Server Integration Services, specifically in SQL Server 2008. The slide deck was not that intense and basically addressed the questions "What is SSIS?" and "What's different in SSIS 2005 and 2008?" It will be available soon on the RDN Downloads site.

In the meantime, I thought I'd put up a few links to the resources I used in preparing for this presentation.

As I mentioned tonight, I find the MSDN library help quite useless when it comes to developing SSIS packages. The SSIS Books Online site does have a couple of good intro and how-to topics.

For my demos, I used the November CTP of SQL 2008, which is available as a VHD from MSDN. This is a time-bombed installation of Windows Server 2003 with the SQL Server 2008 CTP pre-installed and set up with all the important features enabled, such as Reporting Services, Integration Services, etc.

For the "What's new..." I referred to MattM's blog. Specifically the excellent What's New in SQL Server 2008 Part One and Part Two summary posts. These link to a few other good write-ups as well.

Then there's CodePlex. The AdventureWorksDB and AdventureWorksBI sample database installations, along with the SQLServerSamplesIS SSIS samples are excellent resources.

For those new to SSIS and still living in the DTS world, all I can say is "what are you waiting for?!" :-)

Last week I posted about my PD experience, including work on the new ASP.NET MVC. In this post I mentioned that there is a bug in the MVC that doesn't allow you to access control on an MVC content page from the code-behind.

Well, today I found a post on Troy Goode's site (that I should have found a week ago... :-)) that shows you how to implement the MVC Template Fix to get around this bug by using the "Convert to Web Application" function in VS2008 or by fixing the template files included in the MVC. This fix basically involves adding a designer code file in the page templates and referencing it in the vtemplate file.

Apparently this will be fixed in the next release of the MVC, for those who can wait...

Ok, so I just posted less than an hour ago, but now I've found something worth talking about. :)

After working my way through Phil Haack's blog on TDD with DI using StructureMap, I found a few things that I thought may be helpful.

Firstly, don't try to use a LINQ to SQL data context as your concrete implementation of an interface. Apparently that doesn't work. :) I tried this and received a StructureMapException:

StructureMap Exception Code: 155 - An exception occurred while trying to create an InstanceFactory for PluginType MvcApplication.Models.IPostRepository,MvcApplication

The inner exception was:

StructureMap Exception Code: 200 - Could not find an InstanceMemento for the requested InstanceKey "LINQToSQL" of of PluginFamily MvcApplication.Models.IPostRepositor

Nasty... As soon as I swapped in a concrete implementation called PostRepository that simply called the methods I had created on top of the data context, everything worked.

Secondly, following the code for the StructureMapControllerFactory object will lead to a compile error because you need to specify a return type from the ObjectFactory.GetNamedInstance method. I used the generic version because I'm too lazy cast now days. That makes the code inside the try block:

return ObjectFactory.GetNamedInstance<IController>(controllerType.Name);

Lastly, if you want to use code instead of a configuration file for the StructureMap configuration, add the following to your Global.asax Application_Start event handler:

StructureMapConfiguration.UseDefaultStructureMapConfigFile = false;

StructureMapConfiguration.BuildInstancesOf<IPostRepository>()

    .TheDefaultIsConcreteType<InMemoryPostRepository>;

StructureMapConfiguration.BuildInstancesOf<IController>()

    .TheDefaultIsConcreteType<BlogController>;

So now I have a functional website that uses DI and is unit testable. Hope this helps someone else out there...

After a great start to the new year, I've taken the first three days back at work as PD days to catch up on a few things I've been missing out on. I've had to push my learning curve to the limit, but I've managed to cover off quite a few topics and summarise it all into one not-so-short post.

The gold resource for the week has been the new VS2008 Training Kit that includes a set of presentations, hands-on labs and demos. The presentations I've looked at haven't been much of a help to me at all, but the hands-on labs and demos have been key to me while learning about these technologies.

The first topic I was concerned with was the new features of C# 3.0 and .Net 3.5. I've heard and seen a lot about them, but I've never had a chance to sit down and get to know them. The What's New in C# 3.0 lab in the training kit covers these topics and gives an excellent introduction to how to use them. It takes about an hour to work through an introduces the following concepts:

  • automatically implemented properties - public int CustomerID { get; private set; }
  • object and collection initialisers - Customer c = new Customer { Name = "John", Location = "London" }
  • implicitly typed local variables and arrays - var complexList = new SortedDictionary<string, List<DateTime>>()
  • extension methods - public static List<T> Append(this List<T> a, List<T> b) { ... }
  • lambda expressions - customerList.FindAll( c => c.Location == "London");
  • expression trees - Expression<Func<int, int>> addOneExpression = n => n + 1;
  • anonymous types - var customer = new { Name = "John", Location = "London" };

Next up was AJAX. I've had some experience in the past with very very very early AJAX (i.e. XmlHttp... :-)) and know about how it all works, but I've never had the chance to put together a website that utilises it. Once again, the training kit labs came in very handy here. The Introduction to ASP.NET AJAX lab was a great introduction to implementing an the ScirptManager and UpdatePanel controls in an existing website to add AJAX functionality and introduced other concepts such as connecting to WCF services from JavaScript, using LINQ data sources and the AJAX Control Toolkit. The second lab on the topic was Building AJAX/JSON Services Using WCF, which showed the power of the combination of AJAX and JSON. However, I think it was a bit confusing in that it utilised the AJAX Control Toolkit too much. I would have liked to actually see some JSON strings flying around. :-)

I've also been concentrating some effort on the new ASP.NET 3.5 Extensions. If you haven't heard about it before, it's basically a collection of toolkits that new functionality being added to ASP.NET 3.5 and ADO.NET in 2008. These functions include:

  • ASP.NET MVC
  • ASP.NET Dynamic Data
  • New additions to ASP.NET AJAX
  • ADO.NET Entity Framework
  • ADO.NET Data Services
  • Silverlight Controls for ASP.NET

The download website has a few videos on it introducing all of these functions along with a link to the quickstarts that do a great job of diving deeper. I actually used ScottGu's blog more... :)

The area I've concentrated on is the MVC. I started by going through the a few posts ScottGu made a little while back (all in this post). These are an excellent starting point for someone wanting to get their hands dirty. However, there are a few small issues with some of the code that is probably due to it's pre-release nature (or Works on My Computer syndrome :-)). The major issue was that controls on an MVC content page are not accessible in the code-behind. You'll see this if you follow the sample in Scott's Part 1 blog post and try to render the Category list using a ListView control because when it comes time to set the list's data source there is no list in Intellisense. Also, the TestViewEngie class mentioned when developing tests for the controller using an IViewFactory is not available in the MVC framework. Phil Haack has blogged some excellent methods for TDD with DI and Testing Routes using Rhino Mocks and StructureMap.

One thing to watch out for in URL routing is that the routes are taken in the order they are created. For example, in Scott's walk through he mentions tweaking the routing rules to add the ability to route /Products/List/Beverages to pass the category to the List action in the Products controller. This would be done easily by adding the following route code to the Global.asax file's Application_Start event handler:

RouteTable.Routes.Add(new Route
{
    Url = "/Products/List/[category]"
    Defaults = new { controller = "Products", action = "List", category = (string)null },
    RouteHandler = typeof(MvcRouteHandler)
});

I added this under the "/[controller]/[action]/[id]" and whenever I went go to /Products/List/Beverages I would receive an error because the category parameter for the List action was null. Moving the route to the top of the method (i.e. so that it is the first added to the list) fixed this. This behaviour is mentioned in the quickstarts:

"The order in which Route objects appears in the Routes collection is significant. Route matching occurs from the first route to the last route in the collection. When a match occurs, no more routes are evaluated. Typically the default route will be the last route."

By the way, I really suggest watching the video on Dynamic Data available on the download website because it just rocks! It's very simple and very powerful. When you first run a project it builds all the controls and pages requires by the data model. It then allows you to easily extend your data model by using partial methods and add validation and rendering hints using attributes on partial classes. You can also go through and modify all the generated pages. Definitely one of the next stops on my PD roadmap... :-) Once again, Scott's got good blog post with a walk-through and some excellent links.

I'm going to finish off on a cool little download I found the other day. It's a two page poster of some of the most useful default key bindings (i.e. keyboard shortcuts) available in C# with Visual Studio 2008 available at the Microsoft Download Centre.

As a recent purchaser of a set of bluetooth headphones, I frequently run into the situation of loading a media file before realising that the wrong default audio device is selected. As a result, I've had to shut down IE or WMP in order to change the default audio device before I can hear the audio from my chosen media.

Thinking this was just an issue with Vista, I put it to the back of my mind and tried to keep a mental note. Today I checked my blog subscriptions and found that (once again) Larry Osterman has done a great job of describing why this happens.

Larry's short answer: "It's the responsibility of the application to deal with handling errors.  The audio stack bubbles out the error to the application and lets it figure out how to deal with the problem."

What I love about Larry's blog is that he always gets into the nitty-gritty. In this blog post, he goes into how applications access Vista's audio functionality and what developers can do to make their applications handle this situation.

My question for today is, if any application can handle this situation, then why doesn't WMP 11...?

Larry Osterman's WebLog : What happens when audio rendering fails?

Technorati Tags: ,

As I mentioned in my previous post, I did a short presentation on using loop containers in SSIS.

I promised a few people that I'd publish my code, so here it is.

For those that didn't make it, the package demonstrates a basic ForEach Loop container. I decided to demonstrate something that was absolute hell to accomplish in DTS.

Back in the SQL 2000 world, if you wanted to send an automated email to customers, the basic procedure was to write a nasty ActiveX script that would hit the database, loop through the results, create and send an email, then update the database.

In SSIS this is easily accomplished with a ForEach Loop. I show this in the sample from my demo that executes some SQL using an Execute SQL Task to produce a Result Set and looping through the rows with a ForEach loop container to send an email before updating the current row with another SQL Task. I created the package (almost) from scratch within 10 minutes in my demo on Saturday.

I've tacked in a change, which enables a package configuration to demonstrate how you would configure the package in a more practical environment. Please check out the Readme to get an idea of what you need to do to get the package working.

If you have any issues with the package, leave a comment or use my Contact Me form to send me an email.

This year I not only attended, but presented at my first SQL Code Camp hosted by Greg Low and SQL Down Under.

Overall, it was a great weekend. I took a lot out of several presentations and had the chance to chat with some of the *real* SQL nuts including Kevin Kline, Rob Farley, Dave Glover, Peter Ward, Jeff Wharton, Peter Myers and of course Greg Low.

I also really enjoyed chatting to several other people about my presentation on SSIS and various other side topics.

I'm looking forward to next year. Hopefully they'll have me back... :)

It looks like Microsoft's trying to improve the user experience of their mobile devices.

As a recent purchaser of a WM6 Motorola Q 9h, I think this is a great step forward. I've played with Blackberries, Nokias and iPhones and when I pick up my Q I can't help feeling that WM6 could have been done better.

I like the fact that I can do just about anything on my phone, but I think that it's just become too complicated. I've always thought that the way the Xbox Dashboard works with its Blades was a great concept that could be put into other interfaces in the Microsoft world. When HTC announced the Touch I was quite excited because it looked like they were beginning recognising this.

I'm definitely liking the look of the interface put forward in the patent photos. Hopefully it's not limited to the touch screen devices.

Microsoft patent app shows off new user interface for mobiles - Engadget

Technorati Tags: ,

The good people at PC Mag have gotten their hands on the Vista SP1 Beta, and are apparently quite pleased with it.

It seems that the performance and responsiveness of the overall system is obviously increased. The time taken to wake a machine from hibernation along with copying and extracting files has been noticeably reduced.

A couple of security enhancements have been made as well including the ability to use BitLocker on secondary hard drives, signing Remote Desktop files, the addition of Secure Socket Tunneling Protocol and the ability for anti-malware software to extend the 64-bit kernel.

The only issue reported in the review was that upgrading an existing installation of Vista didn't install properly on one of the test systems.

Continue reading for the full review...

Microsoft Windows Vista SP1 Beta - Review by PC Magazine

New 80GB HDD and 8/4GB Flash Zunes have been announced to be released sometime in November.

New features?

  • funky new dpad
  • h.264 and MPEG decoding
  • WiFi sync to host
  • 3x3 file sharing DRM has been changed to a 3 play limit (i.e. no more 3 day limit)
  • Zune PC software rewritten (from scratch apparently)...
  • Zune store will be DRM FREE!!!

Can't wait to see some reviews. No word on if they ever plan on being released outside the US though...

Microsoft's new Zunes: officially in 80, 8, and 4GB sizes - Engadget

Technorati Tags:

Here's a little problem that caused me a couple of hours of pain...

I've been working on an SSIS package that deals with some data in a Data Flow Task and transforms it to XML. Instead of using an in memory record set as the destination of the data flow and putting all the data into an XML string, I decided that I'd use a script task as the destination and write a few lines of VB (grr... =P) to write the results to an XML string and set a variable with the result. Sounds simple enough right? 3 hours later, I was still struggling to write the results to the variable until I stumbled on this little gem.

Given that the Me object has a Variables object which contains the variables that you have given the task access to, you'd think the way to set the variable would be:

Me.Variables.XmlResult = xmlString

Of course, this is wrong. Doing this gives you a lovely COM Exception stating (in a rather cryptic way) that you can't set the variable.

So, how should you do it...?

Dim variables As IDTSVariables90
Me.VariableDispenser.LockForWrite("XmlResult")
Me.VariableDispenser.GetVariables(variables)
variables("XmlResult").Value = document.OuterXml
variables.Unlock()

<sarcasm>How obvious is that...?</sarcasm>

Technorati Tags: , ,