.NET Fireside Chats - Laurent Bugnion on 'Silverlight 2 Unleashed'
.NET Fireside Chats - Laurent Bugnion on 'Silverlight 2 Unleashed'
Join the DZone community and get the full member experience.Join For Free
DZone recently had an opportunity to sit down with Laurent Bugnion, author of 'Silverlight 2 Unleashed'. In this interview, Laurent discusses the origins and future of Microsoft's Silverlight platform and some best practices for Silverlight developers to follow when doing RIA design and development.
DZone - Tell us a little about what you do at IdentityMine?
Laurent Bugnion - I started on the 1st of December 2008 at IdentityMine Switzerland, a new branch of this Tacoma/Seattle firm. The Swiss branch is based in Zurich, Switzerland, and will be active in whole of Europe. I am the very first European employee but we are hoping to expand later.
My exact title is “Senior User Experience Developer”, which means that I am a developer with a strong taste for user experience and graphics design (though I am *not* a designer!). My role is positioned between graphics designers and “hardcore” software developers. It is a coordinator and communicator role, sometimes named an “Integrator”. Of course I also continue to do a lot of software design, architecture and development in various domains such as Silverlight, Windows Presentation Foundation and I remain a developer at heart. I should also start developing soon for the Surface platform and Windows 7.
DZone - What motivated you to write this book?
DZone - What is Silverlight (and how does it differ from WPF)? Give us the nickel tour.
DZone - What are some of the hardest problems that developers are trying to solve when it comes to user experience on the web?
DZone - What kinds of features are available in Silverlight 2 as compared to Silverlight 1?
DZone - Have you heard what kinds of new features are in the works for Silverlight 3? What features would be at the top of your Wish List?
Laurent - Yes, I am lucky to be part of a group of community experts called the “Silverlight Insiders” that is kept informed of new developments in the Silverlight platform. To belong to this group, I had to sign a Non Disclosure Agreements, for reasons that are easy to understand, so I cannot really comment much on the new features… except for saying that exciting times are ahead and that more will be disclosed at MIX09 (Microsoft’s web conference in Las Vegas, in March). Scott Guthrie publicly commented on some of the upcoming features, such as some kind of hardware accelerations, some 3D support, and many others.
On top of my wish list, I would place a greater compatibility with Windows Presentation Foundation. I think that one of the key reasons why Silverlight is going to be successful is the re-use of skills between the richer desktop client application platform, and the slicker and smaller web client application platform. Every step that is made in the direction of an even greater compatibility is making me happy.
All in all, I am very pleased with the direction that Silverlight is taking.
DZone - Explain the difference between what can be done in Expression Blend vs. Visual Studio when creating a Silverlight application.
Laurent - Well first it is worth explaining that Expression Blend is not strictly needed to create Silverlight applications. You can develop a full featured application in Studio. However, the visual design part is going to be harder, because there is no visual designer support in Visual Studio yet for Silverlight. There is a “viewer” that lets you see the result of what you code in XAML, but that’s it in this version (note that there is a visual designer for WPF that lets you visually edit the user interface).
Blend is however more powerful when it comes to designing the user interface. First, it was created with the designers in mind. Most commands are the same, or heavily inspired, as in Adobe PhotoShop or Illustrator, for example. In fact, this gave Blend kind of a bad reputation in the developer community, because many developers are a little afraid of this unusual application. But once you get over this first weird feeling, you’ll discover that it is a very rich application that can teach you a lot about design, about WPF and Silverlight. In fact, I really recommend taking an online class or hands-on lab to learn Expression Blend and even Expression Design.
So yes, Blend is about design of your application, and Visual Studio is about coding. But since Blend can compile code, you can in fact run the application directly from Blend. That said, while you can create an application only with Visual Studio and without Blend, this is not possible with Blend only. You will need some kind of source code editor, and I recommend Visual Studio for this purpose. Remember that the Express Edition of Visual Studio Web is free, and lets you create Silverlight applications, just like the Express edition of Visual C# lets you do this for WPF. So you can start at virtually no cost.
DZone - Are there any best practices people can follow?
Laurent - The best practices for Silverlight are, in essence, the same as the one applied to Windows Presentation Foundation, with a twist. The twist is due to fact that WPF is a richer platform, and not everything is available.
The very first thing that comes to mind is the recommendation to clearly separate the presentation layer from the rest of the application. Also, this layer should be kept as thin as possible. This can be achievd by using rge so called “Model-View-ViewModel” pattern (MVVM), which is very similar to the better known Presentation pattern. If it is applied consistently and carefully, this pattern allows reducing the code in the presentation layer to a minimum (so we will have mostly XAML there). This improves testability, makes it easier to maintain, and makes the work in Expression Blend much easier, for example by allowing to create design-time data very easily. Using this pattern, you can develop a whole client application without needing to connect to the web services. The integration step can be done only later. In addition, it allows designers and developers to work on the same application at the same time.
Other best practices are really the standard ones used in .NET: Unit tests (including a really nice unit test framework especially made for Silverlight), layering, etc… Programming Silverlight is really about applying what you already know in .NET.
DZone - Are there any interesting case studies that you can discuss? Have you implemented a recent project using Silverlight?
Laurent - In my past position, I was working on a very big WPF project, and came to Silverlight on my free time. The transition from WPF to Silverlight was really easy, especially because I had prior experience with web applications, so it really all fit well together. I wrote Silverlight 2 Unleashed on my free time as well. The big WPF application we did at the time was really big, and applying the principles of MVVM pattern, separation of behavior and presentation, components, etc… really helped us in the project.
Now at IdentityMine I will also do Silverlight projects for a living, but it’s still to early to talk about that.
DZone - Who should buy your book?
That said, the book also guides the reader into more advance topics, and we go quite far and broad. Where I didn’t have the space to talk in detail about very advanced techniques, I at least gave indications to the reader where he can find more information. A book cannot cover all, but once you bring the reader to a certain point, I considered it my duty as an author to help the reader to continue learning on his own. I think I was rather successful in that way.
DZone - Do you have any future books in the works?
Laurent - The editor and I are talking about future books, but I must admit that I am still unsure. Starting at a new job with many responsibilities, many travels and wanting to keep my family happy are very important things for me. I loved every moment of the writing process (ok, maybe not EVERY moment), but it is a lot of work and I want to consider it carefully before I start again. For those interested to know more about this and other aspects of my work, they can follow me on my blog at http://blog.galasoft.ch and on Twitter (@LBugnion). I am always happy to meet readers and hear what they have to say!
Opinions expressed by DZone contributors are their own.