My Headlines

Sunday, April 22, 2007

Playing Around with 3D and XBAPs

by Donald Burnett

A Feature Request for Visual Studio "Orcas"

Well I have been playing with the Release candidate of Blend and the New Beta 1 of Visual Studio Orcas and all I can say is that I am very impressed. Microsoft has once again rose to the task of making Visual Studio the preminent developer tool. I spend a lot of time these days with webservice APIs and find anything that makes working with them easier a great thing. If you have worked with a web service you'll notice that there are several formats for Web Services. Expression Blend has a very nice XML datasource that can capture the schema and work with any of them graphically and handle databinding. That is the one great thing about Blend, and I don't just mean SOAP and WCF web services.. the Graphical Databinding and the schema inferencing is just one of it's best features.

However if I go to Visual Studio 2005 or even the new "Orcas" beta and lay down a XML datasource, calling a Rest, JSON, RSS webservice API (and there are hundreds, check out programmableweb if you don't believe me), the XML datasource checks for SOAP or WCF and if it's not present, spits out errors that look something like this (even with the XPATH), making me go further into the data to transform it to something useable.

and the error looks something like this..

 

However when I use the XML Data Source in Expression, I get a nice datasource with the XML datasource listed and drag and drop databinding. Like this..

 

Now I realize that Visual Studio Designers don't quite work that way and we are already at Beta 1, but honestly the Visual Studio team should be taking a look at what the XML data source and binding can do in Blend. I am a lot disappointed that the Visual Studio XML datasource isn't as flexible when it comes to looking at and mapping XML data, because it offers basically the same input parameters. I get an error message in Visual Studio, but blend makes nice even with data that doesn't quite fit it's data formats.  I think if they are trying to make Visual Studio better they need to take a few lessons from Blend (and maybe some code). I also have to give it a reference namespace, so if I had code for some other format (in another namespace) I could probably do it. But that seems like more coding and an extra step.

It's very true that half the world uses web service formats that don't follow Microsoft's standards, and maybe Microsoft in their infinite wisdom could make it a lot easier to support these in Visual Studio (REST, JSON, etc.). It wouldn't hurt to open up to the world a little more and not be strictly SOAP or WCF without having to do transformations on the data..

So that's my Question to the Orcas xml datasource folks.. It seems like old school Microsoft that they don't directly recognize the formats that every other company is using.. Instead of the vastly open company that they are claiming to be.. I don't want to spend extra time coding and massaging XML data or heaven forbid having to parse it myself. Now I know you can probably do this in a different way, but how about some consistancy and doing the right thing to make your developers lives as easy as you are making it for the designers.

Why can't you folks in Visual Studio make this as easy and flexible as it is in Blend. Save your people sometime and set up the mapper like in Blend too.

Anyway, if you want a good reason to go into Blend and you are a Visual Studio developer, I just gave you one..

 

XBAPS and 3D

I have been playing around a little with WPF 3D and doing some modeling. Then taking these into WPF and making them work as a "browser based" WPF app. I am fascinated with WPF's great 3D and it's something I am exploring more to find potential uses for because it's 3D is not something available in "SilverLight" (formerly WPF/E).

Anyway, I put some objects on a page and just for kicks played with several types of animations and attaching them to timelines. This one just is attached to the page.loaded event to automatically run and play the timeline. It zooms the director's slate out once in Z order making the object bigger. I also have a timeline attached to the Film Reel and CD's beside it.

I used the StoryBoard.TargetProperty tag to set the two objects up individually to loop and reverse direction and play in a continual loop..

Storyboard.TargetProperty="(Model3DGroup.Transform).(Transform3DGroup.Children)[2].(RotateTransform3D.Rotation)" Duration="0:0:5" AutoReverse="True" RepeatBehavior="Forever" >

http://www.donburnett.com/WPFSamples/Xample1/Xample1.xbap

This is some simple animation, but next I will be putting together a tutorial on using mouse events to use these as 3D buttons in your own applications using the 3DTools library. I am pretty happy with the brushmapping on the objects and how it all turned out. I'll be talking about doing this more in an upcoming blog entry as things slow down..

1 comment:

Don Burnett said...

I got my wish, at Mix there is a Visual Studio "Orcas" REST,JSON, etc session