Skip past navigation, straight to the content

Monthly Archives: October 2003

PDC Travel

I’m finalizing my PDC travel arrangements. I’ll be in LA from Sunday afternoon to Friday morning. I’ll be staying at the Sheraton Universal, which is unfortunately over 10 miles away from the convention center. Apparently there will be shuttle service between the hotel and the conference though.

I spent time today getting familiar with the hands-on labs I’ll be helping out with; we have some simple copy-paste walkthroughs for people to go through and construct a demo app. The talks are good for high-level overviews, but the labs will likely be the first development experience (albeit limited) developers have with Longhorn. I’m excited to hear their feedback.

Editor’s note: This entry ported from a previous site. The original post may still be availalbe.

PDC social scene?

So who knows the ins-and-outs of the PDC social scene? In Seattle I’m continuously flanked by supermodels and athletes, should I expect the same in LA?

Editor’s note: This entry ported from a previous site. The original post may still be available.

A few failures later …

I guess I forgot to mention this: I’ve had serious hard drive problems during the past three days; some sectors of my hard drive have been overrun by thugs and ruffians. There are plenty of worse times this could have happened (during the PDC), but this is a headache I didn’t need. After attempting some diagnostics (the hard drive issues are serious enough to crash and/or hang the diagnostic tools I tried), I’ve now re-partitioned my hard drive, leaving 5 GBs of un-partitioned no-man’s land in the middle of my drive.

This means I should have a working laptop for the PDC, which I consider essential. There will be a ridiculous number of bloggers at the PDC, and I’m really looking forward to reading some real-time feedback.

Soon I’ll be able to write more than “I’m looking forward to the PDC.”

Editor’s note: This entry ported from a previous site. The original post may still be available.

Not quite yet …

As covered by Joe and Scoble, getting into Southern California was neigh impossible today. My original flight was at 7pm today, but I changed it two days ago to 2pm so I could get into LA earlier. Had I left my flight unchanged, I would have still been able to get to LA tonight; I’m currently scheduled for Monday’s 2pm flight, meaning I’ll miss the keynote, a session or two, and least half of the Hands on Lab I’m supposed to be proctoring.

Editor’s note: This entry ported from a previous site. The original post may still be available.

Some Details (Finally!)

After much difficulty, I’m finally in LA; it’s great to see all the excitement at the convention center.

I managed to miss all the interesting keynotes, and arrived at about 7pm in time to visit the exposition center and talk to a few people at the Avalon booth.

So what do I do in Avalon? Up until very recently (more about this later), I was the Program Manager for Avalon’s Layout API. I was working on everything from the Layout system and the functions which drive layout, to the layouts which developers will use to display everything from a dialog box to a 100 page document.

My role will be shifting in the future to concentrate more on Longhorn’s document story (of course, I’ll still have a role in the rest of Avalon’s layout API).

Editor’s note: This entry ported from a previous site. The original post may still be available.

Newsgroups

We’ve created newsgroups for Avalon-related questions and discussion, check it out at microsoft.public.windows.developer.winfx.avalon.

(There are eight other newsgroups (but they’re not quite as cool):

P.S. Newsgator works pretty well for reading newsgroups in Outlook.)

Editor’s note: This entry ported from a previous site. The original post may still be available.

Commuting to the PDC

I’m staying at the Sheraton Universal hotel, which is over 10 miles away from the PDC. Shuttle service to and from the convention center is provided, but LA traffic means the commute takes a while. This is, however, a convenient time to try to go through some RSS feeds and write some replies. (This is why I vastly prefer full-text RSS feeds)

Editor’s note: This entry ported from a previous site. The original post may still be available.

Introduction to Avalon

Even if you’re not at the PDC, you can still learn about Avalon over at MSDN’s Longhorn Developer Center. Make sure to read Charles Petzold’s introduction to Avalon: Create Real Apps Using New Code and Markup Model.

[As of this writing, the average rating for the article is 5 of 9, with many votes of 1; I’m certain those votes came from readers who took the time to read the article, found it lacking in valuable information and content, and chose to rate it poorly]

Editor’s note: This entry ported from a previous site. The original post may still be available.

XAML vs XUL

“What’s the difference between XAML and XUL?”

Comparisons to XUL have been frequent lately, so I’ll address the issue from my (layout-centric) point of view.

As Roger points out: XAML’s (and Avalon’s) scope is significantly larger than XUL’s; XUL was created for constructing Mozilla’s GUI, as well as the GUI for applications / services which leverage the Mozilla platform. Avalon is much larger than this. The amount of services and functionality we’re providing in Avalon is quite large, and will take a while to digest; but once people start to get it, it’ll be clear why XAML is much larger than XUL.

[Aside: it is difficult to separate XAML and Avalon. XAML is a way to use the Avalon APIs through markup, XAML is translated directly into managed code, calling the same APIs used when constructing an application through code.]

  • XAML is far more extensible, you can use custom widgets and layouts from markup in XAML; doing so in XUL would require hacking into Mozilla’s source.
  • Avalon plugs into the .NET framework’s numerous libraries; XUL provides JavaScript hooks into the DOM and Mozilla’s libraries, which although useful, aren’t as complete (or extensible) as .NET’s.
  • Avalon provides a far richer model for documents than XUL. I will cover more of this in detail in future entries.
  • Avalon provides a wide-variety of Application and Document services, including deployment, rich databinding, accessibility and automation, online / offline storage and persisitance, and editing services, to name a few. I’m aware that XUL / Mozilla provide some of these services [deployment (through XPI), some level of databinding, and probably others], but I believe Avalon’s services are much richer and more extensible. However, I’m not an expert in Avalon and Mozilla’s capabilities in these areas.
  • XUL can’t be compiled, so you’ll always pay the performance cost of parsing.

There are many other differences — but my bus ride is over now. I’m certain this isn’t the last time I’ll be addressing these issues.

[Disclaimer: I’ve poked around with XUL before, but not very thoroughly — I may have some details wrong here. Feel free to correct me. I’ve used Dave Hyatt’s XUL summary as a refresher.]

Editor’s note: This entry ported from a previous site. The original post may still be available.

Information Overload

All the feedback and questions on the newsgroups and weblogs are great, but I have no idea how I’ll be able to keep up with all of it! I’m using NewsGator to download and aggregate my RSS and NNTP feeds, and Outlook’s search folders to sift through information.

I’m trying to watch a bunch of feeds, but the signal to noise ratio can be quite high. I’ve got search folders for anything mentioning Layout, Panels, Documents, or my name … feel free to let me know if there’s anything else I should check out / reply to. You can reach me at ffortes@youknowwho …

Editor’s note: This entry ported from a previous site. The original post may still be available.

PDC Advice: Skip the Hands-on Labs

I’m proctoring the Hands on Labs, but my advice to attendees is to skip the labs.

Why? You’ve only got a limited amount of time at the PDC, so going to the labs means you’re missing out on a session, keynote, birds of a feather session, or socializing with fellow attendees, whereas the lab materials will be available online. You won’t have an Avalon team member over your shoulder, but you can easily ask questions through newsgroups or weblogs.

Editor’s note: This entry ported from a previous site. The original post may still be available.

At the Client Track Lounge

I’m hanging out at the Client Track Lounge, catching up on email and weblogs. Feel free to stop by and say hi, or ask questions.

[The track lounges are a great place to find MS people and ask questions, or just sit on the couch and use the network]

Editor’s note: This entry ported from a previous site. The original post may still be available.

Why Vectors?

Barry Gervin writes:

Another cool thing about longhorn is that the UI is all vector based. So you can do things like rotate your buttons and text boxes etc. Pretty cool, not very useful. Being able to zoom in on a part of your text though and still have a pretty (not aliased) image is wonderful.

Vector graphics do look quite good (and often take up less disk space than pixel-based graphics), but they’re definitely useful for other reasons.

If you’re at the PDC, stop by the Avalon booth and check out the 200 dpi monitor we have on display. Have the person working the booth fire up a few applications for you; notice how the bitmapped graphics are either:

  1. (more likely) Tiny. It turns out that 100 pixels aren’t that large on a 200dpi monitor.
  2. (less likely) Jaggy. Bitmaps don’t scale well.

With vectors you don’t have this problem. Scaling doesn’t only happen for high DPI monitors. Vision-impaired users need to be able to scale UI as well.

Also, using vectors from markup enables programmatic access to your graphics. With vector graphics in Avalon, changing the fill or stroke for a rectangle is trivial. Try doing that with a bitmap.

Editor’s note: This entry ported from a previous site. The original post may still be available.

A Super-Quick Introduction to Layout

Avalon provides a few “Panel” classes which size and position their content in different ways. FlowPanel, GridPanel, DockPanel, and Canvasapply different sizing and positioning behavior for their children.

Additionally, TextPanel and Table provide rich layout functionality for text content. These elements provide rich functionality for text layout, including lists, columns, and figures. You can, naturally, nest other Panels within these elements as well.

MSDN has plenty of good content. Introduction to Panels is a good place to start, or go straight to the Layout overview listing. Of course, I’ll be going into more depth here as well.

Editor’s note: This entry ported from a previous site. The original post may still be available.

Back in Seattle

I’m back in from the PDC, and more than a bit behind on my mail, reading, and weblog; patience.

Editor’s note: This entry ported from a previous site. The original post may still be available.

Breaking Across Pages

James Clark asks a couple of questions about pagination in my comments:

Obviously a single paragraph has to be able to broken across multiple pages. How do TextPanel and block-level elements interact to allow this? Is it possible for a Table to split over multiple pages?

Short answers: In most cases, TextPanel is responsible for the layout and visual representation of its contents. When this is not true (as with Table), there are optional interfaces which a class can implement in order to support breaking across pages.

Long answer: I don’t have time right now to go into too much detail, so this will be brief (and incomplete). If there’s interest in this area, I can go into more detail in future entries.

Classes such as Image and DockPanel are responsible for their layout and rendering. This works fine for a simple class such as Image, which does not need to break across lines and cannot intelligently break across pages.

In contrast, classes such as Bold and Italic, are not responsible for their layout and rendering. Layout and rendering are instead handled by the parent TextPanel (or another element which can layout and render text content). There are a variety of reasons for doing this, but the relevant reason is that TextPanel wants to be able to break the contents of a Bold or Italic tag across lines. (Of course, we could hook up the right APIs and enable these classes to perform their own layout and rendering, but this would mean more work and less performance)

In the case of Paragraph, breaking its content across multiple columns or pages is the responsibility of the parent TextPanel, as Paragraph does not do its own layout and rendering. However, this is not the case with Table, or any other element which does its own layout and wishes to break across pages. If an element wishes to support breaking across pages, it can implement the IDocumentFormatter and IDocumentHost interfaces, which will enable it to be hosted in a paginated context.

Also from the comment:

The concept of “attached properties” looks like a new one. It seems like the idea is that an object of class X occurring as a descendant of an object of class Y can have a property P that is not understood by X but is understood by Y and is used by Y in laying out X.

Attached properties allow any class to attach a property to any other class; it does not have to be a descendant. You’re correct that class X (the attachee) does not know how to interpret the property which was attached by Y.

… What if X has distinct logical and visual trees (e.g. paragraph vs lines)? Presumably Y will be taking the visual tree produced by laying out X and be using that visual tree in laying itself out. If so, how does it get access to the properties attached to X’s logical tree?

Because TextPanel creates the visuals for the Paragraph lines, the scenario you’ve described doesn’t occur. In general, most layouts interact with their direct visual children, so they would be checking only the direct children for an attached property. (This is the case for layouts, which tend to have identical logical and visual trees, with the notable exception of text layouts)

Editor’s note: This entry ported from a previous site. The original post may still be available.