Explore Videos MSDN eNews Social
Windows
Web
Phone
Cloud
Visual Studio
Security
ALM
Breakpoint
Canada Does Windows Azure
More
The latest on developer tools and technologies you care about.

Sign Up
Latest Editions
Previous Editions  
Stay connected through on your favourite social network.

Twitter
Facebook
LinkedIn

Silverlight FAQ from TechDays

Silverlight FAQ from TechDays

  • Comments 2

Thanks for everyone who came out to the Toronto and Montreal TechDays. The three Silverlight sessions in both cities are extremely popular with long line-up of people wanting to ask questions about after the presentations. Robert Burke (Silverlight Samurai Skills presenter in Toronto), Laurent Duveau (Silverlight Samurai Skills presenter in Montreal), and I (presented Silverlight Control Framework) gathered some frequently asked questions below and provide our answers to share with you.

1. What tools do I need for building Silverlight 2 applications?

From the design side, you need  Microsoft Expression Blend 2 and then install Microsoft Expression Blend 2 Service Pack 1. Expression Blend 2 along with Service Pack 1 allows designers to graphically create UI's for Silverlight 2 applications. From the development side, you need Visual Studio 2008 SP1 or Visual Web Developer Express with SP1 and download the Silverlight Tools for Visual Studio 2008 SP1. For creating Deep Zoom experience, Install Deep Zoom Composer. Also, download Silverlight Toolkit. This Toolkit is a Microsoft project containing Silverlight controls, components and utilities that can be downloaded and used in your Silverlight applications. It includes full source code, samples and tests.

2. How does Silverlight deal with multiple paged applications?

Think about SL applications more like desktop applications in the sense that a new page can be created dynamically in runtime. The implementation is quite simple: you create your different pages as page1 (.xaml and .xaml.cs), page2, page3, … , and then create a Page Switcher (i.e. it`s the initial start page) so that it can load different pages as necessary. This way not all pages need to be created at the beginning, and when a new page replaces an old page in the Page, the old page goes to garbage collection.  Watch a tutorial on Using Multiple Pages.

3. Do I need special servers to host Silverlight applications?

No. SL applications are complied as .xap file which is essentially a zip file and can be hosted on any server.

4. Expression Training for Designers?

Yes. There are quite a few online tutorials for designers. Please see my Expression Resource blog post.

5. How is Silverlight different than Flash?

Using Silverlight, you can created similar experience as Flash on the web. However, there are several areas of experience we demonstrated at this year`s MIX conference that would be very hard to build with Flash.  First is the rich interactive Olympic media experience that was delivered using Silverlight by NBC in August. Flash doesn't have the adaptive streaming capabilities to host that type of experience. Second is the Deep Zoom experience that comes with Silverlight 2, which is very hard to achieve using Flash.

Second, Silverlight is part of our UX platform, which spans from Windows to the Web, and include emerging surfaces such as the media/living room (Xbox360, Media Center PC), as well as mobile devices. Each of these platforms has shared capabilities and development tooling, but greatly different performance and integration characteristics. Similar to developing Windows based desktop application, Silverlight apps can be developed using the same tools - Expression Studio and Visual Studio. Thus, Windows designers and developers can easily transfer their skills to develop Silverlight applications

Third, designers and developers can work together building Silverlight apps more effectively using the integration between Expression and Visual Studio. The "secret sauce" to the process is XAML which provides the ability for both designers and developers to work on assets with the two tools with little to know re-work as the assets are passed back and forth between the two roles.  The most interesting thing about Designers for SL is that your vector based graphics and layout are immediately "ready" for use by the dev's and will look exactly the way they were designed in the final product.

Lastly, the intent of Silverlight is not to replace Flash, but rather provide a choice for designers and developers. Silverlight control can interact with Flash controls with JavaScript. Expression tools can work with adobe tools together to create compelling UX as well. For example, in Expression Design, designers can import Adobe Illustrator files and images files from Photoshop into a workspace and then export as XAML.

6. What about Silverlight and SEO ?

You can use some Search Engine Optimization techniques to expose Silverlight content to search engines. You can read the following links to find out more.
http://blogs.msdn.com/synergist/archive/2007/10/03/simple-silverlight-seo-with-asp-net-and-xslt.aspx
http://www.nikhilk.net/AjaxSEO.aspx


7. Can I use ADO.NET in Silverlight ?

ADO.NET is not available in Silverlight and it makes sense as Silverlight runs in the browser. The way you manage data with Silverlight is by creating a model over your db on the server and expose it with web services. You can look at this ADO.NET Data Services example.
http://wildermuth.com/2008/11/08/New_Silverlight_2_ADO_NET_Data_Service_Example


8. Would you recommend Silverlight for line of business application ?

Silverlight has everything you need to do data driven apps: data controls like DataGrid, rich Networking (WCF, SOAP Web Service, REST, ...), LINQ, Data Binding.
The question is more on who your users are (Win, MAC, Linux ?) and where they are (Internet, Intranet ?).
You can read more on this blog post for more information:
http://wildermuth.com/2008/06/26/Silverlight_and_Line_of_Business_Applications


9. Is ASP.NET dead ???

No!!! Silverlight is not a replacement for ASP.NET and both technologies have different goals. Silverlight is a cross browser, cross platform plug-in for building rich interactive application inside the browser. ASP.NET runs on the server and needs the .NET Framework as well as Microsoft IIS web server. Aspx pages generate html in the browser, you can add richness with AJAX (JavaScript). ASP.NET offers high level services (Membership, Role, Profile) not yet available in Silverlight. In fact ASP.NET can nicely complement Silverlight!


10. Can you set/read cookies in Silverlight ?

Silverlight runs in a sandbox and do not have access to local files on the client. To store app settings, user preferences or small pieces of data you can use Isolated Storage: http://silverlight.net/learn/learnvideo.aspx?video=65677

11. Compare Silverlight vs WPF XBAP

XBAP (XAML Browser Application) allows you to run Rich Internet Applications that look and function like WPF desktop applications in browsers (IE and Firefox on Windows). A restriction on XBAP is that it needs .NET framework 3.0 or higher to be installed on the client machine to run.

XBAP:

  • Only Targets IE and Firefox on Windows
  • All WPF Features/controls are available
  • Supports 3D
  • Deployment is harder as we need to take care of deploying all .Net Dependencies on client Machines
  • Heavy Weight
  • Better for Intranet Applciations

Silverlight:

  • Cross browser, cross platform
  • Subset of WPF features
  • Easy deployment (xap packages) and light Weight
  • Better for Internet Applications

12. Can you store .NET objects in Isolated Storage ?

Yes you can write any .NET object or collection in the local cache and read(cast) them later. However, remember avoid saving sensitive data like passwords or connection strings as user can get access to these files.


13. Is there any reporting control with Silverlight 2 ?
There is no Reporting component in Silverlight but you can use the new charts controls in the Silverlight Toolkit.

Robert Burke's Blog: http://robburke.net/

Laurent Duveau's Blog: http://weblogs.asp.net/lduveau/

Thanks, Qixing

Leave a Comment
  • Please add 2 and 7 and type the answer here:
  • Post
  • My Silverlight sessions at TechDays Montreal were a great success and generated so many questions like

  • My Silverlight sessions at TechDays Montreal were a great success and generated so many questions like

Page 1 of 1 (2 items)