Interview with Jeremy Likness on Silverlight
Interview with Jeremy Likness on Silverlight
Join the DZone community and get the full member experience.Join For Free
Jeremy Likness is a Silverlight MVP. He is the product manager and senior consultant at Wintellect. He was developing enterprise application for over 15 years, targetting various industries including health, insurance and mobility. You can read his blog here.
Why did you choose Silverlight as the RIA platform of choice?
How did you learns Silverlight? Any prior .NET development experience?
Because I started with Silverlight early on, there were not many current books available and those mostly tackled features rather than architectures and best practices. Therefore, I spent a lot of time attending user group meetings, “Firestarter” events, and finding active developers in the community to follow on Twitter and subscribe to their RSS blog feeds. It was mostly through the Silverlight community online that I gained my knowledge, coupled with hands-on experience taking an existing product and porting it over.
You mentioned “Firestarter” events and user group meetings as learning sources. What about online resources – for beginner Silverlight developers, what online resources would you recommend when it comes to learning Silverlight and why?
The best place in my opinion to start is with the Silverlight site itself. There you can find tons of tutorials and videos (http://silverlight.net/getstarted) as well as forums that will link you to experts in the field. From there, a few sites aggregate news and blog posts, such as http://silverlightcream.com, http://sparklingclient.com/, and http://silverlightshow.net – all great resources to keep up to date and find other resources out there to follow and learn more.
What do you think about the future of Silverlight with the expansion of HTML5?
What do you think about the perspectives of Moonlight, a Mono implementation of Silverlight?
I think those are very excited and hope they move forward. While Linux is a very small percentage of the web footprint, it is a significant percentage and should not be ignored. One of the barriers to more widespread Silverlight adoption is platform reach, so the more we can support a full feature set on other platforms and browsers, the more compelling I believe the Silverlight story will be and the more cost effective applications built with Silverlight will become.
What do you think about the possibilities of running Silverlight applications on mobile devices other than WP7? Would it be worth the investment?
Absolutely. Silverlight has a rich, scalable UI designed specifically to handle various aspect ratios and display sizes, as evidenced by the implementation on the Windows Phone 7. Adopting a runtime on other mobile devices will empower companies to reuse more of their core systems across target platforms and move closer to the goal of “write once, run anywhere.”
Silverlight is known to be providing great capabilities for video streaming. How complicated would it be to implement a streaming mechanism with Silverlight from scratch?
I cannot tell you from experience. I am familiar with encoding technologies, but not to that level. I do know I see new codices embraced frequently – take, for example, the recent news relative to NVidia’s 3D video or SRS bringing 5.1 surround sound – and because Silverlight is run on the Core CLR, ports of many applications and algorithms from the .NET world have been simple and straightforward.
There is an ongoing debate regarding Silverlight development tools. Some developers (me including) believe that tools like Expression Blend might produce messy markup and generally build messy layouts that are hard to maintain. Others state that tools such as Blend make the development much easier and faster. What do you think?
I think this is the old debate whether the tool or the developer makes the bad application. Personally speaking, I was the one who still wrote HTML in Notepad. What I learned though is that tools are there to provide greater value and shorter time to market, so as professionals we should take it upon ourselves to learn and become proficient with them. I don’t consider myself a design or graphic artist, but I have made an effort to learn Blend and when you have knowledge of the tool, you will be amazed how fast it can help create beautiful user experiences. I disagree completely that the tool could result in anything messy other than in the hands of a developer who refuses to take the time to learn it, as I’ve seen people create amazing experiences in 5 – 10 minutes using the powerful features it contains.
Not long ago developers started working on various out-of-browser applications based on Silverlight. To what extent does Silverlight allow developers to access the client system (like native APIs)?
Silverlight takes a cautious “as much as you like approach.” For maximum compatibility you can choose to run with restricted trust and provide an experience I believe the end user expects from a web-based application, which is sandboxed from their valuable assets. You can also, with explicit opt-in from the user, elevate the trust and have full COM inter-op which really makes anything COM accessible, Silverlight accessible.
Do you think that Silverlight should support the new V8 codec for high quality video streaming?
I think Silverlight should embrace as many popular codecs as possible, and provide mechanisms to optionally import other codecs (we don’t want a bloated runtime that supports everything, but one that is extensible enough to support almost anything).
Could it be a reasonable choice to build an entire web application only in Silverlight (instead of, for example, ASP.NET)? We’ve certainly seen Flash-only sites before.
Reasonable from what view point? It can be done, but the question is, why? I’m not sure that’s where Silverlight shines. I think it is best explained by what a client recently answered when I asked them if their application would require deep-linking (the ability to navigate to areas of the application with a URL). Their reply was, “No, we’re building an application, not a Silverlight website.” I think that is valuable advice – you don’t fire up Word or Excel and expect to use a URL to jump to formula or open the properties tab. They are applications. Silverlight is way of delivering applications over the web and creating a consistent experience, but I focus on the application perspective. To me, it is an application and the web is the delivery. Certainly it can interact with the web, but that’s not the point.
Flash is currently supported on pretty much every major desktop platform. What can you say about cross-platform support in Silverlight?
I’ve covered it here. The coverage is similar, with Flash probably having a leg up in the Linux world, but again, while this may factor in the consumer side, where I play is mainly the enterprise space and most of the companies we work with want reach on the two major workstations, which is to say Windows and Mac.
What is the main advantage of Silverlight compared to Flash?
I can only speak to the advantages I found as I mentioned in an earlier question. I don’t think it would even be fair for me to compare Silverlight to Flash because I don’t know Flash that well – I’ve never developed with Flex/ActionScript so I would not be the right person to provide a detailed comparison. Flash is a black box to me, what I know is Silverlight and it does almost anything I need it to.
What are some considerations developers need to be aware of when working with Silverlight development compared to desktop development? Are there specific “restrictions” or limitations (besides the obvious sandboxed environment)?
Certainly there are many considerations, but I think they should be framed in two ways: developers moving from the desktop to Silverlight, and developers moving from traditional web development to Silverlight. Both have differences. The key is to realize Silverlight is an application that runs at the client, so we’re back in the world of “client/server” and Silverlight is most definitely the client. To keep Silverlight safe, it runs in a security sandbox. This means that without elevated trust, I cannot write something malicious that will access your personal files or pull sensitive data. Instead, the application is in a safe box that has its own storage and can interface to other systems through web services. You’re not going to attach directly to a local database unless you create one on top of isolated storage, and you’re not going to be able to grab a user’s files without asking their permission.
What’s your opinion on third-party Silverlight controls. Lately, there is a multitude of those. Would you prefer developing your own controls or use a third-party component?
It all depends on what I’m building. There are some phenomenal controls that not only provide a beautiful user experience, but are very easy and intuitive to use. Silverlight’s UI system makes it very straightforward to create custom controls, and there are certainly existing open libraries such as the Silverlight Toolkit that fill many gaps. Most of the time I can get what I need out of the box, but for some very powerful and compelling experiences, the third-party controls absolutely make sense.
Is there any possibility to get Silverlight code out of the “sandbox”? How safe is the Silverlight execution model?
I’d say it should be very difficult. Never say never, but to date I am not aware of any major threats that were delivered via Silverlight.
Are there any skills/requirements that are specific to Silverlight developers and not present in other fields (for example, native development). If there are, what are those?
Certainly XAML is a skill to acquire, which is not specific to Silverlight (it is also used by WPF and Windows Workflow). There is a need to understand the Silverlight application model, and because of the fact that it is delivered over the web, there are some scaling considerations that come into play such as dynamic module loading. For this reason, either native frameworks like the Managed Extensibility Framework (MEF) or third-party frameworks are important to know and understand as they can help achieve the desired result of a fast-loading, flexible, low footprint client experience. One issue I see when interviewing developers for Silverlight is that many people took the time to figure out how I get what I had “here” over “there” meaning whatever other technology into Silverlight. That’s a good first step, but isn’t necessarily optimal. There are many features specific to the platform that are important to know and understand, whether it’s how Type Converters can help with XAML Intellisense or how IApplicationService can keep applications more modular.
When hiring Silverlight developers, what are the skills you are looking for in the candidate?
I’m looking for a variety of skills. The first is that they have their fundamentals down. We interview heavily on the core framework and for a good reason: most of our applications target the large scale enterprise, so things like performance and memory consumption become extremely important. It’s amazing to me how many developers have been writing code for years, but haven’t taken the time to learn fundamental threading, or are told that a delegate is a function pointer and don’t delve any deeper, or believe that IDisposable flags an object for garbage collection. It is very easy to see a developer who has had to troubleshoot a robust, scalable application because they’ve had to go deeper than the light Google search and really understand the fundamentals of the CLR in order to solve those problems. When it comes to Silverlight, I want to see competency in both XAML and the code-behind – are they just handed XAML or have they had to troubleshoot it, maybe work with designers, and also solve complex problems? From code, it is quickly evident whether they’ve had to deal with things like dynamic module loading or custom-built navigation or if it’s really been writing some code to add to an existing framework or smaller site. I want to know that the candidate is thinking on a larger scale and can demonstrate not from the textbook, but through experience a working knowledge of the Silverlight framework and how to write solid, robust, scalable code that will run well in the enterprise environment.
One of the concepts behind Silverlight is that the UI and logic is separated. Have you encountered situations when you only had to design the XAML part of the application and never touch any code?
Most often it’s the reverse. I am often on large projects where there is a dedicated design team of several designers, and there isn’t necessarily a sequential flow between their work and the development side. Where Silverlight is amazingly powerful is this clean separation – I can literally built the entire logic for the application with unit tests and functional modules without ever touching a single screen at the same time the designers are creating stunning visual experiences. When we are done, often the only requirement is a few lines of code to connect the code to the view, and we’re done. Because the designer in Silverlight is “design-time” aware, you can create special stub objects that allow data to appear when designing even when the application is not running, and keep it completely separated from the data that appears at runtime. It’s a powerful way to maximize workflow between the teams and this is where I’ve seen major reduction in time to market – in traditional HTML-based sites, the designer almost always has to get into the code to create some effects not supported by CSS, which creates a dependency between the teams. XAML, when managed correctly, can completely eliminate that deadlock.
In what ways are you implementing unit testing in your Silverlight applications?
I’ve been using a combination of the Silverlight Unit Testing Framework with a tool called StatLight that enables running the tests from the command line in an offline/automated fashion and storing the results in XML reports. I also rely heavily on Moq for mocking interfaces for my tests. Personally I found a great example of a project with unit tests is the Silverlight Toolkit, which has thousands of unit tests. It’s a good starting point to see how others are doing it.
How did unit testing change your development approaches?
I’ve been integrating unit tests for years now so it’s tough to recall what the major changes are. I can say when I first starting using them I thought they added a lot of overhead. It didn’t take long, however, to find out how much value they bring and how much it is a myth that they add time to the overall project. I found they not only provided tremendous value when it came to refactoring code, but on large, multi-tier applications gave me the power to fully test a tier independent of any other tier. In the case of Silverlight, I can write the entire set of view models and services without any views and have the functionality fully tests before wiring it in. That means faster code for me, because I can tweak and run tests to fix bugs rather than having to compile, jump into the UI, move through a set of gestures and inputs and then redo that every time I want to recheck the results of the test. It also creates a way of thinking about writing software that I think produces higher quality code.
Why do you think Silverlight was chosen to be the main platform for Windows Phone 7, when it easily could be something else, just like for Windows Mobile (a dedicated sub-framework)?
I think there are a number of reasons. It’s a platform that produces amazing “eye candy” so what better way to bring a competitive phone into the market? By leveraging an existing platform and technology, almost any developer who can write Silverlight code is now able to write mobile code with only a few minor differences from what they are used to. I’ve developed for other mobile devices and cannot think of any experience that ever came close to the ease of transition from Silverlight applications to Windows Phone 7 applications. This means there is little to no learning curve and a large group of people ready and willing to produce applications. Let’s face it: much of the “sizzle” from smart phones is the dearth of applications available and this strategy will ensure there are applications that get to market fast. Finally, I already see companies finding they are going to improve their bottom line because now not only can they leverage existing mindshare, but also take advantage of code share as well – I wrote an isolated storage database for Silverlight called Sterling (http://sterling.codeplex.com/) and had to change about 6 lines of code to make it work on the Windows Phone 7 platform. That’s powerful.
Do you think Silverlight out-of-browser applications have the potential to replace WPF desktop applications?
I don’t think so, and while my opinion may not be popular, I don’t want to see it happen that way. I think Silverlight fills a powerful niche and I’d love to see more feature parity with WPF, but there are many things WPF does well. What I don’t want to see is Silverlight hacked into different “flavors” so it can support the browser sandbox and yet still live as a standalone desktop experience as well, short of what is possible in the limited trust mode. If I want to make a desktop application, let me use a desktop technology like WPF and let’s grow that technology to have an amazing rich and deep set of features that operate in that environment. The minute you ask me to start interfacing with low level drivers, OS-specific APIs, etc, I lose the magic of Silverlight because now I’m in a single lane. The reality is that Linux, Apple, iPad, Windows 7, and other platforms all have their own APIs and features that don’t translate directly between platforms, so rich experiences should be targeted using the technologies that work best on those platforms. Silverlight works well because it takes common features and higher level interfaces such as UI, sound, video recording, etc and creates a standard experience. If anything, what I’d prefer to see is a deeper reach on mobile platforms than a stronger presence on the desktop.
What features would you like to see implemented in Silverlight?
I’d like to see more native 3D functionality, because compelling user interfaces are becoming more interactive and require more depth than they did before (and because the gamers will love it, and provide another avenue for growth on the platform). I’d like to see better print support, as this is crucial to drive heavier enterprise adoption. Most business users say “let me see it … now let me print it, the way I want it.” Increased codec support is important to keep up with the rich media side. More native libraries to keep pace with evolving technologies like OAuth and Federated Identity. More binding options. Lastly, I think adopting a standard way to handle sequential asynchronous operations will be key to bridge the gap for many developers who are used to asynchronous programming, or those who are and can’t stand how ugly code gets when you are making four dependent calls and trying to organize it in code.
What can you say about your experiences with 3D development in Silverlight?
Right now 3D really falls in two categories: the illusion of 3D using 2D objects with plane transformations, and true 3D using third-party tools. Our company has done some interesting projects but due to the lack of a native 3D API for ray-tracing and vector-based manipulations, the majority of the work has been done using home-rolled algorithms and code to project the necessary images onto a bitmap surface. This is why I’d like to see some improvements there. Windows Phone 7 has XNA available to solve that problem space on the phone, but I think the ability to include the XNA libraries in a Silverlight application with a nice API would really transform what is possible. Currently the choice is mainly one or the other.
Would it be possible to design Silverlight apps without VS and Blend? If so, is this method applied in your current work environment? What could be the advantages/disadvantages?
I’m sure it would, but I don’t know why I would. Even if I could not invest in Blend as tool, the combination of VS 2010 Express and the free Expression Blend SDK would give me most, if not all, of what I need. I can’t speak to the pros and cons outside of that environment because I’m not familiar with it.
Opinions expressed by DZone contributors are their own.