December 2004 - Posts

Pfeww, 2004 went by like a blast! A lot of cool things happened during this year, it's hard to pick out the most important one, but changing jobs was certainly  had the biggest impact! Let's hope the new year may be as exciting as 2004; but I'm pretty sure of that: 2005 will rock!

Normally I don't do this, but for next year I want to make some resolutions:

  • Start working on things immediately. I have developed the nasty habit of delaying all the stuff that I don’t like doing. My wife can testify that as well.
  • Answer email quickly. I get quite some email, but sometimes I fail to answer them in an appropriate time span. Sorry about that for all of you who sent me an email but haven’t heard back from me. That won’t happen anymore…
  • Become more active in the newsgroups. Some time ago I was quite active in various newsgroups, but due to my job change (and some other things) that activity moved to the background.

I whish you all a very happy, healthy and succesfull new year! But let's not forget all the people who are affected by the tsunami's. If you can and you haven't done it yet, donate now.

Some time ago I was involved in a proof-of-concept project that had grid computing capabilities as a "nice-to-have feature". At that time we were playing around with web services that were called by the distributor of the grid. Today Microsoft Watch has a nice article about Microsoft Research project around grid computing, code named "BigTop":

Microsoft is working on a skunk-works project that is code-named Bigtop, which is designed to allow developers to create a set of loosely coupled, distributed operating-systems components in a relatively rapid way, according to sources close to the company, who requested anonymity. ... Bigtop consists of three components, all written in C#, according developers who said they were briefed by Microsoft. ... Microsoft Research (MSR) has been dabbling with a variety of distributed OS-related projects for years. more

Although it seems that we have to wait some time (a few years?) for BigTop, it's good to know that MS is working on it!

[Via Patrick] Woehoe, another colleague at U2U has started to blog, welcome Gert! I love working at a company where there's so much community involvement. Subscribed

During these holidays I've got a few days off, which I'm spending (partially :-) on playing with the new Visual Studio.NET 2005 CTP (December edition). The Server Side has a great article by Patrick Smacchia about one of the new language features in .NET 2.0: anonymous methods.

Introduction
Generics are often introduced as the mainstream language feature of Whidbey (.NET2). However, while surfing off the beaten path I realized that new features named anonymous methods and iterators are also very interesting. Unlike generics, these two features don't imply new IL instructions set changes compared to .NET1 IL instructions set or any CTS changes. All the magic is in the compilers. This article is the first of a series of two articles dedicated to these new features. While these articles unfold, you will understand the reasons for beginning with anonymous methods. Both articles share the same structure: first a basic introduction to the functionality, followed by a strong analysis of the compiler work before drilling into advanced uses.

Last week I was wondering (together with Peter) how Microsoft distributes their VPC images. For example for a course which uses two VPC images, you get one "base" image, and two "delta" images which rely on the same "base" image. Suppose you could pull of the same trick for your own VPC images using your magic-super-tuned base image! This would give you at least two advantages:

  • Less MB's
    Believe me, even a 250 GB hard disk seems a lot smaller when you use heavy 7GB VPC images. So storing only the delta would save some precious disk space.
  • Spawn new VPC's faster
    Currently I have a couple of base images on my hard disk, when I need a new VPC instance to test something out for example, I copy one of my base images and create a new VPC that uses my copy. My base images are around 3GB, copying one of them takes op to 10 minutes. When using a "delta" image, you're up and running in less than a minute!

There is some good news, you can do the same trick with your own images! Welcome to the world of Differencing Disks. Matt Hausmann has a nice post that goes into detail. There's even a complete webcast that shows you everything. You can even chain multiple differenciated disks! A final caveat: you can't compact a differenciated (is this an English word?) disk. A recommendation which I've read quite a few times in the newsgroups, related to this issue is to place the differenciated disk into a compressed folder on a NTFS partition.

Probably like every developer I want to have as much information as possible on my screen, especially when writing code. The chosen font is of course quite important; more text on your screen is better (as long as it’s readable). If you want to replace the default font, I recommend following website: http://www.proggyfonts.com/. Over there you can download a lot of programming fonts, for free! My favorite programming font is currently Opti Small:
opti small

Code in this font looks like this:

Patrick has posted our draft agenda for the two-part "Hardcore Development with SharePoint" session we will be presenting on the Dev & IT-Pro Days. We have a lot of ideas in our head which we would like to show you, but we would like to hear your feedback! So if you have a question/problem/topic which you think would be interesting for the SharePoint community, please let us know.

  1. Developing Webparts the smart way
  2. Extending SharePoint Portal Search
  3. Building SharePoint Application Blocks (SAPs :-))
  4. Unlocking SharePoint Content via IBF
  5. End-to-End WorkFlow Solutions using SharePoint/InfoPath/BizTalk
  6. Extending the Notification Channels in the Portal with Messenger Alerts and SQL Server Notification Services
  7. Build Site Definitions from Scratch - Deep into CAML
  8. Techniques to Attach your Code to Lists
  9. Reporting using the SQL Server Reporting Services WebParts

Together with this session, U2U will deliver accompanying papers and demo-code which will be available online as well of course. And … I’m really excited because we will announce some pretty cool stuff (including number 3 in the draft agenda), but I can’t tell you more about it! :-) As Patrick said, we like challenges...

Suppose you’ve created a webpart, which is so cool that you want to have it on every page of your SharePoint site. A nice way to accomplish this is to create your own site definition, which contains your webpart on every page. Does this sound like rocket science? Trust me, it isn’t and I’ll prove it to you. :-) In fact I was a little bit scared of site definitions at first, but once you get used to them they can become very handy! First of all, if you need to learn the basics of creating site definitions, take a look at following article: Creating a Site Definition from an Existing Site Definition.  In this example I’ll modify the site template for a SharePoint Portal site, but you can do the same thing for a Windows SharePoint Services site definition as well. A best-practice is to leave the default site definitions untouched, but on your development box you could choose to alter them anyway to get you started quickly. Just make sure you’ve got a copy, just in case…

 

You can find the Portal site definition in C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033\SPS. The 1033 number corresponds with the language of your Portal site definition (1033 is English), SPS corresponds with what kind of page you want to modify (SPS is the Portal stuff, STS is WSS stuff). So let’s open the default.aspx page, but do not open the page by using http://localhost/default.aspx for example, instead open it directly from the SPS folder (otherwise you’d end up with an un-ghosted page). The first thing you need to do is adding the following line to the top of the page:

<%@ Register TagPrefix="WpNs0" Namespace="SuperWebParts" Assembly="SuperWebParts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" %>

Next you need to find the place in the page where you want to insert your webpart. Once you’ve found you’re spot, insert following lines:

<WpNs0:MySuperWebPart runat="server" >

<WebPart xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/WebPart/v2">

  <Title>My Super WebPart</Title>

</WebPart>

</WpNs0:MySuperWebPart>

Notice that the WpNs0 schema reference corresponds with the one you’ve chosen in the Register TagPrefix line at the top of the default.aspx page. Finally save your page and check out the result in a browser.

 

In the <WebPart> node you can specify additional properties for your webpart, for example following lines will display your webpart without title bar.

<WebPart xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/WebPart/v2">

  <Title>My Super WebPart2</Title>

  <FrameType>None</FrameType>

</WebPart>

 

To find out which values you can use inside the <WebPart> element, is to drag-and-drop your webpart on a site the normal way (inside your webrowser); apply all the desired modifications by using the tool pane (click the down arrow and choose “Modify Shared Web Part”). When you’re done click the Apply button so your changes get applied, then click the down arrow in your web part toolbar and choose “Export…”.  This file contains the <WebPart> xml node which you can copy/paste in your default.aspx page. Quite handy isn’t it?

 

One final tip to find the place in the default.aspx page where you want to insert your webpart: open the portal/site page in FrontPage (warning: do not save the page because you’ll end up with an un-ghosted page!!). Then choose the Split view (bottom left) and click the area in which you want to display your webpart. The corresponding lines will be highlighted in the code view! Once again: do not change the page in FrontPage!

If you want to get into site definitions, I highly recommend following articles:

In the current issue of .NET Magazine an article written by Patrick and me has been published, titled “Bouwen van Workflow-toepassingen” (Building Workflow Solutions). At this point the article is only available in Dutch, but I’m working on an English translation. Anyway, I was showing off the article to my wife as it appeared to me that in the article wasn’t a single line of code! No big deal you might think, but the article goes through all the steps needed to build a workflow solution based on the following products:

  • InfoPath 2003 SP1
  • Windows SharePoint Service
  • BizTalk Server 2004
  • SharePoint Adaptor of BizTalk

Basically the steps needed to create such a workflow solution are: create your InfoPath form, publish it to a SharePoint Forms Library, create your orchestration (workflow) in BizTalk, use the SharePoint Adapter to connect your orchestration to the SharePoint Forms Library. None of these steps require you to write a single line of code!

By the way, if speak Dutch and you’re not yet subscribed to the .NET Magazine do it now! It’s completely free and each issue has a lot of interesting articles, columns and interviews.

[Via Patrick, no not that Patrick :-)] Over here you can read a sample chapter of the long awaited BizTalk Server 2004 book "Microsoft Biztalk Server 2004 Unleashed", about designing XSD schema's with the schema editor.

Messaging is the foundation of BizTalk Server, and message schemas are the bedrock on which messaging is built. Schemas are used by the messaging runtime to understand the structure of data messages and find specific fields. The property fields specified by schemas can be used to help route a message to its destination. Messaging is the exchange of structured data, and schemas are where that structure is defined.

More Posts Next page »