Thursday, October 4, 2007

Releasing the Source Code for the .NET Framework Libraries

Scott Guthrie has announced that Microsoft will be releasing commented source code for some .NET 3.5 framework libraries here.

Technorati Tags:

Monday, September 17, 2007

Software Factory Specialisation

Jezza is one of the thought leaders in Microsoft about Software Factories.  I thoroughly recommend his blog to anyone interested.

His latest post is about Software Factory verticalisation, ie how can we leverage off the essentially horizontal (cross-cutting) software factories that Microsoft P&P are developing, to specialise them for our particular (and narrower focussed) domain?

His post raises some interesting related issues about the practical application of software factories.

The current crop of horizontal factories - SCSF(Smart Client Software Factory), WCSF(Web Client Software Factory), WSSF(Web Service Software Factory) - are all general purpose / cross cutting.  They should provide a way of insulating / abstracting from the physical solution domain, eg .NET 2.0/3.0/3.5, etc.

The issue I'm raising is - how do we future proof our factory developed applications, to allow us to take advantage of ever changing technologies, and allow us to "easily" upgrade to the next version of our vertical or horizontal factories.

Without strategies to handle this, are we destined to have to rewrite / refresh our apps / products every few years ?  If we accept this - then it's legacy / obsolescence by design, and we loose many / most of the gains we have made by using a software factory approach.

It seems to me that the answer lies with modelling (via DSLs) so that our IP assets are maximised in (DSL) models and other factory assests, and we "just" have to update the mappings to lower levels when they change.

But with the factory approach spanning vertical factories to horizontal factories to physical solutions, this introduces some interesting configuration management and upgrade challenges.

Also "interesting" is the choice of which horizontal factory (from Microsoft P&P) you should use.  For our smart client product line, we were planning to use the SCSF, but depending on who you talk to - development of it has either stopped / slowed to a crawl, and the supposed replacement is Acropolis.  I don't see any evidence with Acropolis that they are taking a software factory approach.  This is indeed a challenge for those of us who would like to embark on a software factory / product line approach.

Technorati Tags:

Thursday, September 13, 2007

What happened to the Treeview Icons?

As part of the Extensibility implementation we have been looking into a bug in the last day or so, related to Icon images in a treeview. The bug is that in Windows XP the icon images didn't appear, in Vista they did, for the same EXE.  The odd part?  It was working in both until just recently.

So what happened?

As part of doing a review, and some related bug fixes, I noticed that the visual styles weren't enabled, so I 'fixed' them.  Now I'm running Windows Vista, so simply putting Application.EnableVisualStyles before Application.Run worked beautifully.  You might ask why this hadn't been done earlier, well it had, sort of.  The application starts multiple threads, with a message loop and form on each, there are reasons for this that I won't go into here.  The bug I fixed was when I notice we'd only called Application.EnableVisualStyles on the initial thread, and I added the call into each new thread.

As I said, this worked swimmingly for me, but a while later when the other Devs got the latest code (they're using Windows XP) things got interesting.  There is a treeview on the form and it's icon had disappeared!  But only on the Windows XP machines??  I tried running the EXE on my Vista machine and the images appeared, so it's obviously a runtime issue and not a compile time one.

The answer, a lesson learned long ago but unfortunately forgotten.  Under Windows XP the Application.EnableVisualStyles exhibits some interesting behaviour.  I'm not going to try to explain why, I'll defer to those more knowledgeable in this area.  I found a Code Project article and an old but informative blog that I think do a good job of explaining the issue.

Note that as part of the fix for this you must call Application.EnableVisualStyles and Application.DoEvents BEFORE you call the constructor for the form.  This is due to the message loop and is explained in the blog article referred to above.

 

Sunday, September 9, 2007

The Costs of Managed Code: The Avoidable and the Unavoidable

Rico Mariani was recently appointed chief architect of Visual Studio.  He's been blogging a lot about .NET performance over the last few years.  His latest entry points to a talk he gave to Gamefest 2007 with the same title as this blog entry. 

"This talk is for those who want to understand the inescapable performance consequences of the managed programming method: the things you cannot avoid and the things you can. The presentation explains those few characteristics of managed code, such as array bounds checking, application domain isolation, and write barriers, that profoundly affect the code generation at a primitive level. Comparing and contrasting the consequences for the .NET Compact Framework and the classic .NET runtime, the talk explains the reasons for these overheads, the benefits they provide, and what practices minimize the associated costs. Additionally, we discuss some commonly occurring costs, such as boxing, that aren't inherent to all managed code, and we offer some tips for minimizing those costs."

Also on his blog is a link to various articles on performance that he's written.

Wednesday, September 5, 2007

Interaction Design

I've been reading Alan Cooper's book The Inmates are Running the Asylum.  He makes a strong case for the discipline of Interaction Design.  The inmates are developers and the Interaction Designers will ensure systems are built fit for purpose rather than matching the usually complex interaction idioms that developers build, because they are used to working with the complex.  Definitely worth a read, so see me or Ben for a copy.  Hunted around for some additional material, and came across Jenifer Tidwell's book Designing Interfaces which is pretty much available online.  Also here are some links from Darryl Chantry, one of the UX presenters at TechEd : http://www.odannyboy.com, http://www.cameronmoll.com, http://www.adaptivepath.com, http://www.molecular.com, http://www.uie.com.  Also worthy of a look is Shane Morris's blog.

Tuesday, August 21, 2007

Using TFS source control from Windows Explorer

Benjamin Day Consulting have a $25 tool - "Dubbelbock TFS 2.0 lets you access Team Foundation Server (TFS) source control from Windows Explorer (explorer.exe).  Now you can go to any file in an existing TFS Workspace, right-click and you'll then see the Dubbelbock TFS context menu with options like Check In, Check Out, Undo, and Get Latest."  Could be very useful for document management.  I've had a play with it and it seems to work fine - the only issue is that on some machines there is a problem with installing it :-( .  It seems to install ok on Vista machines I got people to try, but not always successful on WinXP.  I contacted the author and he's aware of the problem - offered me a free copy if I could find out what is "missing".

It also has a system tray utility that allows you to create "stencils" for work item types, and then create / edit work items using the stencils.  This functionality is similar to the Codeplex project Fissum.  As Microsoft have now released the Visual Studio 2005 Team Foundation Server Power Tools, which includes a work item templates feature, it's probably a better way to go.

Sunday, August 12, 2007

A couple of diagnostic tools, Office ribbon, life for MFC

Fábio Pedrosa talks about Snoop, "a great utility to explore running WPF applications. It displays the visual tree as well as properties and events.  It can be used to map UI elements to the underlying project classes.  This application is very similar to the famous Spy++, but for WPF applications. You can inspect the insides of any WPF application, including Microsoft Expression Blend (also a WPF application)."

Another Codeplex project - Source Code Outliner Power Toy - "is a Visual Studio extension that provides a tree view of your source code's types and members and lets you quickly navigate to them inside the editor."

The next one's a bit old but Jensen Harris has a set of 200+ posts all about The Office 2007 UI Bible.

In the June 2007 edition of MSDN magazine there's an article on how MFC has been souped up in Orcas  "Most of the enhancements made to MFC focus on UI. When an MFC application is recompiled with Visual Studio "Orcas," it gets an automatic face-lift for Windows Vista—that is, common dialogs will be enhanced, toolbars will follow Windows Vista themes, and window frames and title bars will sport Aero™ transparency. This face-lift happens without modifying any code—all you need to do is recompile the application."