The Imaginative Universal

Studies in Virtual Phenomenology -- @jamesashley

UI Design Pattern Resources

June 28
by James Ashley 28. June 2009 22:36

knitting

I had a great time at Codestock this year.  It wasn’t the pot-smoking, free-loving, mind-altering tribal experience I was afraid of and I didn’t see a single guitar the entire time – though I did talk with one guitar player.

The organizers – Michael Neel, Alan Stevens and Wally McClure -- did a fantastic job and the Knoxville community is quite amazing and enthusiastic.  I also got to meet many people I had previously only known by reputation.

I presented on “The Uses and Abuses of UI Design Patterns” on Saturday afternoon.  I wanted to build out some examples of using a modified MV-VM pattern in WinForms and ASP.NET before publishing the code samples, but wanted to make sure I published out the references from the slide deck.

The point of the references is that while UI design patterns are all plagued by a tendency to have fuzzy boundaries – that is, it can be difficult to compare patterns between different technologies and sometimes can even be difficult to distinguish patterns used in one technology – there is still a paper trail on the Internet that give us clues as to where the design patterns (MVC, MVC Model 2, MVP, SVC, PV, PM, MVVM) came from and how they were originally intended to be used.

In general, the Supervising Controller and Passive View patterns are the best defined, while MVC is perhaps the least well defined.  MV-VM, on the other hand, has some of the best examples on usage – not least because it is so tightly associated with WPF.

1988 - MVC: Journal of Object Oriented Programming Vol 1 Issue 3 http://portal.acm.org/citation.cfm?id=50759&dl=GUIDE&coll=GUIDE&CFID=41635617&CFTOKEN=20661505

1997-99 - MVC Model 2: Java Sun JSP Architecture http://java.sun.com/blueprints/guidelines/.../application_scenarios/index.html

2004 - MVP: Martin Fowler  http://martinfowler.com/eaaDev/uiArchs.html

2004 - Presenter Model  http://martinfowler.com/eaaDev/PresentationModel.html

2006 - Passive View and Supervising Controller: Martin Fowler http://martinfowler.com/eaaDev/ModelViewPresenter.html

2005-09 – MVVM: John Gossman http://blogs.msdn.com/johngossman/archive/2005/10/08/478683.aspx

MVVM: Josh Smith  http://msdn.microsoft.com/en-us/magazine/dd419663.aspx

An additional resource is this site http://c2.com/cgi/wiki?ModelViewControllerHistory from which we learn that the first MVC pattern can be attributed to Trygve Reenskaug sometime in the 70’s.

Perhaps the most authoritative source for the origins of the MVMV pattern, in turn, comes from the WPF MVVM toolkit (available on Codeplex) where we are told:

Model-View-ViewModel (MVVM) is a derivative of MVC that takes advantage of particular strengths of the Windows Presentation Foundation (WPF) architecture to separate the Model and the View by introducing an abstract layer between them: a “Model of the View,” or ViewModel. The origins of this pattern are obscure, but it probably derives from the Smalltalk ApplicationModel pattern, as does the PresentationModel pattern described by Martin Fowler. It was adapted for WPF use by the Expression team as they developed version 1 of Blend. Without the WPF-specific aspects, the Model-View-ViewModel pattern is identical with PresentationModel.

Tags:

Recommended

Atlanta .NET User Group

October 24
by James Ashley 24. October 2008 18:38

I will be presenting on "Working with new ASP.NET features in .NET Framework 3.5 Service Pack 1" at the Atlanta .NET User Group on Monday, October 27th.  Magenic will be providing refreshments, as usual.   The meeting will begin at 6:00 PM at Microsoft's Offices in Alpharetta.  It's a lot of material to pack into an hour long presentation, but I think I have a few good strategies for working with that.  The presentation will cover Dynamic Data, Entity Framework, Data Services, the Silverlight Media Control, the Ajax browser history feature built into the Script Manager, and Script Combining.  That gives me about 10 minutes per technology.  Whew.

Microsoft Corporation
1125 Sanctuary Pkwy.
Suite 300
Atlanta, GA 30004

Directions to Microsoft

Tags: , ,

.Net | Ajax | Recommended

Piratical Reads

September 19
by James Ashley 19. September 2008 20:54

pirate_freedom  strangertides

Apparently it is that time of year again.  It's talk like a pirate day. 

Apropos of that, I'd like to recommend two good pirate books.  Pirate books, as a genre, have never seemed to quite catch on.  With Treasure Island they seem to have plateaued out, and pretty much just went underground after that.  Nevertheless, pirate books have caught the attention of some good writers willing to take the genre out for a spin.

Two of my favorites are Gene Wolfe's Pirate Freedom and Tim Powers' On Stranger Tides.  The first is a time travelling pirate story with Wolfe's typically unreliable narrator, while the second revolves around Blackbeard, voodoo rituals, and Powers' common concerns with Catholic teaching and the occult.  In the spirit of the day, I'm going to rip off some passages from these two fine novels.  From Pirate Freedom:

"What really happened was that they hollered for a parlay.  They swore they would not hurt anybody we sent to talk to them, but they would not send anybody out to talk to us.  there was a lot of jawing back and forth about that because nobody on their side could speak much French and Melind could not speak much Spanish.

"That was when I did one of the dumbest things I have ever done in my life.  I told him I spoke Spanish better than he did, and I would translate for him.  So before long Melind and I left our muskets and knives behind and went up the beach and into the edge of the rain forest to talk to them.

"There were two, a Spanish officer and a Spanish farmer. From what I saw, the officer had about ten soldiers and the farmer maybe a hundred other farmers.  Once they got us into the trees they grabbed us and searched us for weapons, and of course they found my money belt and kept the money.  Melind protested and I yelled my head off, but it did no good.  Before long they told us they would kill us both if we did not shut up about it.

"That was when I tried to jump them.  A farmer standing pretty near me had a big knife in his belt, with the handle sticking out.  I grabbed it and went for the Spanish officer.  I would have killed them all then and there if I could, and I have never hated anybody in my life the way I hated that guy.  That was my money, I had earned it with worry, hard work, and tough decisions, and they had sworn we would be okay if we left our weapons behind and came over.

"I got that officer in the side, before somebody hit me.  When I was conscious again (and feeling like something scraped off a shoe), my hands were tied behind me, and so were Melind's."

And from On Stranger Tides:

"'Come on, devil,' Blackbeard raged, a fearsome sight with his teeth and the whites of his mad eyes glittering in the glow of the smoldering match-cords woven into his man, 'wave some more bushes in my face!'  Not even waiting for the foreign loa's response he waded straight into the primeval rain forest, shouting and whirling his cutlass.  'Coo yah, you quashie pattu-owl!' he bellowed, reverting almost entirely to what Shandy could now recognize as Jamaican mountain tribe patois.  'It takes more than one deggeh bungo duppy to scare off a tallowah hunsi kanzo!'"

Shandy could hardly see Blackbeard now, though he saw the vines jumping and heard the chopping of the cutlass and the clatter and splash of wrecked verdure flying in all directions.  Crouched back and gripping his knife, Shandy had a moment to wonder if this maniacal raging was the only way Blackbeard allowed himself to vent fear -- and then the giant pirate had burst back out of the jungle, some of his beard-trimming match-cords extinguished but his fury as awesome as before. 

Tags:

Recommended