May 2007 - Posts

Java FX: Sun Wants a Piece

"The demand continues to grow for secure, interactive content, applications, and services that run on a variety of clients. To simplify and speed the creation and deployment of high-impact content for a wide range of devices, Sun is introducing JavaFX, a new family of products based on Java technology designed to enable consistent user experiences, from desktop to mobile device to set-top box to Blu-ray Disc."

Sounds like a direct competitor to Silverlight and Flash... but didn't Sun already try something like this and fail? Well... interesting news is that it's scripting language based and completely GPL. So, you have Silverlight which is closed source, Flash which is partially open (you can license the player code), and JavaFX which is completely open. Something for everyone. Looks like JavaFX is going for ultra reach though with support of Blu-ray and set-top boxes. Doesn't look like they are really targetting designers and experience though, just the reach portion. My guess, it won't clash with Silverlight or Flash any time in the near future. It will be used for those horribly ugly set top box interfaces brought to you by your local cable provider.

In any case, with the DLR for Silverlight, Actionscript for Flash, and now JavaFX Script for JavaFX it looks like scripting languages are making a comeback.

[1] http://www.sun.com/software/javafx/

Posted by Jesse Ezell with no comments
Filed under: , , ,

Silverlight on Linux

Ryan Paul is claiming over on arstechnica that Miguel (aka. the mono guy) is planning on bringing Silverlight to Linux:

"Mono project lead developer Miguel de Icaza says that the Mono development community plans to have an experimental Linux-based Silverlight browser plug-in ready for testing by the end of the year. Silverlight, Microsoft's new .NET-based technology for rapid development of interactive rich media applications, is currently only supported on Windows and Mac OS X. The Mono developers intend to use the documentation published by Microsoft to create a plug-in that is compatible with Silverlight 1.1, which is currently still in early stages of development. "

Unfortunately, he doesn't cite any of his sources for this claim, but Miguel does seem very interested in Silverlight lately so it wouldn't suprise me.

[1] http://arstechnica.com/news.ars/post/20070507-mono-developers-to-bring-silverlight-to-linux.html

Flash + JVM = Smiles

At its JavaOne conference, which kicks off in San Francisco on May 8, Sun is promising a major technology unveiling, code-named "Project Indiana."

My ZDNet blogging colleage Ed Burnette is speculating that Sun might unveil a head-to-head competitor to Microsoft's Silverlight, a k a "Windows Presentation Foundation Everywhere."

Sun still isn't talking. But its execs are dropping hints all over. And it sounds like at least part of Sun's announcement could involve a deal with Adobe, via which Sun will be distributing the Java Virtual Machine (JVM) as part of Adobe Flash.

This would be an interesting development. It could explain why Adobe was ready to give away the ecmascript compiler source for free to Mozilla, since the JVM being included could make actionscript a thing of the past. It would also make their use of Eclipse for the Flex Builder IDE a more sane choice. This would be a step closer to the right direction for Adobe. Setting aside the the whole MS vs. Adobe war, however, supporting .NET and the CLR would be 10x sexier than including a VM that already failed to capture the hearts of client app developers the first time around. In any case, it's not unfathomable for Adobe to outsource some core technology like this to another company. Macromedia has been doing that for their video codecs since the first version of Flash that supported video. We'll have to wait and see, but if I had to bet, I'd bet that any ties between Sun and Adobe would have something to do with Apollo or Flex not the closely gaurded core of the Flash player... but who knows, Adobe is pretty good at creating bloatware ;).

[1] http://blogs.zdnet.com/microsoft/?p=424

 

Update: Sun announced Java FX which indeed competes with Silverlight and Flash http://www.sun.com/software/javafx/

Posted by Jesse Ezell with 5 comment(s)
Filed under: , , , , ,

If Adobe was Smart...

They would merge the Flex team and the Flash player team, and truely support things like MXML in the player. Why in the world do you need 2 entirely different ways to build applications in Flash? Why doesn't the Flash player itself understand Flex MXML? Why must Adobe's resources be split trying to build, promote, support, and refine two entirely different experiences for application developers? IMO, collapsing the teams into a single team would be the way to go with the introduction of Silverlight, especially considering that just about everyone on the Adobe side touts Flex as the real competitor to Silverlight, not the Flash IDE... yet all the big bucks are behind Flash, not Flex. It seems to be a given that the Flash IDE itself is needlessly complex and horribly inefficient when trying to do anything other than animation. With the push away from animation to more useful tasks, how can Adobe be missing this important step?
Posted by Jesse Ezell with 2 comment(s)
Filed under: , , , ,

Silverlight vs. Flash: The Developer Story

A few people didn’t like my proclaimation that Flash is dead. This is understandable. It is a bit premature to make such claims, but the Silverlight model is pretty amazing. As someone who works with Flash on an ongoing basis, I thought I'd chime in with a more in depth look at the issues.

First off, let me explain my background for those of you who may not know. Way back in the day, when Flash 4 was the latest and greatest, Macromedia decided to “open up” the Flash file format. They released documentation (which was poor at best) and an SDK (which was horrible at best). I saw the potential here. Finally, the format third party developers could unleash their creativity and usher in all kinds of amazing tools. Unfortunately, the documentation was full of errors and the SDK was so riddled with bugs that you spent more time debugging it than using it. 

Nevertheless, debug I did. I came up with quite a list of fixes to the SDK, fixes which would render it near complete and bug free. I signed up for a free hosting account and promptly placed a list of the updates you had to make to the SDK in order for it to be bug free online. Macromedia’s response: cease and decist. Rather than integrating the changes themselves or acknowledging that they solved a serious problem, they told me that it was a violation of the license agreement to be posting that kind of information…. Some definition of “open” they have there. 

Not to be dismayed, I determined that the source code license was just far to restrictive then and I would create my own SDK. As familiar with the spec as I had become, it didn’t take long for me to put something together. In a few short weeks, I had an SDK that was far more complete, far less buggy, and far easier to work with than the Macromedia SDK. It wasn’t long before hundreds, then thousands of developers were downloading the SDK and posts to Macromedia’s own open-swf forum turned from questions about the Macromedia SDK to questions about this new alternative SDK. It wasn’t too long before Macromedia completely discontinued their SDK (rumor has it that product teams internal to Macromedia even considered using the SwfSource code for their own projects).

Ever since then, I've been working with the Flash File Format. I've helped put together some award winning tools that are arguably some of the most successful SWF generation tools outside of Macromedia. This gives be a unique perspective on the differences between the two formats and how these formats enable developers to create tools that work with each of them.

Admittedly, my view point isn’t the same as  a lot of people, who are perfectly content just buying the Flash IDE and can do everything they will ever need to do from there. I create tools that work with the File Format itself, tools that export their content into the Flash Format. So, if you are a software developer like myself (which is probably a good chance if you are reading this blog), then you would almost assuredly come to the same exact conclusion as myself if you knew the details of the two formats.

Animation

The Flash format itself has no notion of animation other than transformation matrices. You can apply a matrix to an element on a per frame basis to move it around. Want to move something across the screen in 3 seconds? Calculate how many frames 3 seconds will take, then calculate the matrixes required for each frame along the way. Oh, and don’t forget that the player won’t actually maintain any frame rate unless you embed blank audio tracks, so that 3 seconds might turn out to be 2 or 6 or 5, it just depends what kind of mood the machine is in.

Silverlight supports the WPF animation model, which is not only time based instead of frame based, but lets you define the start and end conditions and it will figure out how to get there for you. No need to deal with matrixes. No need to calculate positions on various frames. It just works. 

Shapes

Flash stores its shapes using binary shape records. In order to write shape definitions, you will need to either license a 3rd party Flash file format SDK, or build your own. It isn’t too difficult, but it does require a bit of a learning curve and the ability to manipulate things at the bit level, since shape records don’t align on byte boundaries. Needless to say, it isn’t the kind of thing most people can write and have all debugged in one afternoon.

Silverlight uses XAML. XAML is text based and can be output using a simple XML object. No need to buy special libraries to write files. No need to write your own libraries. Just stream some text to a file and you’re done--easily the type of thing that can be debugged and finished in an afternoon. 

Text

Flash stores its fonts glyphs using the same exact shape definitions that are used for any other shape. The player itself does not understand TTF files, so you’ll end up digging deep into the Win32 APIs and the fairly vague definitions in the Flash file format documentation to come up with something that sort of does the trick. You’ll probably spend ages trying to deal with all the intricacies of fonts, because it turns out that typography is actually fairly complex… and you will have to deal with all those complexities yourself.

WPF/E lets you embed true type font information directly into your projects, and download that information with the downloader object. No need to do anything special. No need to handle anything yourself. It just works.

Video / Audio

Flash supports multiple video formats. The latest codec is really high quality and the bandwidth usage is nice. There is one problem though if you are creating a tool that outputs Flash content… the formats it supports aren’t really used by anyone else. The original video codec, Sorenson’s proprietary H.263 implementation is a mutant version of H.263. The compression follows the spec fairly closely, but there are a bunch of features dropped out and you can’t exactly just go find a complete spec on how to build your own encoder. The later codec from On2 puts you in an even worse position. Licensing Sorenson’s codec isn’t that expensive, but On2 will rape you with fees. They are relying on revenue from licensing the codec used by Flash to revive their $2 a share stock price. It is also a completely proprietary format (where at least the Sorenson one was loosely based on a standard). The audio formats Flash supports are all proprietary, except for ADPCM, which no one uses because of its horrible compression, and MP3, which is decent but dated, and still requires licensing fees and 3rd party conversion libraries.

Compare that to the Silverlight story. Silverlight implements industry standard VC-1 codec for video, as well as offering support for WMV and WMA. Just about everyone already has Windows Movie Maker, but if they don’t it’s not a big deal. Why? Because Microsoft makes available a free Encoder SDK for producing WMA and WMV. So, not only are you using formats that people are more likely to be able to encode themselves, but Microsoft also provides your product with SDKs if you want to do the encoding yourself. The best part about it is that Microsoft doesn’t rely on WMA/WMV licensing revenue to keep themselves alive, so not only is it easier to integrate, but it’s also cheaper.

Scripting

You can reuse C# classes from your tool inside your exported content. There is no development environment out there for creating real desktop applications which is based on ActionScript. If you go the Flash route, this means that all your classes and objects have to be written twice. You need .NET classes to handle the author time experience and Flash classes to handle the run-time. If you have server components, once again you need to switch back to .NET and throw out all the classes that the run time is using. For example, let’s say you are creating a tool that outputs rich media quizzes. With Silverlight / .NET, the same entity classes you use to deal with results in the player could be reused on the server side. With Flash, you’d have to write all that logic 2x and keep it in sync as your tool changes.

Tools

You can create Silverlight content with the same tools you use on a daily basis. Visual Studio.NET is by far the most powerful and most popular IDE. You can potentially have all the code for the server components, the authoring tool components, and the runtime/player components inside the same project. No extra skills required. No needing to hire some special Flash guru to do the graphics junk. Every developer can contribute to every part of your application.

The bottom line: about the only thing Flash has going for it from my perspective is adoption. Adoption isn't hard to achieve, especially for the people that ship the operating system 90% of the world uses. As such, it's just a matter of time till that is no longer part of the equation. Adobe has a lot of work to do in the mean time, and the clock is ticking. Open sourcing Flex is a really good start in the right direction... unfortunately, Flex was built on top of the wrong platform from the start (something I told the Flex team while Flex was still in Alpha), so this last effort, while a good one, still might not be big enough to turn the tide that is coming. Now, this isn't to say that Flash isn't a great format and doesn't enable a lot of scenarios (like I said, my job is working with Flash and I'd be doing something completely different if it wasn't for Flash). So, Flash is great. Silverlight just solves a lot of the major problems that I've run into with Flash.

Posted by Jesse Ezell with 616 comment(s)
More Posts