Welcome to Office Zealot Sign in | Join | Help

Avalon Adventures…The Good, the Bad and the Ugly

Avalon Adventures…The Good, the Bad and the Ugly

 

CAVEAT: before you read this post you need to be aware that the CTP of Avalon is a pre-alpha/pre-beta development tool. Some of the comments in this blog post can be directly attributed to the relative immaturity of the code. 

 

First I am going to start with a confession. Before this process of creating a data enabled Avalon application I was not a real big fan of XAML and Avalon…I was probably a “hater” for lack of a better term.

 

I’m now more of a fan of this new technology. I am more accepting of what XAML and Avalon provide. I find some of the things in Avalon to be downright cool.

 

So here are some of my impressions of the current state of Avalon and XAML.

 

The Good

 

Data Binding: I think the data binding features of Avalon work pretty well. I like the granular control I have with data binding. You can bind data to pretty much any form, canvas, control and property.

 

Converters: I was partially successful with converters. I like having the ability to attach code behaviors to properties exposed on controls. I was never able to get the converter working on my list controls. This was more a function of my time than anything. David Jenni helped me figure out what was going on in my code… I just ran out of time to get it done.

 

XAML: OK, XAML is not so bad… I sort of like the ability to lay out forms using a structured methodology.

 

The Avalon Team: One item that I found cool was how receptive the Avalon team is to tons of pesky e-mails. As mentioned in earlier blog entries Chris Sells, Anderson, David Jenni, Etc… were very helpful in providing guidance. This is something I find cool about working with folks at MSFT.

 

The Bad

 

Documentation: The documentation that ships with the CTP is not as up to date as I would like.  There seemed to be a number of deprecated features still in the docs as well as new features that were not very well documented

 

Sample Code: A lot of the samples provided online did not work with this CTP. Whenever a new CTP is released MSFT should insure that all examples provided on line work with that release. That should be the minimal smoke test for this stuff. From what I recall the Converter section of Chris Sell’s paper has interfaces that were no longer supported.

 

Few If Any VB Sample Code Online: The world is full of VB.NET programmers too. MSFT needs to make sure samples put online and in MSDN magazine have code written in that “other” language.

 

Events – There are a number of events that

A)    Do not work (list boxes don’t surface double clicks correctly)

B)    Have too much granularity – One control I looked at had PenDoubleClick MouseDoubleClick, etc… isn’t a double click a double click ?

C)    The Visual Basic Compiler needs to be able to use the Handles command. Currently you are forced to add handlers manually. This is a simple fix and I hope it is in the next iteration.

 

 

The Ugly

 

 

No Grid (updated 01.19.2005) DataGrid Control – This is a show stopper in a business development environment. In my sample code I had to resort to using a list box to emulate the functionality of a grid for child tables. If Avalon ships without this feature it will not make it in a business environment.

 

No Development Tools: This is another show stopper. And I’m sure 100% obvious to the team at MSFT. Without a UI designer for creating your XAML forms adoption of Avalon will be slow at best.

 

Replacing WinForms: The one thing that helps me sleep better is that this technology has may more years to go under development. What I would like to see is XAML become a tool for providing code-gen to create Windows and WebForms. This will help preserve the large investments in Windows and WebForms development while also providing a better migration path. This is what Xamalon is doing now, Microsoft should look at what they are doing and buy them or build their own.

 

 

 

Published Tuesday, January 18, 2005 12:36 PM by rod

Comments

# re: Avalon Adventures…The Good, the Bad and the Ugly

Wednesday, January 19, 2005 12:36 PM by Anonymous
RE: No Grid Control

I think you must have missed it. Here's[1] the one that lays out controls. Then there's a highly specialized Table control[2] that's meant for complex text layout.

HTH,
Drew

[1] http://winfx.msdn.microsoft.com/?//winfx.msdn.microsoft.com/winfx/layout/overviews/grid_ovw.aspx
[2] http://winfx.msdn.microsoft.com/?//winfx.msdn.microsoft.com/winfx/ref/ns/system.windows.controls/c/gridpanel/gridpanel.aspx

# re: Avalon Adventures…The Good, the Bad and the Ugly

Wednesday, January 19, 2005 12:43 PM by rod
Drew,

Thanks for the new info I'll take a look at that.

I did update the blog entry to say DataGrid which is what I meant to say.

# re: Avalon Adventures…The Good, the Bad and the Ugly

Wednesday, January 19, 2005 1:32 PM by Anonymous
The ugliest thing for me is the lack of a good immediate mode rendering system replacement for GDI+, upon which scalable vector graphics systems can be built. As is, Avalon is fundamentally unscalable and unusable for CAD and other types of applications where you must create hundreds of thousands of graphical objects.

# re: Avalon Adventures…The Good, the Bad and the Ugly

Wednesday, January 19, 2005 1:33 PM by Anonymous
Ahh... a DataGrid, yes that's definitely a diff. story. :)

In that case you are correct. Grid doesn't understand binding to multiple results yet AFAICT. TableBody[1], related to Table, on the other hand does have support for binding to multiple items, but unfortunately that's only going to help with Text only displays. If you wanted controls repeated I'm not exactly sure what the approach is yet.

FYI, the key to finding things that understand how to bind to lists of data is to look for who implements IGeneratorHost[2]. Right now it's pretty much TableBody and anything derived from ItemsControl[3] (ListBox, RadioButtonList, TabControl, etc.

Cheers,
Drew

[1] http://winfx.msdn.microsoft.com/?//winfx.msdn.microsoft.com/winfx/ref/ns/system.windows.documents/c/tablebody/tablebody.aspx
[2] http://winfx.msdn.microsoft.com/?//winfx.msdn.microsoft.com/winfx/ref/ns/system.windows.controls/i/igeneratorhost/igeneratorhost.aspx
[3] http://winfx.msdn.microsoft.com/?//winfx.msdn.microsoft.com/winfx/ref/ns/system.windows.controls/c/itemscontrol/itemscontrol.aspx

# re: Avalon Adventures…The Good, the Bad and the Ugly

Thursday, January 20, 2005 6:00 AM by Anonymous
Hi i want to start learning avalon now, the problem i have is its too big to dload..i am using a 56k modem, is there a way to get it on disk.

Thank you.

# Avalon - Avalon - Visual Studio 2005(Whidbey)

Thursday, January 20, 2005 9:44 AM by Anonymous
Hi!
I'm new with Avalon!
I would like to thank you for your blog, it's being very helpful.

I'm having problems with data binding.
I can connect to my database(Oracle), but i can't visualize it with the Avalon System.Windows.Controls.Grid.

Can you help? :)

Thanks
sgad :)

# re: Avalon Adventures…The Good, the Bad and the Ugly

Thursday, January 20, 2005 10:27 AM by Anonymous
RE: Frank's comment on lack of "immediate mode"

You can create a custom Control and override OnRender[1] to which you will be passed a DrawingContext[2] which is basically the equivalent System.Drawing.Graphics. Also, you can just throw a DrawingVisual[3] into the flow and use RenderOpen[4] to aquire it's DrawingContext and just draw straight to that surface.

HTH,
Drew

[1]http://winfx.msdn.microsoft.com/?//winfx.msdn.microsoft.com/winfx/ref/ns/system.windows.media/c/ondemandvisual/m/onrender.aspx
[2]http://winfx.msdn.microsoft.com/?//winfx.msdn.microsoft.com/winfx/ref/ns/system.windows.media/c/drawingcontext/drawingcontext.aspx
[3]http://winfx.msdn.microsoft.com/?//winfx.msdn.microsoft.com/winfx/ref/ns/system.windows.media/c/drawingvisual/drawingvisual.aspx
[4] http://winfx.msdn.microsoft.com/?//winfx.msdn.microsoft.com/winfx/ref/ns/system.windows.media/c/drawingvisual/m/renderopen.aspx

# re: Avalon Adventures…The Good, the Bad and the Ugly

Friday, January 21, 2005 12:53 PM by Anonymous
Drew,

DrawingVisual is not immediate mode and is not scalable. This is because the graphics produced are not editable. So if you have 100K objects and 20 are modified, you have to regenerate the entire stream. Also, style information is not used in a context dependent way -- it is duplicated in the stream. This is why Avalon provides no options for advanced graphical displays with many objects, even if we abandon the unscalable Shape system.

# re: Avalon Adventures…The Good, the Bad and the Ugly

Friday, January 21, 2005 9:32 PM by Anonymous
Frank,

Well, I'm no authority on this subject so forgive me if I'm totally off base here, but I still believe what you want is possible.

If you look at the Longhorn SDK you'll see an interface called IRetainedRender[1] and you'll find a class called RetainedVisual[2] with a property called RenderBounds[3]. When IRetainedRender is implemented by a class, the RetainedVisual's RenderBounds will be set to indicate what area to redraw.

Now, in the CTP drop, RetainedVisual seems to have been renamed OnDemandVisual[3]. OnDemandVisual has a RenderBounds property. What's missing though is the marker interface IRetainedRender. So, I'm just not sure how to indicate that you want to only be notified for partial redraws.

So, is this what you're looking for? You would maintain your 100k object graph in whatever efficient internal form you like and only redraw the region that has been invalidated based on whatever data in the graph represents that area.

Anyway, like I said, if I'm totally off base here I apologize. Maybe a small example of how you would achieve this in .NET with System.Drawing.Graphics today would help get the point across. At this point if I'm not getting it I'd actually love to learn more about it. :)

Cheers,
Drew

P.S. Rod, if you would prefer we take this conversation elsewhere let me know and I'll try and communicate with Frank privately. ;)

[1] http://longhorn.msdn.microsoft.com/?//longhorn.msdn.microsoft.com/lhsdk/ref/ns/system.windows.media/i/iretainedrender/iretainedrender.aspx
[2] http://longhorn.msdn.microsoft.com/?//longhorn.msdn.microsoft.com/lhsdk/ref/ns/system.windows.media/c/retainedvisual/retainedvisual.aspx
[3] http://longhorn.msdn.microsoft.com/?//longhorn.msdn.microsoft.com/lhsdk/ref/ns/system.windows.media/c/retainedvisual/p/renderbounds.aspx
[4] http://winfx.msdn.microsoft.com/?//winfx.msdn.microsoft.com/winfx/ref/ns/system.windows.media/c/ondemandvisual/ondemandvisual.aspx

# re: Avalon Adventures…The Good, the Bad and the Ugly

Friday, January 21, 2005 10:10 PM by Anonymous
Avalon are great!

but:

- Fonts too smooth/blur ?!
- Some render/hittest slow

...and need:

- Z-Buffer manipulation
- Plane, Sphere, Box, and more 3DModels
- Blend functions
- Convolution, Custom, and more ImageEffects
- VisualBrush

I think this needs comes with Beta/Final release :)

# re: Avalon Adventures…The Good, the Bad and the Ugly

Thursday, January 27, 2005 11:20 AM by Anonymous
lol. That 'other' language. You surely mean VC++ don't you?

# PangHorn (Pang for Avalon)

Friday, February 04, 2005 2:15 PM by Anonymous
Simple classic Pang game for Microsoft Avalon November Community Technology Preview.

Coming soon (next week)... On The Microsoft .NET Framework Community.

http://spaces.msn.com/members/mentas/

# ParticleSystem for Avalon

Saturday, February 05, 2005 12:59 PM by Anonymous
ParticleSystem for Microsoft Avalon November Community Technology Preview.

Coming soon (next week)... On The Microsoft .NET Framework Community.

http://spaces.msn.com/members/mentas/

# re: Avalon Adventures…The Good, the Bad and the Ugly

Monday, February 07, 2005 3:18 PM by Anonymous
DON'T KNOW WHAT THE Sh*T YOU GUYS ARE TALKING ABOUT ... BUT IT SURE SOUNDS COMPLICATED. MICHAEL

# re: Avalon Adventures…The Good, the Bad and the Ugly

Saturday, February 19, 2005 7:21 PM by Anonymous
Very simple Paint for Microsoft Avalon November Community Technology Preview.

Coming soon (next week)... On The Microsoft .NET Framework Community.

http://spaces.msn.com/members/mentas/

# re: Avalon Adventures…The Good, the Bad and the Ugly

Monday, July 31, 2006 8:16 AM by Anonymous
Nice site !
I found nice shoes store and want to share it address.
<a href="http://sas-outlet-stores.54.pl/">sas">http://sas-outlet-stores.54.pl/">sas shoes outlet stores</a>
http://sas-outlet-stores.54.pl/
<a href="http://dsw-shoes.54.pl/">dsw">http://dsw-shoes.54.pl/">dsw shoes</a>
http://dsw-shoes.54.pl/
<a href="http://slip-on-shoes.54.pl/">rockport">http://slip-on-shoes.54.pl/">rockport slip-on shoes</a>
http://slip-on-shoes.54.pl/
<a href="http://naot-shoes.54.pl/">naot">http://naot-shoes.54.pl/">naot shoes</a>
http://naot-shoes.54.pl/
Anonymous comments are disabled