Home  >  

Introducing Silverlight Tools

Author photo
AddThis Social Bookmark Button

In this excerpt from the recently released Essential Silverlight 2 Up-to-Date, author Christian Wenz asks, "…an XML editor would be enough to create Silverlight applications…but who would want to do that?” Instead, he outlines three different kinds of Silverlight tools: XML editors, vector graphics editors, and Silverlight IDEs.

As you saw in the previous chapter, there is no kind of compilation or binary data with Silverlight. All you need to create them are these three kinds of files:

  • • XAML files to contain the Silverlight content
  • • JavaScript files with additional code for the Silverlight content and code to control and access the Silverlight content
  • • HTML files to present the Silverlight content
Generally, an XML editor would be enough to create Silverlight applications. But that’s the same thing as saying, “ASP.NET 2.0 applications can be created in Notepad.” Of course that’s possible, but who would want to do that?


Therefore, we will introduce three kinds of editors in this chapter that should be helpful when creating Silverlight applications. For each kind of editor, we briefly introduce one specific editor and also have a look at the competition, if there is any.

XML Editors

For editing XAML, a mighty XML editor should be enough. There are many good ones out there, including <oXygen/> and XMLSpy. Even Microsoft has a dedicated XML editor now, XML Notepad 2007 (available here at Microsoft see Figure 1.4-1). Thanks to the availability of an XML schema for XML, code completion is at least theoretically possible. As you saw in the previous chapter, Visual Studio 2005 offers IntelliSense as well, and you get even more IntelliSense (including JavaScript code) in Visual Studio 2008.

The one thing pure XML editors are always lacking is WYSIWYG functionality. Many of them try to use CSS and/or XSLT to convert the XML into something viewable (including the XML editor I am using to write this book), but for Silverlight that’s not a feasible option. An editor that does both is, of course, a better option. You may want to have a look at Spket IDE. It is free for noncommercial use and offers both JavaScript and XAML code completion. Figure 1.4-2 shows the XAML editor of Spket IDE in action.

silverlight_figure1-4-1.jpg
Figure 1.4-1 XML Notepad 2007

Vector Graphics Editors

Silverlight graphics are vector-based, compared to regular web sites where images are usually pixel-based. In all fairness, Silverlight also supports pixelized graphics, but vector graphics have some advantages: no quality loss when scaling, for instance. There are several vector graphics editors, but very few of them currently support XAML. Microsoft Design was one of the first to do so and it is part of the Microsoft Expression Studio. At http://www.microsoft.com/expression/products/download.aspx?key=design you will find more information about it and can download a time-bombed trial (60 days). Microsoft Design can import a series of other formats and also export to a few, including XAML, as Figure 1.4-3 shows.

silverlight_figure1-4-2.jpg
Figure 1.4-2. Spket IDE

Silverlight IDEs

With Flash, the name refers to the browser plug-in (and the associated file format) and for the mighty editor or IDE that allows creation of these rich Internet applications (RIAs). So, it was just a matter of time until Microsoft would release a similar tool that tried to bridge the gap between designers and developers and appeals to both groups. Microsoft Expression Blend is also part of the Microsoft Expression Studio. The first version targeted WPF developers and did not offer anything for Silverlight developers (or WPF/E developers, as they were called then). However, Expression Blend for Silverlight 2 changes that. (Up-to-date links to a trial version of that software will be available at http://silverlight.net/.)

When you set up a new project, one of the options is to create a Silverlight JavaScript application (see Figure 1.4-4). If you look closely at the project structure in Figure 1.4-5, you will see that it looks quite similar to the project based on the Silverlight Visual Studio template you saw in 1.2.

silverlight_figure1-4-3.jpg
Figure 1.4-3. Microsoft Expression Design


silverlight_figure1-4-4.jpg
Figure 1.4-4. Creating a Silverlight JavaScript application within Blend for Silverlight 2


silverlight_figure1-4-5.jpg
Figure 1.4-5. Microsoft Expression Blend for Silverlight 2 (March 2008 Preview; your mileage may vary)


Expression Blend 2 is somewhat integrated with Visual Studio. Double-clicking on a JavaScript file in the project explorer opens it in Notepad (the Windows editor), but when working with event handlers (see 2.2 for more technical information about that), you can set how Visual Studio 2008 handles them, as Figure 1.4-6 shows. Alternatively, Expression Blend 2 can also provide the skeleton code for event handlers in the clipboard so that you can use them in any other arbitrary application. It is possible that future versions of Expression Blend 2 will facilitate integrating external applications.

silverlight_footprints.jpg



Visual Web Developer 2005 Express Edition may also be used as an event handler code editor.

Although Expression Blend 2 is still far from perfect (Adobe Flash has had several years to raise the bar), it is currently the best choice for Silverlight developers in search of some visual help for developing their applications, especially from a design perspective. Now it’s time to dive more deeply into Silverlight, and how you create rich user experiences with WPF and XAML, the subject we explore in Part 2.

silverlight_figure1-4-6.jpg
Figure 1.4-6. Visual Studio 2008 can take over event handling code for Silverlight applications


Further Reading
An overview of Microsoft’s Expression line of products

Read more from Christian Wenz. Christian Wenz's Atom feed chwenz on Twitter

Comments

8 Comments

jun said:

who wants to use a cheesy microsoft cop-off of flash and or flex?

jon said:

I do!

Todd said:

Cheesy? I'm as big fan of Adobe toolsets as anyone, but Microsoft has some advantages here, one, they're not supporting 10 year old legacy Flash player (can you say multi-threading in Silverlight v2.0). Can you say, choose you're language: C#, VB.NET, IronPython, Ruby? There are many more. And Adobe still has some advantages, too, like their designer to developer workflow. Anyway, Microsoft's the new kid on teh block at this, but guess what, their developer community is probably 100x Adobe's....they'll move quickly. I'm predicting there will be so many 3rd party controls for quickly building SIlverlight applications, plus all those companies already heavily using Microsoft software, but aren't willing to add Adobe into the stack, will finally get some RIA technology on their side. If it runs well on both OSX and Windows, I'll have no problems with it.

Not to mention, competition is good. It gives people choice. It causes lots of innovation, quickly. Do you think Adobe would have released their flash player capable of playing HD video so quickly if Microsoft's Silverlight media player didn't come out swinging last year with their killer quality video?

In the next couple of years, RIA is going to advance quickly because we have two huge companies (3 if we count Java's RIA thing). I appreciate the competition.

Tousdan said:

Microsoft might try to copy Flash/Flex but I see it as a good thing. I'm not a big fan of adobe's online doc, more if compared to whatever msdn has to offer.

And I agree with Todd totally.

Blake said:

Considering that flash player (especially 9) is on most peoples computer already. Also, with video flash has the market... also, look at flex... it's older sure. but then they came out with flex 3. silverlight 2 is just a copy of MXML in flex. Wow... MS is using javascript instead of actionscript. Who would have thought?

With Flex 3 you can use C#, but it's not part of the IDE that you can develop it. It has to be called through HTTPServices and such.

I am a little biased toward adobe because flash cs3 and flex builder 3 have been the only thing that I could use to get the graphical responses that I wanted... in the exact way that I wanted them. Especially on a enterprise level.

Silverlight 2 is changing this though. Microsoft finally pulled their head out of their a** about RIA technology and jumped on the band wagon.

C# and the .Net framework are going to be hard to beat! C# is a beautiful language and .Net is powerful as hell. Not to mention that silverlight blends perfectly with visual studio 2008. Being abe to work in one enviroment! Holy crap that is awesome! Also with expression blend you have an easy graphic artist-like way to through stuff together for non-coders.

Also, Deep Zoom offers some awesome imaging capabilities to maintain some high quality!

Adobe's eco-system with flex will be non-existant soon. Mainly because Microsoft has a bigger following... so components will come way faster than they have for flex/flash. Huge advantage to microsoft because of the more skilled and experienced base of developers.

moi said:

Will an up-date be forth coming now that Silverlight 2.0 is released?

safepage said:

If you need to do client side XML Data Binding in Silverlight 2, you can use the Liquid XML Studio 2009 which will now generate Silverlight 2 code in C# and VB.Net:
http://www.liquid-technologies.com

Leave a comment


Tag Cloud

Question of the Week: Dream App

If you had an unlimited budget and unlimited resources what application would you build and why would you build it?

Answer

Latest Features

Recommended for You

@InsideRIA on Twitter

Archives

  • Or, visit our complete archive.  

About This Site

Welcome to the premiere community site for all things RIA sponsored by O'Reilly Media and Adobe Systems Incorporated.