What the Heck is an Application, Anyway?

I promised that I would explain a little bit about what “Application Model” means, and more specifically what it means for Avalon. Before we can even get too far there, it’s interesting to ask a simple question: what do we mean by “application” in the first place?

A lot of application platforms don’t do a great job of answering that question. Take these two big categories of app development platforms as examples:

  • Desktop Applications: In the traditional desktop app world, there hasn’t ever been a very good model for what an application actually is. Take Win32, for example — here an application is roughly a set of windows in the same process. Because there isn’t an entity representing the app itself, the traditional practice is to pump messages (WM_EXIT) to the main window’s wndproc. State management and manipulation isn’t as hard as it is on the Web, but it is left up to the developer.

    In the Windows world, perhaps the best we’ve done so far in this area is with Windows Forms, which provides an Application class that starts and stops the message loop and receives system messages.

  • Web Applications: There are some parallel issues in the Web development world. Traditionally, a Web “app” is roughly a set of pages hosted on the same server (usually) that are part of some interactive user activity. Most of the “application-ness” comes from communication with the server, which is done through post-back (and the user experience of post-back is of course sub-optimal, especially for users with slow connections). State management is hard, especially when passing data between pages because of the lack of structured data.

    Today we have server-side scripting languages that make “application-ness” for Web apps easier to grok. ASP.Net, for example, provides application-level services for state and session management. Additionally, there have been advances in ASP.Net that enable more and more things to happen on the client side and thus reduce post-back.

With Avalon, we’ve learned some lessons from both of these app paradigms. We’ve defined an application in terms of an object that represents application-ness (which is a godsend for those of us who can’t help thinking in object-oriented terms most of the time), and provided object model there that lets our developers manage common application-related activities. Thus we are able to leverage some of the lessons we’ve learned from other app platforms by:

  • Providing a well-defined entity for system interaction (the Application class).
  • Enabling you to customize that entity by hanging any state off of it that you want.
  • Enabling you to listen to app-wide events at the Application level.
  • Providing simple object model around window management.
  • Handling resource management for you, allowing you to refer to your application’s embedded resources (pages, images, etc.) using relative URIs (a lot more on this topic later).

Messenger 7 and WinFx Feedback Portals

MSN Messenger 7 has a highly addictive new feature that enables members to play games with each other while chatting. I had fun bugging Kenny to play Checkers with me tonight while he tried to write his post about providing user feedback for Indigo. Which reminded me that in my post about Ladybug from a few days ago, I should have also mentioned the Avalon newsgroup. There is a lot of good discussion going on there; feel free to come join if you just want to learn from some of the experts who post there, or if you have any questions or comments of your own.

Ladybug for Avalon

This seemed to happen without a lot of fanfare, so I want to make sure it gets some attention: you can now report feedback and bugs on Avalon at the MSDN Product Support Center (also fondly known as Ladybug). There are a few good comments on there already, but I’m sure other issues have been found by many others out there who just haven’t been aware of the best way to report them. We know that our CTP release wasn’t perfect, and we want to hear about the issues/missing features/bugs that are blocking your development!

And for the skeptics: yes, yes, yes, we really do read these comments.

Will Life Ever be Sane Again?

I’ve been thinking about starting to blog a bit about my work (now that our project is actually out in the wild, a few of us have started to do that already).

I work on a project which is code named “Avalon” (one of my favorite things about pre-release projects at Microsoft is the sexy code names), and we are building a powerful new application client platform from the ground up. If you want some more background, the MSDN docs can help get you started, and there seems to be a bit of chatter about us on the web already. :)

I am the Application Model Program Manager for Avalon. A lot of people don’t really know what “Application Model” actually means when they first hear the term, so I’ll spend a little time talking about that, and then show you how to build some cool things in Avalon.

I may start by dissecting a very basic Avalon app and explaining what’s actually happening in our framework. If you have any suggestions for other Avalon-related content you’d like to see here, feel free to post a comment or drop me a line. And if you really want to get a head start before I go into much depth, go download our Community Tech Preview and start playing!