XAML for Flash
Wednesday, January 19th, 2005This morning we released our first beta of Xamlon Pro - Flash Edition. This development suite allows you to develop xaml content targeted to the Flash Player. What I think is particularly cool is that you can now develop Flash not only using XAML markup but also with C# code-behind. Technically, you can use any .NET language, but we’ve only tested with C# internally.
Our current release includes the SWF compiler, cswf, which converts either standalone XAML into a SWF file, or it will combine XAML and a .NET assembly (consisting of any number of C# files) into a SWF file with ActionScript bytecode. We’ve also included C# hooks into the native Flash API. I think there are some huge advantages to what we’re doing here.
IntelliSense
Now, I’m not a big Flash developer, yet
, but I’ve found Visual Studio’s IntelliSense something I couldn’t live without. It makes learning the Flash API incredibly easy. Fortunately, the names are clear enough that you get a good idea of what’s going on. Well, and there’s plenty of documentation on the API to find out the gory details. I’ve been able to go from concept to final working SWF file really quickly, especially considering I’ve never done any Flash development before.
Visual Studio with any .NET Language
Now, I realize some of you out there think OO+JS is a bad idea, but lets just say we differ on that point. Personally, I love OOP for large projects and most .NET languages give you that style of programming. That’s where I find a lot of power in offering the use of any .NET language to write your supporting Flash code. And, at the same time, you get to leverage all of the tried and true built-in and polished functionality that is offered in Visual Studio. I just don’t hear people raving about their Flash IDE for coding.
Type Safety
And with OOP, you get type safety. I spent a number of years writing large ECMAScript libraries and I found it invaluable to define clear interfaces for my objects. This is a weak form of type safety, but in reality, ECMAScript lets you pass in whatever you want. You really won’t know if you’ve passed in an object of incorrect “type” until you execute your code. And, from what I hear, you don’t have a nice ActionScript debugger available to you to figure out what broke and why. So, that’s where type safety can step in and help. And believe me, this becomes more and more important as your projects grow.
We actually compile your C# code to a full .NET assembly. That means that if you pass in the wrong type into a method or try to set a property with the wrong type, your code won’t compile. You might even have latent errors of this type in your code that don’t appear until release (it always shows up after you release). With our approach, you catch the trouble at compile time which is far better than catching it later in the development cycle. I think type safety is a huge plus and will save hours and hours of debugging time for the Flash coder.
Anyway, I think we have another really exciting product with our Flash Edition, so please feel free to give it a try.