Attached Behaviors are the New OLE (a.k.a. Long Live Components)

Pruning through the old Google Reader starred items list was supposed to only take me an hour or so Saturday morning. But sandwiched between some other diversions, it ended up taking me the whole weekend. One of the last things I read was
Mac OS X 10.6 Snow Leopard: the Ars Technica review
(that was an hour right there all by itself). Flipped through some of the old Mac OS X articles, particularly those right at the turn of the Classic Mac OS transition almost ten years ago. You remember Classic Mac OS, right? With Cyberdog and OpenDoc? Windows users will remember the ideas more as OLE and its foundation COM, and a generation of applications where the screen jumped to and fro whenever you clicked somewhere you weren’t supposed to as menubars popped up and disappeared. And of course, there was J2EE .

Maybe these technologies suffered from being too ambitious or too undefined in scope, but for whatever reason, they’ve been consigned to the dustbin of history. But the dream of having arbitrary components that could just be snapped together like building blocks never seems to die, and maybe we’re finally reaching the point in technology’s history where that could be a possibility. OLE, OpenDoc, and J2EE all assumed those building blocks were gigantic—plug six or seven them together and boom, you’ve got an app—whereas realistically, they’re probably much closer to LEGO®-sized. You’ll need a lot of them before you get something that makes sense—and consequently, you need a little bit of computer know-how.

Fellow Lab49er Charlie Robbins blogged a few weeks ago about a few
sample Silverlight projects that added physics-based behaviors to a canvas with a few items in it. It’s downright silly what you can do with behaviors now, and I wonder if we’re not too far off from seeing a scaled-down version of the component dream realized. It always seemed like overkill to have an IntegerTextBox, or a DateTextBox. But an IntegerBehavior/DateBehavior that can be applied to a TextBox, or a grid cell? Or a behavior that could be applied to a Label to make it an editable TextBox upon a double-click? Or better yet, two behaviors, one to make a label editable on a double-click, and another to restrict to date entry? Much more awesome…

If you haven’t read up on attached behaviors yet, you should. I would argue that a proper MVVM design necessitates attached behaviors—they’re everything that doesn’t belong in the viewmodel layer, but since your views should be stupid and codeless, your “enforce integerness” behavior has to end up somewhere. With viewmodels and attached behaviors, you might never need to write another line of code-behind ever again. —DKT

Links O’Clock; 2009.09.25

Normally, throughout the week, I star a whole bunch of things in Google Reader that I want to go back to when I’m not busy jostling for space on the New York subways or when I’m back at my comfortable desk at home with my giant monitors. Unfortunately for me, I star articles about 500% faster than I can read them, so every once in a while, I have to give myself a weekend dedicated to purging that star list so that I don’t forget about things that I really really did want to read (Mr. Siracusa doesn’t write as often as most people, but he makes up for it).

So it’s time for the first-ever Links O’Clock here; most of these articles go back at least two months or more, but hey, maybe you missed it the first time the Internet collectively decided they were worth reading. I don’t think Links O’Clock will normally be this long, but we’ll see.

Also gonna try giving Google Reader’s “Shared items” feature a ride—I keep hitting it by accident in my main newsreader, but now I’ll hit it on purpose (link).


It seems fitting that my desire to purge my starred article backlog leads me to this article likening obesity to information overload:
http://www.core77.com/blog/featured_items/no_more_feeds_please_how_abundant_information_is_making_us_fat_14248.asp

I once tried using a 3D designing app once. I flung the mouse out the window in disgust after several hours of hair-pulling madness. This would have been a far more entertaining experience:
http://www.ilovesketch.com/

For those of you trying to skin your latest GUI, you might be tearing your hair out trying to pick perfect colors. Don’t go bald—just use this:
http://colorschemedesigner.com/

Matthias Shapiro talking about effective visualization with some very concrete and awesome examples—it’s an Ignite Show video, so it’s five minutes long, which is about the longest video I’ll watch before I start wishing I had my computer hooked up to my TV:
http://www.designerwpf.com/2009/09/16/now-playing-on-the-ignite-show/

Another interesting visualization by Ben Fry—living in this country is often defined by driving, so I shouldn’t be so surprised that roads alone do such a remarkable job punctuating the landscape:
http://benfry.com/allstreets/index.html

I’m always a sucker for a good how’d-they-done-it story: The making of the NPR News iPhone App, complete with mockups, requirements identification and gathering—all that good process-y stuff:
http://www.npr.org/blogs/inside/2009/08/the_making_of_the_npr_news_iph.html

If you’re working on building iPhone applications and you want to generate super-realistic pictures of what your app will look like before you even install the Developer Tools:
http://mockapp.com/

Another UI mocking tool for iPhone apps, but you’ll have to write a little code
http://giveabrief.com/

—DKT