//BUILD Conference – Anaheim California – Day 2

Day 2 at the BUILD conference was all about the breakout sessions. Sessions about Windows Server. Sessions about Visual Studio, Team Foundation Service, and Application Lifecycle Management. And, of course, sessions about building great Metro style applications for the upcoming Windows 8.

But the critical main thought was delivered as part of the day’s opening Keynote:

This is the day and age of the Developers!
This is the day and age of the Windows Developers! (…)
Developers, Developers, Developers!

Steve Ballmer
CEO, Microsoft Corporation.

I think this summarizes very well what the strategy of Microsoft comes down to for the years ahead.

Posted in Non classé | Leave a comment

//BUILD Conference – Anaheim California – Day 1

Not many things have been shared by Microsoft ahead of this event. Today we are provided with a “Big Picture” overview of what’s up next, in the form of a introduction Keynote, followed by three Big Picture sessions.

Keynote

What we’ve seen today:

A showcase of the new Metro-Style user interface. This touch-first interface, first seen on the Zune and recent Windows Phone devices, has been significantly enhanced. It runs on many devices, in a variety of shapes and sizes, including ARM-based tablets and phones.

What powers the new Metro user-interface is the pervasive use of HTML 5 and Javascript, supported nativelely by the new Internet Explorer 10 rendering engine.

A whole host of improvements, both in the core architecture of Windows and in the user interface. Because, indeed, the existing user interface is still there and protects the massive investment that has been made on Windows over the years.

Last, but not least, Microsoft has given away the full suite of Developer’s Preview Software stack – Windows 8, Visual Studio 11, etc. – bundled on, what they call the Developer’s Preview Hardware: a brand new Core i5 Samsung Windows 8 Tablet!

This most anticipated piece of hardware was demoed live and will definitely prove to be a major contender against competing offerings from Apple and Google.

By giving away the Developer’s Preview Hardware tablet, Microsoft hopes to create a vast ecosytem of applications, ready to be downloaded from the upcoming Windows Store when the platform ships, probably around spring next year.

In fact, by bringing support for both Multi-Touch and Stylus-based Input to Windows, and allow for seamless co-existing Metro-Style and Desktop applications, this platform will certainly appeal to professionnals and consumers alike with a compelling set of applications.

Posted in Non classé | Leave a comment

//BUILD Conference – Anaheim California

After a comfortable but lonnnng flight, I’m in!

More famously known for its DisneyLand Resort, Anaheim is getting busy today, with many attendees converging to register at the Convention Center, in preparation of the upcoming conference, where Microsoft promises to unveil the future of Windows.

Posted in Non classé | Leave a comment

Debugging XSLT Stylesheet with Custom Extension Objects from Within Visual Studio

When developping complex maps with the BizTalk Mapper, you sometimes find yourself in a situation where you need to debug the underlying logic of the associated XML stylesheet.

In situations like these, it is customary to have Visual Studio generate an XSLT file from the BizTalk map, and use Visual Studio’s builtin support for debugging XSLT. This allows you to put breakpoints, inspect the content of variables and precisely monitor the transformation step by step.

Custom Extension Objects

There are two cases, however, that prevent you from debugging the underlying XSLT from within Visual Studio :

The first case involves the use of the various database functoids, for instance the cross-reference GetCommonValue, GetCommonID, GetApplicationValue and GetApplicationID functoids. These, are implemented in terms of external functions, in a separate assembly, that is itself referenced from the generated map.

The second case involves the use of the Scripting functoid to call an external function. This is a variation of the first case in which you specify the function you want to call.

In order to execute such maps, the BizTalk Mapper uses the XslTransform class by supplying a list of all the classes whose methods are required to carry out the XSLT transformation, along with their associated namespace prefixes.

The set of such custom classes used to provide external logic to XLST transformations is referred to as Custom XSLT Extension Objects. At design-time, these Custom Extension Objects are represented as an additional file that contains the associations between the declared XML namespace prefixes and the fully qualified .Net type names of the classes which contain the methods called from the map.

When you invoke the “Validate Map” context-menu option on a BizTalk Map in Visual Studio, you will notice that BizTalk generates this file, with a _extxml.xml suffix along with the associated XSLT.

Most of the time, this file is empty, for basic maps. This is not the case, however, if the map makes use of external functions in separate assemblies, as alluded to in the two cases described above.

Debugging XSLT with Custom Extension Objects

Unfortunately, such maps seemingly cannot be debugged inside Visual Studio without modifications. If you use Visual Studio’s builtin XSLT debugger and attempt to step into the underlying XSLT file, you will encounter an error such as this one:

---------------------
Cannot find the script or external object that implements prefix
'http://schemas.microsoft.com/BizTalk/2003/ScriptNS0'. "

Even though Visual Studio generates both an XSLT file and a _EXTXML.XML file, it seems there is no way to instruct Visual Studio about the custom extension objects file, which makes the debugging experience cumbersome and very frustrating.

Fortunately, there is a way!

Although there are no options in the Visual Studio GUI, all the support is there in the .Net Framework. All there is do is write a little C# program to do the trick.

A Simple Function to Debug Custom XLST Maps

The following function is very simple. In real life, this function would be compiled into a C# program with additional logic to accept and parse command-line arguments, in order to be able to supply paths to the stylesheet, the extension objects file and the input and output documents. This is no rocket science.

Here is the code:

using System;
using System.Collections;
using System.IO;
using System.Reflection;
using System.Text;
using System.Xml; 
using System.Xml.Xsl;

class DebugHelper
{
  static void Main(string[] args)
  {
    string input = @"...\input.xml";
    string output = Path.ChangeExtension(input, ".out");

    string stylesheet = @"...\stylesheet.xslt";
    string extension_object = @"...\extension_extxml.xml";

    string result = TransformXslt(input, stylesheet, extension_object);
  }

  private static string TransformXslt(string document, string stylesheet, string extension)
  {
    return TransformXslt(document, stylesheet, ParseExtension(extension));
  }

  private static string TransformXslt(string document, string stylesheet, object[] extension)
  {
    XslCompiledTransform transform = new XslCompiledTransform(true);
    transform.Load(stylesheet, new XsltSettings(true, true), null);

    XsltArgumentList arguments = new XsltArgumentList();

    for (int index = 0; index < extension.Length; index += 2)
    {
      arguments.AddExtensionObject(
        extension[index] as string,
        extension[index + 1]
        );
    }

    StringBuilder output = new StringBuilder();

    using (XmlWriter writer = XmlWriter.Create(output, transform.OutputSettings))
      transform.Transform(document, arguments, writer);

    return output.ToString();
  }

  private static object[] ParseExtension(string extension)
  {
    if (String.IsNullOrEmpty(extension))
      return new object[]{};

    XmlDocument document = new XmlDocument();
    document.Load(extension);

    ArrayList extensions = new ArrayList();

    foreach (XmlNode node in document.SelectNodes("/ExtensionObjects/ExtensionObject"))
    {
      string extension_namespace = node.Attributes["Namespace"].Value;
      string extension_assembly = node.Attributes["AssemblyName"].Value;
      string extension_class = node.Attributes["ClassName"].Value;
      string assembly_qualified_name = String.Format("{0}, {1}"
        , extension_class
        , extension_assembly
        );

      object extension_object = Activator.CreateInstance(Type.GetType(assembly_qualified_name));
      
      extensions.Add(extension_namespace);
      extensions.Add(extension_object);
    }

    return extensions.ToArray();
  }
}

A couple of points of interest need clarification.

First, the most crucial step, is to use the XslCompiledTransform constructor with a first parameter that indicates whether to execute the map in a debugger. This is actually what does the trick in this program.

When you run the program, it will launch the debugger and break at the beginning of the map. You can add this project to your Visual Studio solution, and you will be able to step into the map directly from the same Visual Studio instance.

Neat.

Secondly, what distinguishes this program from Visual Studio’s builtin XSLT debugger is the ability to actually make use of Custom XSLT Extension Objects.

The ParseExtensions function has been designed to consume an XML file, whose path is specified in the first argument, that has the same format as the ones generated by Visual Studio when using the “Validate Map” option.

Posted in BizTalk, Tips | 1 Comment

Exploring Performance, Throttling and Latency Settings with the PowerShell Provider for BizTalk

One of the new features in BizTalk Server 2010 is a new UI that lets you modify a whole host of performance-related settings. Those settings apply to the BizTalk Group, Hosts or Host Instances.

This is a massive feature! Previously, one was required to either modify the registry or update records in the BizTalk Management Database to achieve the same results.

PowerShell Provider for BizTalk

As part of a recent update, I have added support for reading and writing those settings on the corresponding objects. For the time being, I have not added related CmdLets but the properties are directly accessible on the various artifacts.

For instance, use the following syntax, to explore all properties of the BizTalk Group, including those performance-related settings:

PS BizTalk:\> (Get-Item BizTalk:\) | Format-List *
PS BizTalk:\>

<

Modifying a single setting is just a matter of assigning a new value to the appropriate property:

PS BizTalk:\> $btsGroup = (Get-Item BizTalk:\)
PS BizTalk:\> $btsGroup.PerfCounterCacheRefreshInterval = 90
PS BizTalk:\>

In the current version, you can also export those settings to an XML file that you can re-import at a later time, which allows you to simplify you deployment and automation scripts.

PS BizTalk:\> $btsGroup = (Get-Item BizTalk:\)
PS BizTalk:\> $btsGroup.ExportSettings("C:\settings.xml")
PS BizTalk:\>

Note that such export file is created using the builtin BizTalk 2010 API. It can be directly imported back from the Administration Console UI.

Finally, it is possible to re-import such settings from an export file. You can import settings for the whole BizTalk platform, or selectively for a BizTalk Group, a single or several BizTalk Hosts and a single or several Host Instances. Use the ImportSettings method on the appropriate object:

PS BizTalk:\> $btsGroup = (Get-Item BizTalk:\)
PS BizTalk:\> # Import All Settings
PS BizTalk:\> $btsGroup.ImportSettings("C:\settings.xml")
PS BizTalk:\> # Import Group Settings
PS BizTalk:\> $btsGroup.ImportGroupSettings("C:\settings.xml")
PS BizTalk:\> # Import Single Host Settings
PS BizTalk:\> $btsHost = (Get-Item 'BizTalk:\Platform Settings\Hosts\BizTalkServerApplication')
PS BizTalk:\> $btsHost.ImportHostSettings("C:\settings.xml")
PS BizTalk:\>

I hope you’ll enjoy using this feature! As always, please leave feedback on the CodePlex project. I’m taking any constructive feedback very seriously.

Posted in BizTalk, PowerShell | Leave a comment

Communicating with Windows Azure Queues with the WCF BizTalk Adapter for Windows Azure Storage Services

As part of its Cloud Computing offerring, Microsoft provides highly elastic and reliable capabilities for storing structured and unstructed data from anywhere over an internet connection.

One thing I’m being very interested in, is the capabilities that Windows Azure Storage Services provide. In my mind, these set of storage services enable wider data integration services, between on-premises applications or processes and Cloud applications.

That is why I teamed up with Jérémie, in order to build a BizTalk WCF Adapter for Windows Azure Storage Services. Our adapter is currently at very early stage but we wanted to show what it is already capable of.

Jérémie and I are working hard and we expect to release a preliminary beta version of our adapter on CodePlex in the next few days or so.

BizTalk WCF Adapter for Windows Azure Storage Services

Thanks to the WCF LOB Adapter SDK, building an adapter is not that complicated. Well, it comes with its own set of challenges, but still.

Like any other adapter, the Azure Storage Adapter allows you to browse through the various artifacts exposed by the target LOB system. In this case, Blob Service Containers and Queues associated with a Windows Azure Storage Account are available.

For each selected operations, the WCF LOB Adapter framework will build a set of .xsd schemas for use with BizTalk, for building your integration of business processes as usual.

In the BizTalk Server Administration Console, the configuration of send ports and receive locations is exactly the same as any other adapter. First, select the azureStorageBinding for the WCF-Custom transport properties.

Then, specify an appropriate URI that represents your Windows Azure Storage Account, and you’re good to go !

Conclusion

As we’ve seen, Windows Azure Storage Services provide a robust, scalable and efficient means to store data on the Cloud and that enables existing on-premises data integration scenarios to extend outside the boundaries of an enterprise, with the concept of Composite Applications.

As I mentioned at the beginning of this port, our adapter is very raw at the moment. For instance, it currently only supports Outbound operations for Blobs and Queues. So adding support for Tables is next on the list. At a later stage, we might want to make use of the Azure Storage REST APIs instead of relying on the Windows Azure SDK dependencies at runtime.

But even with these limitations, Jérémie and I think that our adapter can be useful for you out of the box. That’s why we are committed to release a first version of our adapter on CodePlex in the next few days, in order to gather feedback from the community. We are working hard to help bridge the gap for data integration scenarios between BizTalk and Windows Azure.

Stay tuned !

Posted in BizTalk, Windows Azure | 2 Comments

Session TechDays – 2011 : Les technologies d’intégration de MDM et de SOA

Warning: this post is about my contribution to the Microsoft TechDays 2011 in Paris and is therefore written in french.

Je suis fier d’avoir pu participer à ma première session à l’occasion du salon Microsoft TechDays, qui s’est déroulé au Palais des Congrès à Paris les 8, 9 et 10 février 2011.

La session Les technologies d’intégration de MDM et de SOA (300), que j’ai eu la chance de co-animer avec Roch Baduel, Benjamin Guinebertière, et Vincent Rouet, constitue le deuxième volet d’une discussion complète sur l’écosystème d’intégration SOA de Microsoft, dont la première partie portait plus précisément sur la gestion des processus métiers.

Vous pouvez cliquer sur l’image ci-dessous pour retrouver la vidéo, et également télécharger la présentation PowerPoint correspondante.

Merci Benjamin !

Posted in Master Data Services | 2 Comments