Archive for February, 2007

Writing controls for WPF/E

Saturday, February 24th, 2007
One of my old buddies from the Avalon team Nick Kramer has a great post on building controls for WPF/E. This article has a ton of great tips for how to work with the current builds.
For controls he uses an interesting technique of putting the control in the WPF/E markup as a <Canvas> with an onLoaded event on each control that triggers the control creation-

<Canvas Loaded="javascript:MakeButton" Canvas.Top="100" Canvas.Left="20"/>

This brings up another thing that I was working on for the next build of LaunchE. I’m hoping to enable full markup of the controls more like this-
<TextBlock x:Name="ScrollText" Canvas.Top="50" Canvas.Left="20"
  FontFamily="Verdana" FontSize="12">Scroll value:</TextBlock>
<l:Button x:Name="Button1" Left="50" Top="100" Width="100" Height="20"
  Text="A Button" />
<TextBlock x:Name="ScrollText" Canvas.Top="150" Canvas.Left="20"
  FontFamily="Verdana" FontSize="12">More Text</TextBlock>
The idea is that a pre-processor scans through your XAML and interprets the tags in the LaunchE namespace (l: prefix). Those get reparsed an the XAML parser is fed the new tree.

Coming in the next build of LaunchE

Thursday, February 22nd, 2007

The first build of LaunchE that is online now is pretty basic. We considered waiting to make more progress but it made sense to try to get it out in the public sooner and get feedback as soon as possible. So please, let us know what you think either in the comments here or by email. We also welcome code submissions as long as you are willing to grant us the necessary copyright so that we can continue with our existing license.

Also I thought it would be useful to give everyone a heads up on the next things that are coming in the library. RadioButton and ScrollBar are both pretty much done and after that we will probably start working on some layout concepts like Grid.

One important decision that we are still wrestling with is control composition. Real WPF controls are all pretty much built out of other controls and can have any other controls embedded in them. In that model ScrollBar gets built out of 5+ other controls for the various regions.

So far we are not taking the same approach for LaunchE. My concern is that the quantity of controls was sometimes a perf issue even with compiled C# code, with the JavaScript platform we need to be careful to make sure it runs fast enough. So ScrollBar is itself one control that deals with its own sub-parts. This reduces some degree of flexibility, but I hope to still enable a Button control that has arbitrary other stuff embedded for its content.

DNS Issues

Wednesday, February 21st, 2007

When we switched over to WordPress we switched which server (actually virtual server) that this site is running on. For some reason the DNS for www.launch21.com is being very slow to update to the correct IP address (.233) everywhere so we have been seeing this site bounce between the new one (this) and the old one (with a black background). Sorry about the inconvenience and we hope to have anything straightened up soon.

Introducing LaunchE WPF/E Library

Tuesday, February 20th, 2007

Since Microsoft first introduced WPF/E in December we have been pretty excited to do some cool stuff with it. WPF/E itself is a very basic vector and media rendering tool, so building a framework for controls (and eventually layout) seemed like an obvious project to enable the use of this tool in real-world applications.

Today we are putting online the very first early-preview build of LaunchE, the WPF/E controls library. This version only supports Button and Checkbox, and only very basic support for those, but more controls and capabilities are coming soon.

LaunchE Basics Demo

Some key features-

Uses JavaScript inheritance to build sub-classed controls.

Ability to re-skin a control without inheritance (just replace the template XAML).

Support for adaptive layouts (for example, centering the text in the button control).

Events (just Click for right now).

Please check it out and send us feedback. Feel free to use it in your own projects, but at this point we are still likely to make breaking changes as we flush out its capabilites.

Check out a very simple demo of LaunchE

Download the JavaScript Source code (version 0.001)

WPF/E Photo Gallery Example

Saturday, February 17th, 2007

Mike Harsh shows Lester Lobo’s WPF/E photo viewer example that uses some nice reflections and some fake-3d. Unfortunately WPF/E only supports skews and rotations so you can’t do real perspective at all. Its possible to do some simple fake-3d that looks real, but the effects in this example just give me a “wrong” feeling. This is one of those cases where a visual designer can really earn their pay, since there are some careful things you can do to make the scene look more right by realizing that the vanishing point is in effect at infinity.

The history of this limitation is a bit interesting. WPF (Avalon) didn’t need the more complex transformations since it supports real 3D. WPF/E in theory is a strict subset of the WPF functionality so they didn’t add support for transformations that WPF itself can’t do. It would be great to see this improved over time so we can really emulate 3D.

 

The pain of updating the web site

Sunday, February 11th, 2007

All that I can say is that we got off to a good start, getting our first web-site up within a week of getting rolling on Launch21. From there we quickly faltered on the “often” part of the phrase “ship early and often”. I thought its worthwhile to reflect on what happened.

The really positive take on things is that both Peyman and I have been incredibly busy working for clients and haven’t had much time to work on the site. I know it sounds like some form of posing, but if anything the demand for the stuff we do has exceeded my expectations. I’m incredibly grateful for the clients that we have signed up so far and want to focus on keeping them happy, which hasn’t left much time for fixing up this site.

That alone wouldn’t have kept us from some simple improvements, but we decided to make two major improvements both of which put us in that “there is no point doing the small stuff until these others are done” limbo. This is a common situation for software development projects to encounter- sometimes its unavoidable, but often you are better off making the effort to figure out how to break things down into smaller chunks.

The first major improvement is our new design. We have had some help designing a logo and a look for our site that better reflects the type of professional design and web-sites that we like to build. The site isn’t perfect today, but from my point of view its a 1000% improvement and enough in the right direction that it was time to get it online and iterate from here.

The second big change is that the site is now running on WordPress. For years I have done blogs using my own hand-rolled software because it forced me to stay familiar with all the technologies involved in delivering one of these sites at a low level. The down side is that when you do it yourself the publishing mechanisms are never as convenient as nice polished software like WordPress so posting becomes a big pain, leading to fewer posts and lots of missed opportunities at interesting things to say. I’m thick into RSS and all of those other technologies in a dozen ways now anyway, so I don’t need the blog to keep me real with that stuff and its nice to have the convenience. Speaking of which, my next project is to move AlexHopmann.com to WordPress too, which will likely be a bigger undertaking given my existing content there.