Web Toys

Discussion of all kinds of web technologies

About the author

Bret Patterson.
E-mail me Send mail

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009

WPF Challenge to the Experts...

I have a simple challenge for all the WPF experts out there...

 

Pretend that XAML and XBAPS were a replacement for HTML and attempt to create a website purely using:

  1. XBAPS
  2. Loose Xaml
  3. Loose image files referenced from Xbaps/Xaml.
  4. Rest and Webservice style server side handlers for post/get type interaction between the client/server.

Basic website design guidelines would be something like:

  • Share images as much as possible to minimize download times
  • Provide as much content as you possibly can in an indexable format (IE loose Xaml etc).
  • Make small changes not require large deployments or large downloads

 

You might ask yourself why you would do this, after all WPF/XAML only works on windows platforms and in Internet Explorer. Some might ask why I don't just make this challenge for Silverlight instead.

While I believe Silverlight to be an incredibly powerful up and coming technology, I personally see it more as a competitor to flash and not for HTML. Which basically means it's going to be used for:

  1. Advertisements.
  2. Rich interactive applications (well by current web standards it's mostly going to make things easier and open a few new possibilities).
  3. Small standalone applications

However there are some of us our there, myself at least, that are aching for a HTML replacement technology. HTML is ancient by technology standards. HTML has really come a long way since the revolutionary 1.0 version, yet it's still a really clunky way to develop interactive applications and publicize content.

Currently XAML/XBAPS are not cross platform and hence will not be a serious competitor for HTML in the near future. However, Silverlight has proven that this is not a necessity and that in the foreseeable future this could change through the implementation of a Mono based WPF implementation that brings WPF/Xbaps to the cross-platform world.

Try the above challenge, I think you'll be both pleasantly surprised how nice it is to develop web content in XAML versus html, however you will be surprised at how unexplainably hard it still is.

Few issues to give you a taste of the challenges:

Pretend your website is organized something like:

.
./images
./actions/
./assemblies/
./xaml/
..

Scenario: Try and reference loose images on your website from your xbaps xaml.

<Image Source="images/logo.png"/>

Problem: You will notice that it doesn't work because the xbap only searches it's resources and assembly!

Solution: You need to use the syntax: "pack://siteoforigin:,,,/images/logo.png"

Scenario: You've directed the user to a loose xaml file index.xaml and your website gets busy and your webserver returns an error accessing an Image that xaml file loads.

Problem: An error occurs and Nothing is rendered.

Solution:  You must compile your web pages to xbaps in order to handle ANY errors, even simple url not available for resources. There is no silent failure for certain scenarios. Imagine if a website failed to load if even one of the spacer images wasn't available!

There are many more issues which I've noticed so far, as I've personally undertaken the challenge myself to build an entire website using zero html, 100% xbaps, loose Xaml and server side services.

Once I get a bit more content on the website I'll publish it's URL...

Current major issuing I'm pursuing is:

How to load DLL assemblies dynamically and then loading loose Xaml files that bind to event handlers in those assemblies.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by bpatters on Wednesday, July 11, 2007 6:06 PM
Permalink | Comments (0) | Post RSSRSS comment feed