Reminder: Perth .NET User Group Meeting, Thurs April 2nd: WPF Flexible UI Composition

Join us at the Perth .NET Community of Practice, Thurs April 2nd to hear James Miles present on how Inversion of Control (IoC) and separated presentation principles can be used to build rich WPF applications, while keeping memory consumption low and minimising object lifetimes. James will demonstrate how the careful introduction of an IoC Container can increase the flexibility of your UI architecture, facilitating agile software development.

TOPIC: WPF Flexible UI Composition with James Miles
DATE: Thursday, April 2nd, 5:30pm
VENUE: Excom, Ground Floor, 23 Barrack Street, Perth
COST: Free. All welcome

More details here: http://perthdotnet.org/blogs/events/archive/2009/03/19/flexible-ui-composition-with-wpf-updated.aspx

SQL Server 2008 Heroes Contest Winners

Not sure if it was a lack of fanfare or whether I simply missed it, but the winners of the SQL Server 2008 Heroes contest were announced several months ago! (The official announcement is here: http://blogs.msdn.com/sqlheroes/)

  • BIDS Helper: Greg Galloway, Darren Gosbell, John Calvin Welch
  • SQL 2008 Extended Events Manager: Jonathan Matthew Kehayias
  • ssisUnit: John Calvin Welch
  • SqlMonitoring Tool: Robert Hartskeerl
  • Allocation SQL Server Management Studio Add-in: Daniel Gould

The winning projects are hosted on Codeplex here: http://www.codeplex.com/SqlServerSamples

Marshaling between Managed and Unmanaged Code: PInvoke Interop Assistant

I recently saw this useful tool mentioned on StackOverflow by JaredPar (it seems I need to catch up on the MSDN magazines that are starting to pile up!): the PInvoke Interop Assistant hosted on CodePlex and first described in this MSDN article, Marshaling between Managed and Unmanaged Code:

.NET Framework interop opens a channel between managed and unmanaged code, and marshaling plays a very important role in that connection in that it allows for data exchange between the two. There are many factors that affect the way the CLR marshals data between the unmanaged and managed worlds, including attributes such as [MarshalAs], [StructLayout], [InAttribute], and [OutAttribute] as well as language keywords such as out and ref in C#.

Understanding and remembering all the attributes and rules (described in the MSDN article) may seem a bit daunting. After all, most developers of managed code just need to be able to quickly figure out the P/Invoke signature for a Win32® API function, paste it in their code, and be done with it. That’s where the P/Invoke Interop Assistant can help. This tool can efficiently assist with conversions from C++ to managed P/Invoke signatures as well as those in the opposite direction. It even comes with a database of Win32 functions, data types, and constants, so the common task of adding a Win32 P/Invoke to your C# or Visual Basic source file is made very easy. The tool package includes two command-line tools, SigImp and SigExp, which can be used for batch file processing. A GUI tool is also found in the package, which includes the functionalities of both tools.

IE8 does not support the Windows Vista product registration process

If you have just built a new PC with Vista 64 bit and are planning on installing IE8 (64 bit, but possibly 32 but as well) and you haven’t yet registered your copy of Vista. STOP!

Register it first using IE7, because if you try using IE8 you will get a friendly message informing you that:

“The browser version you’re currently running does not support the Windows Vista product registration process.”

It then helpfully suggests you install IE7. Can I find IE7 for Vista 64 bit on the MS site. Nope!

Perth .NET User Group: A Great Start to the Year

I’ve been remiss by not blogging about the 2 user group meetings we have had so far this year.

We don’t run a meeting in January due to the holidays, so February’s well attended meeting was the first and good start to the year. Ola Karlsson stepped up to the task of presenting on Silverlight and what it’s good for. He blogged about it here (with links from the presentation). And special thanks to Ola for giving both halves of what was originally planned to be a 2 speaker event.

If you wanted an indication of the level of interest in testing and Test Driven Development (and Design) (TDD), then you needed to look no further than our March meeting when Rhys Campbell presented on Real World TDD. We had the highest attendance of any meeting in the group’s history; it was standing room only! (I lost count at 62 people). He posted a follow-up here.

Thanks to both presenters.

Our next presentation will be James Miles on Flexible UI Composition with WPF. Don’t miss it!

IE8 Goes Live

On Thursday, Microsoft released Internet Explorer 8. The release is publicly available here.

The new IE 8 runs on Windows Vista and Windows XP operating systems, as well as Windows Server editions from 2003 and beyond. Windows 7 Beta testers should use the version of IE 8 that came with the beta, as Microsoft customized that browser to work specifically with Windows 7 features.

Collections

If you ever find yourself in need of a data structure that is not present in the .NET Framework you should check out these free collections that contain C# implementations of trees, heaps and many other data structures:

  • The C5 Generic Collection Library for C# and CLI is a library of generic collection classes for C# and other CLI languages (.Net 2.0 and later, and Mono 1.2 and later). There is a freely downloadable book about C5.
  • Wintellect’s Power Collections for .NET: The goal of the project is to provide generic collection classes that are not available in the .NET framework. Some of the collections included are the Deque, MultiDictionary, Bag, OrderedBag, OrderedDictionary, Set, OrderedSet, and OrderedMultiDictionary.

Performance Analysis of Logs (PAL) Tool

OK, you have a server with a suspected performance problem. What do you do? You collect performance counters, right? But which ones? And what do you do to make sense of the reams of data once collected?

The free PAL (Performance Analysis of Logs) application hosted on Codeplex is an easy to use tool that collects and reads in a performance counter log and analyzes it using known thresholds (provided). The tool generates an HTML based report which graphically charts important performance counters and highlights alerts when thresholds are exceeded. The thresholds were originally defined by the Microsoft product teams and members of Microsoft support, but continue to be expanded by this ongoing project. It currently contains threshold files for IIS, MOSS, SQL Server, BizTalk, Exchange, and Active Directory.

This tool is not a replacement for traditional performance analysis, but it automates the analysis of performance counter logs enough to save you time and narrow your search. Written and maintained by Clint Huffman, the PAL tool has been around for some time but it’s not as well known as it should be, given how useful and easy it is to use.

If you want to have a look at a sample report, download and install PAL and then click this link.

Prerequisites
The optional GUI portion of PAL requires the Microsoft .NET Framework v2.0. PAL uses the Log Parser tool to query performance counter logs, and requires the Office Web Components 2003 in order to create charts. Both are freely downloadable.

[This MSDN page gives a detailed description of all the performance counters used when monitoring BizTalk.]