- Andy L., intrepid software engineer  RSS 2.0
 Thursday, January 29, 2009

I've been meeting regularly with Bruno Terkaly, Microsoft Dev. Evangelist for Northern California, who has updated his WPF presentations to include discussion of issues I've suggested are important to developers moving to WPF -- but which always seem to be left out or misrepresented in Microsoft presentations and published resources.  Bruno has reported getting some "thank-you"s from audience members specifically related to the new material, just as I got "thank-you"s from developers in reaction to my original blog post on the subject.

WPF is a GREAT technology, but developers need open, honest discussion of the pain points they can expect to run into as they make the transition.  Examples of less-than-helpful guidance includes the often-repeated advice to simply "hand the project to the designers", while all the developers in the audience are wondering "WHAT designers?  We can't even get approval to hire TESTERS!"  Xaml is frequently portrayed as low-level tooling support, which can safely be ignored, while failing to mention that Visual Studio lacks design-time support for basic WPF features (DataTemplates, for example), and Expression Blend, which DOES offer support, is promoted as a tool for designers.  Any suggestion that developers avoid working directly with Xaml is especially unfortunate, since it takes just a few weeks to become completely comfortable editing Xaml directly, and this approach is MUCH more productive, and leads naturally to better-refactored, more maintainable markup.

After describing similar issues involving other Microsoft technologies, including difficulty in trying to make sense of Microsoft's recently-announced "Azure" cloud computing platform (Bruno says I can take credit for the fact that essential white papers are now grouped together and accessible when you click on the link labelled... er... "White Papers"), I was very kindly invited to attend an informal upcoming get-together of local Microsoft dev. community figures, where I'm hoping to compare notes.  I've also managed to finagle a breakfast meeting this weekend with Microsoft's Karl Shifflet, where I'll have the opportunity to discuss these issues directly with the WPF Program Manager.  Last night, I attended an excellent presentation on Azure, by David Chappelle, where I mentioned some of these issues, and was surprised to hear him express similar sentiments (confusion over the dual storage systems in Azure, the lame attempt to paint the lack of schema support as a feature instead of the honest -- and more palatable -- reality that ALL cloud vendors are adopting a very similar approach...).  He also seemed to agree with my impression that these issues are occuring more frequently, with evidence of development by independent teams (who don't talk to each other)... showing through at the seams.

I've suggested Microsoft could benefit from having internal developer ADVOCATES, focused on identifying and fixing these kinds of issues, rather than just developer "evangelists", who operate more as an extension of Microsoft marketing. Responsibilities for such a team might include...

  • Working to identify and resolve sources of frustration and confusion in all public-facing content.
  • Acting as a dev. community resource, soliciting reports of new issues, and maintaining a public (?) list of issues and their resolution status.
  • Ensuring that cases where perceived issues are actually justified (or temporary), are clearly explained, as close to the start of the release cycle as possible.
  • Using the history of reported issues to improve internal guidance for online documentation and SDK content and install experiences (including the possibility of relying more on pre-configured vhd images).
  • Working to see that all mainstream documentation, sample code, tool-generated code, and public presentations, reflect industry "best practices", or that such information is at least mentioned alongside the usual focus on point-and-click solutions.

The idea is a little naiive, of course, and developers already have access to a wide variety of ways in which to report issues, but the current “scattershot” approach, leaving it up to each individual team to report and respond to issues in its own way, may be part of the problem.  A small team that served as the developer community voice INSIDE Microsoft, that was explicitly tasked with helping to identify and resolve these issues, regardless of which dev. or documentation group might actually be technically responsible for that particular area… could reduce frustration among Microsoft's target customer base, and probably also reduce the time dev. and marketing team members spend, having to repeat answers to the same questions, from a variety of sources.

I'm really enjoying the opportunity to discuss these issues with knowledgable people in the Windows dev. community, and I'd love to think that something in one of these discussions could trigger real change.

Thursday, January 29, 2009 11:51:58 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -
Dev. Process | Management | WPF
 Tuesday, January 06, 2009

I've been seeing a growing number of discussions and resources that try to reconcile Microsoft RAD tool output with generally accepted software engineering "best practices" (Separation of Concerns, Inversion of Control etc.).  The topic certainly isn't new, but the discussion seems less academic and more mainstream now, compared with the days when Allen Holub would rail against MFC's violation of OOD principles, possibly due to a spreading awareness of Agile and Domain Driven Design principles.

A recently published book, "Microsoft .Net: Architecting Applications for the Enterprise", by Dino Esposito and Andrea Saltarello is almost a definitive reference on this subject, describing Microsoft technologies, from the much-abused Dataset to the recently-maligned Entity Framework, in the context of architecture patterns listed in Martin Fowler's classic "Patterns of Enterprise Application Architecture", while providing practical advice on when and how to apply various approaches on real world projects.  The book also does a great job tracing the evolution of the MVC pattern, through MVP "Passive View" and "Supervising Controller" variations, to its current instantiation as the Model-View-ViewModel pattern targeting WPF.  The book even includes discussion of the potential benefits of popular NON-Microsoft offerings, including NHibernate.

Other recent examples of discussion in this area include a Code magazine article by Miguel A. Castro, "WCF the Manual Way... the Right Way", describing shortcomings of the "Add Service Reference" option and default code generated by WCF project templates (others have voiced similar criticisms).  There have also been a number of variations on how to better segregate data access concerns through some form of generic "Repository" layer.  The recent posting of a "Vote of No Confidence" petition (signed by a number of Microsoft MVPs), following the release of version 1.0 of the Entity Framework is, in some sense, a reaction to "convenience" tools that some developers feel make it unecessarily hard to "do the right thing", and may lead inexperienced developers down an inappropriate path.  In this case, the Entity Framework team responded with changes to elements of the design planned for version 2.0, commited themselves to soliciting community feedback on an ongoing basis and, most reassuring of all, began consulting directly with DDD/OOD luminaries Eric Evans and Martin Fowler.

The competing M-V-XYZ "schools of thought" all share in the fact that they represent a recommendation to RESIST practices that Microsoft's tool set and documentation encourage by default (placing implementation logic directly in event handlers in the view's code-behind).  Whether you'll actually succeeed in getting your project dev. team members to reject IDE features that support the standard project workflow, to manually insert some M-V-Poo mini-framework, is open to question, especially since several of the most popular M-V-XYZ variations rely on advanced WPF features, like custom attached properties, to replace operations as basic as handling a simple ListBox selection change event.

Unlike diatribes against Microsoft technologies that were common years ago, those raising objections today tend to be hardcore FANS of Microsoft technologies.  The most influential advocates also tend to be pragmatists, repeatedly warning developers not to become overly obsessed with issues of design "purity".  On projects of limited scope, one-click "it just works" solutions that generate a little cross-concern "contamination" may be a perfectly reasonable and practical approach.  A product catalog, for example, requiring basic CRUD and query operations with little or no associated business logic, might be a good candidate for binding a Dataset directly to a DataGrid, or making use of the "Add Service Reference" project option although, technically, those approaches represent an inappropriate surfacing of service connection and data storage details in the UI layer.

The work of Microsoft's "Patterns and Practices Group" is supposed to represent "best practice" guidance in applying Microsoft technologies, but that group is not well known outside the ranks of the already-converted, and incorporating their libraries on a shipping product can meet with some resistance, since these aren't regarded as "full-fledged Microsoft product offerings.  PAG guidance is not reflected in the standard Microsoft tool set or mentioned in mainstream Microsoft presentations or sample code, leading to a natural reaction along the lines of "If this is so good, how come I've never heard of it, and why isn't it built into Visual Studio?".  The PAG group also tends to cripple their own cause, with a wide selection of offerings that seem to be in perpetual beta, and are often intimidating in their complexity ("Composite Application Guidance for WPF", for example, which members of a development team are apparently expected to tackle IN ADDITION to the already non-trivial task of understanding the underlying framework technologies).

Its currently not uncommon for Microsoft resources to describe a technology exclusively in terms of clicking this (Visual Studio) button, and pulling that lever... while highly-regarded developer community resources (Juval Lowy on WCF, for example), explicitly warn against relying on those same conveniences.  Just as Microsoft earlier managed to commit to making security a first order concern in all its internal development activity, it could also help make it easy for developers to "do the right thing" BY DEFAULT, by requiring all Microsoft tools, and public-facing materials, sample code, and presentations... to always take "best practice" conventions into consideration.  Ironically, the very developers Microsoft is targeting with its RAD tools are the same ones who most desperately need guidance and assistance in learning to write BETTER code -- who are effectively being led down a blind alley, with other developers left to clean up behind them, and try to explain why some code needs to be restructured when "that's the way Microsoft said to do it".

Tuesday, January 06, 2009 3:02:55 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -

© Copyright 2010, MissedMemo.com
DasBlog theme 'Business' created by Christoph De Baene (delarou)