Skip Navigation Links

Posts for: Mar 2007

CSharpZealot : Swag for the community or sponsorships..

I've given a couple of copies (signed smile_regular) to CSharpZealot who will be giving them away as prizes in competitions:

Link to CSharpZealot : Swag for the community or sponsorships..

Cool stuff!

posted on 3/30/2007 11:51:10 AM ( 1 Comments )


Creating Responsive Portals - Async Tasks

Web portals are the ultimate companion to that cool SOA architecture you've been working on.  With all of those great line-of-business (LOB) services that you've created, web parts seem like the ideal way of allowing your users to interact with that data. 

Getting started with this is real easy.  You write 20-30 lines of code and whoosh!... your LOB data is right up there on your portal.

protected override void OnPreRender(EventArgs e) {
    base.OnPreRender(e);

    WeatherType weather = GetWeather();
    img1.ImageUrl = string.Format("~/images/{0}.gif", weather.ToString());
}

In this piece of code we can see that in the PreRender code of our web part that we make our service call - GetWeather() - and use the data that is returned from that call to display a relevant image to the end user.  Pretty typical code really. As part of the processing of the portal page by ASP.NET, your web part will get called upon to render itself.

Control execution within the page lifecycle

 

Of course, as time goes by, you will undoubtedly add many new web parts to your portal page: Calendars, Weather, CRM data, Reports, etc.  And each of these will trundle off to your SOA services, get their data, and come back with their own view for your users to use.  Of course there's a problem here.  Because of the synchronous nature of the ASP.NET web page where controls are loaded and executed in sequence, each control adds time to the overall processing length of the page:

 

Multiple Control execution within the page lifecycle

 

So now you have a page which - with all of those calls to external resources - is taking ages to load... maybe 10-20 seconds for a page with only a few web parts on it.  What to do?

Given that each of these web parts are independent of each other we'd ideally like to run them in parallel so that we don't wear the large time penalty for the whole page.  Something like this:

 

Asynchronous Control execution with the page lifecycle

 

In ASP.NET 2.0 they actually added support for easily creating pages which allow tasks to be run asynchronously in a manner similar to this.  All that you have to do to gain these benefits are to include an Async="true" attribute to your Page directive so that ASP.NET knows to implement the IHttpAsyncHandler in the page, and then write your code so that it executes within asynchronous task blocks.  There's an excellent article by Fritz Onion which discusses this architecture here:

http://msdn.microsoft.com/msdnmag/issues/06/07/ExtremeASPNET/

In the article, Fritz highlights the fact that we can simply use the existing asynchronous interfaces that come with things like ADO.NET and Web Service generated proxies in .NET and plug them into the architecture.  When you need to execute asynchronous tasks for which no asynchronous interfaces already exist - such as reading from the file system - then you will need to queue your own delegate to to that work:

private delegate WeatherType DoStuffDelegate();

IAsyncResult BeginGetWeather(object src, EventArgs e, AsyncCallback cb, object state) {
    DoStuffDelegate d = new DoStuffDelegate(GetWeather);
    return d.BeginInvoke(cb, state);
}

void EndGetWeather(IAsyncResult ar) {
    DoStuffDelegate d = (DoStuffDelegate)((AsyncResult)ar).AsyncDelegate;
    WeatherType weather = d.EndInvoke(ar);
    img1.ImageUrl = string.Format("~/images/{0}.gif", weather.ToString());
}

Notice that in this code, our expensive GetWeather() operation is queued to run asynchronously.  The final thing is to show the pattern that you should implement to ensure that your web parts are ready to take advantage of a hosting page that is set to Async="true":

if (Page.IsAsync) {
    Page.RegisterAsyncTask(
        new PageAsyncTask(
            new BeginEventHandler(BeginGetWeather),
            new EndEventHandler(EndGetWeather),
            null, null, true)
    );

} else {
    WeatherType weather = GetWeather();
    img1.ImageUrl = string.Format("~/images/{0}.gif", weather.ToString());
}

Now our web part will always work, but will allow our users to gain the benefits of asynchronous processing when it is enabled at Page level.

posted on 3/30/2007 11:32:42 AM ( 0 Comments )


Dinosaurs

Quote: It's fine to be stuck in the .NET 1.x and .NET 2.0 world... you can build good apps there and you can make great money.  You just can't change the world!

Quote: 1.x and 2.0 are dinosaurs

Quote: If you aren't "thinking" in LINQ and WPF then you are probably risking becoming tomorrow's VB6'er

Quote: Unless you jump onto things like LINQ and WPF and WPF/e then you will end up:

A) Not being able to hire smart people
B) Having a baby
C) Having way too much code to maintain
D) Having large amounts of code which cannot exploit multiple processors properly

Quote: Set up your CI processes and build systems set up properly so that you can really sleep well at night smile_shades

posted on 3/29/2007 11:15:00 PM ( 0 Comments )


Synchronizing data using Sync Services for ADO.NET

To read later...

Steve Lasker's Web Log : Going N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server Compact Edition

posted on 3/27/2007 7:53:56 AM ( 0 Comments )


dbartholomew.net has CardSpace authentication

Dan is rapidly becoming our in-house Card Space guru and now he's added it to his blog.  You can try it out here: 

Link to dbartholomew.net > Home ( DNN 4.4.1 )

How long will it be before we can add this to our own website I wonder smile_regular

posted on 3/26/2007 9:10:51 PM ( 0 Comments )


World Cup Cricket - Google Search Ranking

I just noticed that my little World Cup Cricket Gadget now appears on the first page of Google results for the term "World Cup Cricket":

http://www.google.com/search?hl=en&rls=com.microsoft%3A*&q=World+Cup+Cricket

Cool! smile_regular  In other good news, downloads have finally topped the 100 mark as represented by the following daily download graph:

And as we can see in the following chart, downloads from Australian users total the most at 34, closely followed with downloads by users from India (23) and the Americas (20):

Lastly I thought that I'd show the UI of the Gadget that is displayed for a match in progress. In the following picture we can see that India are playing Sri Lanka.  From the text at the bottom of the gadget we can deduce that Sri Lanka must have batted first and that India now require 228 runs at 5.36 runs per over to win.  Originally I had hoped to have a detailed view - to see match scores and stuff - but given the short timeframe in getting this gadget up and running there just wasn't the scope to get that feature written.

I've also noticed that all of this extra attention - both through the World Cup Cricket Gadget and My Book - hasn't done my blog subscriptions any harm as the subscription count now stands at over 300! smile_nerd

posted on 3/24/2007 5:55:38 AM ( 0 Comments )


Using Windows Live ID

Now you can use the Windows Live client stuff to authenticate users using their Windows Live ID.  Read about how to do this here:

Link to LiveSide - Developer Blog : Writing A Quick Application That Uses Windows Live ID

posted on 3/23/2007 12:27:29 PM ( 0 Comments )


Danger! High Voltage

posted on 3/22/2007 5:21:10 PM ( 0 Comments )


Things are hotting up in the World Cup

The round of 8 starts this weekend and Saturday (West Indies time) will see a battle between the top two teams Australia and South Africa.  So far we've seen some huge wins by the top teams versus some of the cricketing minnows; we've also seen some massive upsets - including the Scottish victory over Pakistan!  Added to that they are now treating the sudden death of Pakistan's cricket coach - Bob Woolmer - as suspicious.

Anyways, my little Cricket World Cup Gadget is still chugging away with another dozen or so downloads since my post yesterday:

The biggest downloaders so far have been the Aussies, followed by the cricket mad Indians, then followed by "The Americas" - what happened to those crazy Kiwis?  Have they already accepted that they cannot win? smile_omg  Here's the overall download graph by country:

One thing that has surprised me is that I haven't had a single comment or feature request email so far... woohoo! smile_regular  Regardless, I think that I'll sit back and wait for the Sri Lanka v Bangladesh game tonight.  It should be interesting.

posted on 3/21/2007 9:30:12 PM ( 1 Comments )


Applied WPF

We've done it again... first Juval visited our shores to deliver the WCF Master Class - the most in-depth class that we've seen on WCF to date.  Now we've secured Ian Griffiths to come and deliver the WPF sibling - Applied WPF:

Link to Applied WPF

Ian is co-author of the Programming WPF book which is considered to be one of the authoratative sources for programming real world WPF applications.  This 4 day course starts on the 23rd April so you'd better be quick if you would like to catch this one-off opportunity to learn from one of the real masters of this technology.

Book Now!

With the rise of WPF as the UI technology and the emergence of WPF/e as a very serious offering in the web space this is something that you simply cannot afford to miss.

posted on 3/21/2007 5:28:54 PM ( 0 Comments )


Virtual Earth Seminar : Sydney 2/4/07 and Melbourne 3/4/07

Just saw this link via Frank's blog:

Link to frankarr - an aussie microsoft blogger : Virtual Earth Seminar : Sydney 2/4/07 and Melbourne 3/4/07

This should be interesting.  The days of being able to call yourself a web developer just because you've mastered the DataGrid are long gone.  Today's modern web application is a dynamic, interactive affair.  And because of this, mapping technology and the role it plays in providing visual data to mash-ups is going to increase massively.

posted on 3/21/2007 1:29:34 AM ( 0 Comments )


World Cup Cricket Gadget - Small download increase

Downloads of my World Cup Cricket Gadget slowed over the weekend but have increased slightly on Monday and Tuesday so far.  Today I thought that I'd show the "View" that is presented to the user for a completed game:

In that picture you can see that you are presented with the information about the result of the match, including who was named man of the match.  The following graphs provide some insights into the 62 downloads that have occurred so far:

 

Download By Country:

Download By Date:

posted on 3/20/2007 6:16:29 PM ( 0 Comments )


World Cup Cricket Gadget - Progress Report

OK, so I'm back in Australia and wanted to provide a little status report on the progress of my World Cup Cricket Gadget.

The Gadget itself allows you select a game from a list and display the details of that game.  The list looks like so:

As you can see, the list is divided into 3 groups: Current, Future, and Completed.  Selecting a Completed game will display the result for that game.  Selecting a Current Game will display a progress score if that game has started.

The gadget hasn't exactly set the world on fire.  In the 4 days that it's been online here are the download stats on a per country basis:

 

On a per-day basis the download figures look like this:

 

posted on 3/19/2007 10:58:02 PM ( 0 Comments )


The World Cup Cricket Gadget - CTP Edition

In my world - the world of .NET development - there has been an increasing trend to release CTP (Community Tech Preview) branded software.  In releasing software early, Microsoft can get software out early to users while not increasing the user expectation to the point where they will cop too much flack that the product is not yet complete.  In the same tone I bring you the World Cup Cricket Gadget (CTP Edition).

To get the gadget I simply ask that you select your country before I present you with the link to your gadget.  Over the next month I'll attempt to provide some statistics about where the Gadget is being used and how many downloads I get.  It will be fairly primative but interesting nontheless.

Let's get one thing straight upfront - there are some pretty significant improvements which can be made to the gadget.  People asked and I have delivered.  If you play nicely and be patient, then I'll take the time to produce richer versions when I get back to Australia on Sunday.  Because of the demand I really wanted to get this release out before my flight from Seattle to Sydney tomorrow.  This version really just allows you to:

  • See what games are coming up
  • View scores and man-of-the-match information about completed games
  • View constantly updating scores of matches in progress

Things that I can forsee coming in the next couple of releases:

  • 1-click install - no need to save as a .zip and rename to .gadget, simply click and install
  • richer information about upcoming games
  • more information about in-progress and completed games

So keep your eyes on my blog and I'll announce it as I release enhancements.

Cheers!

posted on 3/16/2007 4:47:11 PM ( 0 Comments )


World Cup Gadget

This week I've had received quite a few emails and comments on my blog from people all over the world asking me to release a Sidebar Gadget to display scores from the Cricket World Cup.  The catalyst for these requests was a post that I did about a cricket gadget a little while back:

My little Cricket Gadget

I'm still in Seattle until tomorrow but I'll try to write one today and release it before my flight back to Australia tomorrow.  I'll post a new blog entry if and when I have it ready.

posted on 3/16/2007 12:25:08 AM ( 0 Comments )


Time is money, but is money time? « notgartner

Seriously!  Some of Mitch's posts should appear on that Vista ad... "Wow!".  Here's his latest gem:

Link to Time is money, but is money time? « notgartner

In this post, Mitch discusses the idea and the usage scenarios around a the idea of selling time.  Listen to this one...

You miss a flight and you trade time with the person you were catching up on dinner with to ensure that you can have that dinner date at some point in the future

Wow, amazing.  So, using Mitch's theory I could actually pick up the phone and speak with the person that I was going to have dinner with.  I could then ask them if we could change the date of our dinner to some point in the future.

Using Mitch's theory I think that you could even get people to come in to your workplace and exchange their time - to do jobs and stuff - for money.

Revolutionary Mitch! smile_regular

posted on 3/16/2007 12:20:45 AM ( 0 Comments )


Code Camp Oz 2007

Code Camp Oz is fast arriving and this year Readify are making available some special T-Shirts to mark the occassion, you can order your own CodeCampOz custom T via the following URL: 

Link to Code Camp Oz 2007

The cool part of this is that you can add your own custom message to the back of the T-Shirt!  So go order one and send a message at Code Camp this year smile_regular

See you all there... can't wait!

posted on 3/14/2007 11:51:35 AM ( 0 Comments )


The fastest elevator in the universe

I've been a bit slow out of the blocks in blogging about the MVP Summit which takes place this week but Mitch and I arrived in Seattle yesterday.  Mitch has written about our journey and the associated delays here.  We did have delays but thankfully, we didn't miss our luggage as Frank did when he came here last week!

Mitch and I are staying at the Hilton hotel. 

The highlight for me so far has been the hotel elevator.  Here they must be using wormhole technology because even though I'm staying on the 15th floor I can get from the lobby to my floor in an instant... truly!  Seriously, I get in at the lobby, press '15', and woooooosh... I'm there.  There's not even the typical feel of inertia that you would get from such a fast ride. 

Tomorrow I think that I will take it for a spin to another galaxy.

The wormhole technique used by the elevator at the Hilton

posted on 3/13/2007 6:46:29 AM ( 3 Comments )


My Interview on ASP.NET Podcast is up

Towards the end of last year Wally interviewed me about my book and the interview is now online.  The audio file is available via the following link:

 

ASP.NET Podcast

posted on 3/6/2007 12:01:22 PM ( 5 Comments )


OneNote 2007 - The face that SharePoint should always have had!

Running 3 main computers (4 if you count my Windows Mobile device) gives you a good feel for the issues with managing and synchronizing content between them.  My current solution is that I keep all of my content on servers and use clients that can connect to them.  The current solutions that I'm running are:

  1. Outlook/Exchange for email (duh!).
  2. VSTS/TFS for code.
  3. OneNote/SharePoint for all of my notes and drawings.
  4. Groove/SharePoint for all of my documents and files.

If you haven't used OneNote 2007 I would highly recommend that you give it a go.  The added flexibility gained with the addition of Notebooks is really useful as it allows you to create a Notebook for each thing/project in your life.  For example, I'm running a notebook for each project that I'm managing and one for my personal stuff (which I password protect). 

The cool part is that these Notebooks can actually be located in SharePoint - meaning that you can share them with team members.  Just like a Wiki only a very rich version with many more features than your standard web based wiki.  Some of the nicest features are:

  1. I can work in both a connected and disconnected state.  This allows me to work while on a plane and sync my changes up when I hit the ground.
  2. Search.  The OneNote search can even search text within images.  OneNote notebooks stored in SharePoint will also participate in SharePoint search.
  3. You also get the Tag functionality to be able to mark your content with tags.  
  4. Ability to embed rich content - such as files, sounds, etc.
  5. Ability to Ink.

posted on 3/3/2007 12:16:36 PM ( 2 Comments )


My WF Webcasts are up

Recently I put together 3 Webcasts to show how to use the State Machine workflows in Windows Workflow.  You can view them here:

  1. Introduction to State Machines
  2. Architecting State Machines
  3. Using Persistent Workflows

You can view all of the Readify Webcasts on .NET 3 technology via this landing page:

http://www.readify.com.au/tech+tutor.aspx

posted on 3/2/2007 7:58:09 PM ( 2 Comments )


My Sidebar Gadget article is up...

During the past month I think that we changed the mailing process for our External Newsletter so that it is now directly run off of our contacts in CRM. I think that in updating to that process I may have been omitted because I don't remember getting a copy.  Anyways, it went out and my article was the feature article for the month.  It was about Vista Sidebar Gadgets.  You can read it here:

Tech Talk

Oh yeah, don't forget to sign up to receive the newsletter!  I believe that the feature article for our next newsletter - due in a couple of weeks - was written by Chris Burrows and is on the topic of how to professionally manage the processes of building and releasing your SQL Code.

posted on 3/2/2007 7:53:30 PM ( 0 Comments )


NYT Reader

This afternoon I flew back to Canberra from Melbourne and was seated next to a lady right up at the back of the plane.  We both started out reading the Qantas in-flight magazine and when I finished she noted that there wasn't really anything terribly exciting in there this month - we both agreed on that point!  I then mentioned to her that I was planning to read the New York Times once we were in the air.  Once we were in the air and the seatbelt sign when off I immediately pulled out my new Tablet, folded the screen over, and started up my NYT Reader.

This is a perfect reading experience and you can even annotate articles with notes - using both text and Ink - of your own.

My fellow traveller was totally amazed by how friendly the application was to use.

If you haven't yet downloaded and used NYT Reader... go do it immediately! 

To download the Times Reader, click here.

posted on 3/2/2007 7:44:29 PM ( 2 Comments )