Interview de Michael Stuart par Sami Jaber(webmaster[@]dotnetguru.org)

 

epuis l'annonce de l'imminente release du Framework UIP, le sujet a semble t-il suscité un vif intérêt auprès de la communauté tout en apportant son lot d'interrogations. Nous avons voulu en savoir plus sur UIP en questionnant directement le créateur du produit : Michael Stuart. Il nous livre ici ces premiers ressentiments du produit avec parfois une pointe d'humour qui en dit long sur le personnage : Un développeur passionné, passionnant et drôle. 

Michael Stuart


Michael Stuart est consultant sénior chez MCS (Microsoft Consultant Services) où il s'est spécialisé dans les concepts d'architecture. Il est à l'origine des applications block de .NET dont il développe les futurs bluebricks à destination des développeurs et se passionne pour les courses automobiles (il assiste régulièrement aux 24h du Mans).

Fana des technologies Microsoft depuis la première heure il s'est fait tatouer un logo Windows sur le bras pour se dissuader de passer chez un concurrent. 


Interview

Michael, Who are you, what is your background and your role inside Microsoft Corp ?

Michael Stuart : I’m a Senior Consultant at Microsoft. Microsoft Consulting Services provides services to Microsoft’s enterprise customers; from my perspective as a developer it means I work for many of our largest customers helping them develop software successfully on the Microsoft platform, extracting the very best of what I truly believe are the finest technologies out there. It’s a pretty fun job really; in my case a lot of coding, but also a lot of helping customers with development process, and communicating effectively WHY and HOW to do a particular piece of work. Our customers’ developers are sharp (clever, “n’est pas bete”), and it’s challenging to walk in fresh to a business you don’t know and help the teams there write code that serves their business need. I’ve done everything from multi-threaded web-scraping engines with heuristics for “guessing” data, to gas pipeline operation systems, to airline reservation systems.

My background? Actually kind of weird. I started with computing in the Atari, TRS-80, 6502 days; my first machine was a single-board 8086 with a Hex keypad…I was 10. I took a deviation in college and went to medical school, graduated, and started residency. That turned out to be a big mistake; I dreaded every day. So I came back to computing during the Internet boom of the late 90’s, and started a small company that did e-commerce sites for small businesses…all COM, MTS, VB6, SQL Server, and XML.

Microsoft recruited me, and I’ve been working here for three years…I guess I like it, because I have a Windows XP logo tattooed on my right arm. Yes it’s real. No I’m not kidding. Yes I will never be able to work for a competitor without surgery :-).

Can you describe us shortly UIP objectives ?

Michael Stuart : The UIP—“User Interface Process”—is one of the PAG (Patterns & Practices now) team’s “Bluebrick” projects. Bluebricks are intended to give .NET devs “building blocks” for creating apps; they’re meant to address all those common issues we all face as developers but are either tedious to do or difficult to do correctly, but widely applicable.

Previous “Bricks” include the Data Access Application Block and the Exception Management block; they’re incredibly popular.

UIP is like MVC on steroids. It serves four purposes:

  1. Make Windows programming and Web programming more portable; allow much easier migrations between these, and other forms—such as compact framework.
  2. Move navigation and workflow logic OUT of the UI layer, and put it back in the business layer where it belongs. Make workflow a declarative engine, so you can more easily extend/revise application UI flow
  3. Create the notion of a “Task”; a persistable entity that can flow through user logons, machines, and chronological boundaries; be able to “dehydrate” the state of a user interaction and pass it to another user, machine, or time
  4. Pull state management OUT of the UI layer and keep it abstract, inside the business layer

How do you (or your staff) plan to brand UIP ?

Michael Stuart : I don’t have a “staff”, The PAG team takes care of marketing/branding etc. Mostly it’s word-of-mouth; you won’t see Wall Street Journal ads for PAG stuff ! The Bricks are by developers, for developers.

One of the real engines behind popularizing and implementing Bluebricks is Ed Jezierski, my Program Manager and friend. Of course, PAG is a pretty large team; developers, testers, writers, PM’s, the whole shebang…it’s a team effort. I’m working with guys in Argentina (Lagash, _really_ sharp developers), writers from ContentMaster in the UK—they are amazing, they’re good developers AND good writers, it makes the docs sparkle. Having doc writers that can do code too means I have people saying “Hey, this is too hard to work with!”; plus at the end I get docs that really explain WHY we did things, not just WHAT.

What we have now is a real grass-roots effort. I’ve been working with PAG for six months, and during that time we’ve built a Beta-customer base of a dozen or so large customers and literally hundreds of small companies/individual developers. We have our GotDotNet workspace-- http://www.gotdotnet.com/Community/Workspaces/workspace.aspx?id=ba6270ca-f1cd-4489-8232-14815f9935ac – and that will expand to one workspace for each released Brick. The GotDotNet workspaces will become the community focus-point for these Bricks. The extensibility we’ve built into the Bricks will be exercised on GotDotNet…for example, I expect people will post:

We’ll also probably see tweaked versions of UIP that do things we couldn’t fit in this release. We are even considering doing “blessed” versions of those mods that could be supported….BTW the Bricks are PSS-supported, we just can’t support add-ons unless we decide to do the “blessing” process.

Why have you used a Design Pattern State oriented Framework instead of a MVC one ?

Michael Stuart
: We looked at MANY implementations and patterns, including MVC, FrontController, Observer. We looked at Struts. We looked at several very good .NET MVC’s including Maverick. Our customers wanted more than JUST MVC, they wanted us to make workflow a first-class citizen, and many of them needed an easy way to migrate win-web, web-win. Also many needed “dehydrated tasks”. So UIP serves those needs, while also serving the core MVC needs.

Is the navigation based on sendRedirect or Server.Transfer calls and how do you pass information between pages ?

Michael Stuart : We decided to use Server.Redirect with “false” option so that we don’t throw a ThreadAbortException on every redirect. Transfer() is OK but it leaves the browser URL wrong, customers didn’t want that.
But note : this all happens in our default Web “WebFormViewManager”; which implements IViewManager, so it is very easy to do your own and just plug it into the config file. BE SURE TO USE THE “fully-qualified assembly name”!  (name, version, culture, public key token).

Can i access to my controller class inside a WebView ?

Michael Stuart : Yes, the hierarchy from a View’s perspective is: In my View, I just “have” my Controller. It’s put there because by default Views inherit from the WebFormView or the WinFormView, and that base class gets the Controller for you from the UIPManager.

Then, from View, you can say "myStruct = (StructType)_controller.State[ ‘myKey’ ];" and all is well. We highly recommend that you do all property SETS in State via method calls to Controller; this discipline means Controller gets to intercept SET calls and act appropriately, and in the “IsDirty” scenario makes knowing about changes a lot easier !

Also many sites will choose to do stateless; we don’t require you to use State for app data, just for the stuff UIPManager cares about like “CurrentView”. So you could do all data transmission directly through Controller and have Controller _thunk_ that state right into the back-end. More scalable, less performant as always.

The Controller is really three things: A Façade to the BL, an interception layer for State, and the final word on when a View is “done” and when it’s time to go to the next View.

Controllers don’t really know what the next View is—the UIPManager knows that. What Controllers do is set a “NavigateValue” in State; they say what the outcome was, the UIPManager decides what View corresponds to that outcome.

How exceptions are managed in UIP model ?

Michael Stuart : We don’t override any of the usual ASP.NET exception models; you can still do global error pages. BUT we do encourage you to have one View defined that is an “ErrorView”, and then for each node of the Navigation Graph, if the Controller thinks things suck, it can set the NavigateValue to “error” or whatever, and UIPManager will take you to the ErrorView.

Is it planned to develop a UIP specific add-in within VS.NET with a GUI ?

Michael Stuart : There is some work on that now. What we’d like to do is have a visual tool for editing nav-graphs, just drag-and-drop, and generate the XML. Future work MIGHT (no promises) include having some code-gen that puts together the stubs in a Controller derivative, and also walks your assembly for State, Controller, View, ViewManager objects and makes putting together a solution with UIP very easy, very click-and-drag.

I wish we could do this work for this release, but we DO have a budget. Microsoft is vey careful with money—we don’t go Ivory-Tower or feature-crazy until we know customers like something, at least that’s been my experience….but what do I know! J We wanted a _quality_ release that met those four goals above….we can add sugar later.

Can we hope that the next MS PetShop will implement something similar to UIP ?

Michael Stuart : I spoke with the PetShop guys early in UIP’s life, but I think UIP was too infantile at the time for them to really use it for what they were doing….but I believe they (Gregory Leake and his team) have made great efforts to ensure that the new PetShop is very clean, very good architecturally. The latest PetShop is in final Edit now, so expect to see it soon. Maybe for PetShop 4.0, they can use all our Bluebricks (?).

BTW—could you mention too that we are about to release not just UIP, but Configuration Manager and the all-new rewritten Updater ?

Dont acte. (Sami)

Merci Michael !

L'avis de DotNetGuru    

Nous publierons un article complet sur UIP dès que nous aurons terminé nos tests produit. Ce Framework est dans tous les cas une heureuse initiative car il conduit à structurer plus finement les différents développements Web suivant un automate à états finis. A ce sujet, DotNetGuru avait déjà l'année dernière vanté les mérites d'une telle architecture à travers un article proposant justement ce type de Design  dont Michael s'est inspiré (comme quoi ce travail n'aura pas été vain).

Propos recueillis par : Sami JABER

Copyright : DotNetGuru © Mai 2003