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.