Technical · Web Services

Silverlight vs Flash

September 24, 2007

Web Services

Silverlight vs Flash

Taken from the Blog of Jesse Ezell, who has had extensive experience in development of tools, projects and solutions using flash.

Comparison between Silverlight and Flash, main differentiating characteristics of both products.

(…)

Animations

Animations in Flash are of the matrix transformation type, you can apply a matrix to an element based on frames to generate movement, do you want to move something across the screen in 3 seconds?, calculate how many frames these 3 seconds will need, then calculate the matrices that each frame requires. Do not forget that the player does not maintain the same frame rate unless a blank audio file is placed, so the 3 seconds can become 2, 6 or 5, depending on what the processor is doing.

Silverlight supports the WPF animation model, which is not only based on time rather than frames, but allows defining the start and end conditions and it will take care of taking the animation where you want, you do not have to work with matrices, you do not have to calculate positions in several frames. The animation simply works.

Shapes

Flash stores its shapes using a binary record. To write form definitions, you need a third-party license for the flash file SDK or build your own SDK, it is not very difficult, but it requires a learning curve and the ability to manipulate things at the bit level, it is not the kind of thing that most people can write and debug in an afternoon.

Silverlight uses XAML, XAML is text-based and can be exported using any simple XAML object, you are not required to buy special libraries to write the files, nor is there a need to write your own libraries, you just place some text in a file and that's it, the kind of things that can be debugged and completed in an afternoon.

Text

Flash stores its fonts using the same definition it uses for shapes. The player does not understand TTF files, so in the end you end up submerged in the Win32 API definitions and the vague definition of the Flash file format, you may spend years trying to deal with all the complications of fonts.

Silverlight allows you to insert true type font information directly into your project, and download that information with the object that is downloaded. Nothing special is needed, nothing special needs to be handled, it simply works.

Video / Audio

Flash supports multiple video formats, the latest codec is really high quality and with excellent use of bandwidth. The problem is that if you are creating a tool that exports flash content…the format it uses is not supported by anyone else. The original video codec, the proprietary H.263 implementation from sorenson is a mutant version of H.263. The compression follows the specification very closely, but there is a list of features that fall outside the specification and do not allow completing the construction of your own encoder. the latest On2 encoder puts it in a worse position. Licensing the Sorenson Codec is not very expensive, but the On2 one is, the company is trying to increase its share value from the current 2 dollars through the licensing model of the codec used by Flash. The Audio formats that flash supports are all proprietary, except for ADPCM, which nobody uses because of its compression problems, and MP3 which requires third-party licenses for the conversion libraries.

Comparing that with the Silverlight story, Silverlight implements the VC-1 codec for video (an industry standard), it also supports WMV and WMA. Almost everyone has Windows Movie Maker, but if you don't have it it doesn't matter, why?, because Microsoft released a free encoder to produce WMA and WMV. So, not only does it use formats that people can commonly use, but Microsoft also provides its product with SDKs if you want to do the encoding yourself. The best part of this is that Microsoft is not based on licensing WMA/WMV to sustain itself. Not only is it easy to integrate but it is cheap.

Enjoying this? Get more like it, once a week.

Scripting

You can reuse C# classes (or VB. Note JCP) from your own tool inside the exported content. If you take the flash route all classes will have to be written twice, you will need classes in .net to handle the time experience and Flash classes to handle runtime. If you have server components you will have to go back to .net and write all the classes that the runtime component is using. For example, let's say you are writing a tool that exports exams with great graphic content, with Silverligth/.Net the same classes and entities that work with the results in the player can be used on the server. With Flash, you have to write all the logic 2 times and keep it synchronized at each change.

Tools

You can create Silverlight content with the same tools you use daily. Visual Studio.net is by far the most powerful development tool and the most popular IDE. You can put all the code for the server components, the player runtime components and your tools in the same project, no extra skills are required, you do not have to hire a Flash expert to do the graphic parts. Every developer can contribute to completing the application. (…)

For us at Gattaca the experience has been very good, we have developed an application that makes phone calls, prints, connects with web services using WCF and has immense graphic richness and all working as a team the developer in .net and visual studio and the designer in blend.

I hope it is helpful.

Juan Carlos Peláez

MCTS

Member of the Microsoft Andean Speaker Group

Member of the Microsoft Colombia Influencers Group

Keywords: Silverlight, WPF, Flash, Visual Studio, .Net, Video, Audio, Encoders, Comparison

Need Expert Help?

Let's discuss how I can help with your technical challenges

Schedule a Consultation

Get the next one in your inbox

More like this, once a week. The Digest covers AI systems and agents in one weekly edition.

Confirm by email to complete your subscription. Unsubscribe anytime.

Related reading

More in the Digest — a weekly roundup of AI and agents news — or start with AI Strategy. Want help with this? Tell me about your needs →