Monthly Archives: June 2007

On June 11 and 12, I attended a 2-day Visual Studio Team Edition for Database Professionals workshop at Class-A. This event was hosted by Gert Drapers (also aka DataDude), see his blog post announcing the event. Gert discussed all the important features of the tool and some of my fellow attendees complained the workshop was too short for such an enormous set of features and exercises. I have to agree a bit, because we not only discussed all the features of DBPro, we also covered the features of SR1 and the not yet released power tools. The Power Tools are listed on the Future Release page of VSTS. So there was hardly time for any of the exercises, but I don’t give a ****, because I’m more interested to hear and see what DBPro can do. After this workshop and the DevDays, I started to do my own exercises. One of the things, which I will give my full attention, is the ability to extend DBPro. I will focus on all extensions, but data generation in particular.

The power of VSTE DBPro data generation, lays in the fact you can generate data that closely matches your domain values allowed in your environment. The problem is that knowledge of the allowed and disallowed domain values cannot always be derived from the schema, so you have to go in to the designer and configure the generators for your columns. By using the built-in data generators, you can generate random data, generate data from existing data sources, and control many aspects of data generation. If the functionality of the built in generators is insufficient, you can create custom data generators. To create custom data generators, you use the classes in the Microsoft.VisualStudio.TeamSystem.Data.DataGenerator namespace.

Let me start by motivating the data generators that I would like to build. I often find databases which contain Dutch related information, such as postal code, phone number, provinces, e.t.c. Furthermore a lot of columns contain data which could be generated with a DataBound generator, but some of these data could also be retrieved from a number of web services (Cities, Countries, Currencies, ISO-codes e.t.c.). Last but not least I have credit card background, not that I misused other peoples card, but I build a card number controller to prevent this.

The extensibility API provides classes from which developers can inherit. In addition to classes, the API includes attributes that you can apply to your derived classes. By applying these attributes, you reduce the amount of code that is required in custom generators for common cases.

You can use the extensibility API in the following four ways to create custom data generators:

Extensibility

Description

Difficulty

Declarative Extensibilty

  • Inherit from the Generator class.
  • Add custom input and output properties.

Easy

Normal Extensibility

  • Inherit from the Generator class.
  • Add custom input and output properties.
  • Override one or more Generator methods (for example, OnGenerateNextValues and OnInitialize).

Medium. This method is recommended in most cases.

Aggregation Extensibility

  • Inherit from the Generator class.
  • Add custom input and output properties.
  • Override one or more Generator methods.
  • In your class, create one or more instances of the standard data generator classes and use those to do the work.

Medium

Base Extensibility

  • Create a class that implements the IGenerator interface.
  • Implement all methods that are required by your generator.
  • Create a custom designer for the generator that implements the IDesigner interface.
  • Implement all methods that are required by your designer.

Difficult

Summary
Since I hope to be better than the average, I will use Aggregation Extensibility for my Dutch data generator, in which I will probably use the Regular Expression generator to build my data details. For one of the other two data generators I will be using Base Extensibility and give them their own designer. So keep in touch and follow my posts.

 

4 Comments

As you can read in my previous post I received a request from Yogita Manghnani to share my experiences. This is the second post concerning options I struggle with in TFS. Almost all people where I introduce TFS come up with the same question "Can I relate my Work Items?" and I always have to reply "Yes you can, but there is no hierarchy." Personally I think relationship between Work Items is the base of good project, especially if it contains a hierarchy. Hierarchy is in all projects and most tools which contain project management i.e. Look at MS Project. Of course you can almost use TFS without this notion and use Areas and Iterations, but it is harder to manage your projects if you can’t relate your Work Items with a true relationship.

Loïc Baumann created the tool for relating all your Work Items in TFS. After installing the MSI and configuring your Web Server and Work Items you're able to relate as you can see in this screen dump. Every Work Item Type can have its own icon which is pretty handy.

 WICreator

What is this all about? There are two simple answers to this question:

- WICreator is a standalone application that let a Team System user to create Work Items in a hierarchical way. You also have the ability to send existing one to a “Recycle Bin” to get rid of them (useful as you can’t delete Work Items).

- WINetwork is a web service triggered by the TFS Alert System when a Work Item has a field change.
The main purpose of WINetwork is to analyze the changes regarding to their environment, and then respond by modifying fields of surrounding Work Items. (E.g. when a child Work Item turned to Active, then WINetwork will turn the parent from Proposed to Activate)

Work Item Creator and WINetwork are both available in codeplex: http://www.codeplex.com/wicreator

Customize Work Items
Before you use those tools you need to some customization of the Work Item Types. To enable the hierarchy you have to add custom fields in your Work Item Types definition. Use the Process Templates Editor from Imaginet Resources or the one shipped with the latest Team System Power Tools.

Add the following three fields:

NameTypeRefNameNameDescription
ParentWIintegerCegedim.ParentWI0Relation between child and parent
FirstChildWIintegerCegedim.FirstChildWI0First child to display beneath a parent
NextWIintegerCegedim.NextWI0Order of Work Item, Relation between siblings

Summary
What a nice tool. I could only dream of such a solution, but Loïc managed to build one. It will cost you some time to setup, even with the document and the use of Team System Power Tools, but when you finally manage to do so you can easily see how your Work Item is related in your project. One of the downsides is, it doesn't integrate in Team Explorer (VSTS) even I like his Click Once thought and the other is, the hierarchy can't be related to MS Project or Excel yet. Furthermore it would be nice if there was a relation between the hours of all items and the ability to only start a new work item if previous work items are finished. So it's up to us TFS lovers or MSFT'ers to support Loïc. For the record it's only downloaded 17 times. Shame on you TFS gurus out there.

 

2 Comments

This week I received an email from Yogita Manghnani, a Program Manager in the TFS Office Integration team who requested me to share my experiences with TFS. Since the beginning of TFS I'm one of those people who really adore TFS, but unfortunately not everything is implemented the way I like it. Two options I constantly struggle with are comparing Office files and the hierarchy of Work Items.

In this blog post I will discuss how I resolved my problem with comparing Office files. Still it isn't the best solution; my hope is on Microsoft to solve this problem completely. In one of my latest blogs I talked about using TFS for other IT related projects. We are using TFS to setup training material which consist of slide decks in PowerPoint, practicum description in Word and depending on the training examples and solutions in Visual Studio .NET. The best thing Source Control can do when you try to compare two Office files is displaying a message "Binary files differ". I know Microsoft is targeting on SharePoint for Office files and I'm a great admirer of SharePoint, but since I want to branch and compare the documents it isn't suitable for me and I hoped Source Control could do better.

So it's up to me to find a proper solution. I haven't check out what the possibilities are to extend Source Control so I first setup VS.NET to use another program to see the differences between Office files.

In Tools menu select Options

Within the tree follow this exact path

Source Control -> Visual Studio Team Foundation Server -> Configure User Tools ...

clip_image006

As you can see I wanted to let Word or PowerPoint decide what the differences are, but this is not possible. These two programs doesn't support the proper command-line switches. To check all command-line switches of the preferred Office tools, click these links:

Document-Comparison-Thumb2We're now in the stage of testing Diff Doc to this job. 'Diff Doc' is a powerful yet easy to use folder/file compare and remediation utility. You can use it to compare files of all types including MS Word/Excel/PowerPoint, PDF, RTF, Text, HTML, XML, WordPerfect and more.

When comparing to PowerPoint files it will result in the following screen dumps. 

clip_image002

clip_image004

And as you can see I'm now able to show if my branched Office files differs from the original. After this simple differ check I still want to use Word and PowerPoint to do the real compare and merge to both files. Within Word 2003 / 2007 it isn't a problem at all. Word supplies a great feature to see all differences, not only text, but also styles. Besides this it has a perfect interface to merge the two files.

clip_image008

PowerPoint 2007 on the other hand, has removed its feature to 'Compare and Merge Presentations', as you can see in the picture below. Who is responsible for such an act? I wonder how and when this is decided. Somebody had to say something like this. "You know what, since nobody complained about we forgot the 'Compare and Merge Presentations' feature in the 2007 beta phase, we'll just leave it out. And if we’re trying to release Office 2010 we'll mark it as a new feature again. This is a win/win situation. We got less to program now and add it as an additional feature in Office 2010." And all people of the Microsoft Office Team replied "You're the man".

clip_image010

So we're back to PowerPoint 2003 again which still contain this feature. To support 2007 File Formats in Office 2003 you'll need the Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint 2007 File Formats. See http://www.microsoft.com/downloads/details.aspx?familyid=941b3470-3ae9-4aee-8f43-c6bb74cd1466. After installing this Pack which becomes almost a must for every old-fashioned Office user, we can compare PowerPoint Decks which we created in PowerPoint 2007.

clip_image014

Summary
What have you done Microsoft? How could you remove the astonishing compare function on PowerPoint files? You're absolutely not the man. Furthermore why doesn't Office give us the opportunity to compare two files using a command-line options. Please VSTS Team and Office Team talk to each other. Make your customers happier than they now are and please people respond if you've found another solution, I keep myself recommended.