Yesterday’s Code Camp presentation went relatively well – the Demo Gods only frowned a couple of times. I wanted to take a few moments to review some of the things that went wrong, what I did to overcome them, and also to review some of the questions I was asked to answer.
Question: I have a client who needs to write a Business Application. Is Silverlight the right technology to use?
Answer: Um….yes? Actually, I could not answer this directly. There are too many variables involved. What is the existing technology investment, if any? What are the client’s feelings about that investment? Should it be kept, or does it need to be replaced or rethought? What are the end-user needs, especially in terms of OS platform, ease-of-deployment, occasional or ubiquitous network connectivity, etc? What is the existing skillset for maintaining the code going forward?
There’s a lot that goes into making a decision about adopting a technology for a problem, especially if it is for a client. Silverlight is certainly a good platform for developing interesting applications, including Line of Business applications. I’d invite people to review the “Why Silverlight” portion of my presentation to see if its benefits are applicable to their specific situations.
Issue: Visual Studio and IE locked up during the demo. I was running the application, and it got stuck at 45% loading. IE was unresponsive and Visual Studio told me it was busy whenever I tried to do anything.
Cause: Voodoo?
Resolution: I used Task Manager (actually I used Process Explorer) to kill IE. Visual Studio was still locked up. I tried to shut down the Cassini web host, but the tray icon was unresponsive. In the interests of time, my next step involved using Process Monitor to kill Visual Studio and just restarted things from where I left off. That worked…otherwise my next steps would have involved rebooting, and perhaps doing a clean build.
Issue: During the Authentication topic, checking the ASP.Net Authentication Service revealed that it was in a bad state.
Cause: Pilot-error (cut and paste problem in the web.config)
Resolution: When I pasted in the configuration contents for the Authentication and Role services, I neglected to combine these with the pre-existing service configuration for the other web service I was using. The configuration parser got annoyed when it realized that I had two sections with the same name. I just merged the Service and Behavior declarations in and successfully rechecked the ASP.Net Authentication Service.
Issue: During the Authentication topic, when showing server-side role checking, I got an exception when launching the application.
Cause: Pilot-error (cut and paste problem when adding the functionality to the web service code)
Resolution: An astute attendee noticed that when I pasted my new GetProducts method into my web service code, I had left the OperationContract attribute off. I re-added the attribute, recompiled, and was able to show that logging in as different users with different roles returned different data. In gratitude, the user got one of my giveaways on the spot – a copy of O’Reilly’s Programming EF.
Question: I have a shop of ASP.Net/HTML/Javascript developers. Should I go back and tell them that they need to learn Silverlight?
Answer: Um…yes? Again, a lot depends on the specific problem domain. Silverlight has many benefits, and if those benefits seem to apply to the direction your business is going, then it is likely that it would be a good thing to learn. Be careful, however of the old adage “if all you have is a hammer, the whole world looks like a nail.” Sometimes, you really should use a screwdriver. Silverlight is a viable technology, and is being used in many professional scenarios. Unfortunately in answering this I think I gave too many examples of people using the media capabilities of Silverlight (NBC Olympics, CNN Inauguration, etc.) For a showcase of hundreds of actual Silverlight Business applications, please visit the Microsoft Silverlight Showcase and select “Business Applications” from the Category section. Also, Microsoft has put together some compelling data in this application.

Silverlight Showcase Business Applications
There were also a couple of questions about LINQ-to-Entity and EF vs LINQ-to-SQL. There are better sources than me for information on that battle.