Way back when I built an internal site for a customer using silverlight 2. They've been happy with it and I've barely had to touch it. Is the expectation that this site will always work? What I'm afraid of is suddenly getting a call years from now that the users installed silverlight X and now it's broken and I'm going to have to convert it immediately past Y versions of Silverlight to get the site back up, and I don't even do Silverlight anymore.
I already went through this once when it went from 2 beta to 2 release and and scrambling to fix all the breaking changes and get the site back up. It wasn't as big a deal then as we were in beta anyway.
I could upgrade now but it would be really tough to go back to the customer and ask for money to do an upgrade when they are happy now and will see no noticeable benefit from staying current. Additionally there are some third party controls that would have to be licensed again.
So I guess what I'm asking is there a known end of life? Or do we just play it by ear?
Based on the Silverlight Support Lifecycle Policy, it looks like official support for Silverlight 2 has already ended (as of October 12, 2010). However, some other documents (mostly listed at this SO question) give the impression that Silverlight apps are binary backwards-compatible through a sort of Silverlight "quirks mode," so as long as you're not changing your Silverlight app and the policy doesn't change, the app should work indefinitely.
The folks at MS have so far done a reasonably good job of maintaining backwards compatibility between Silverlight releases. But there have been some significant changes, and depending on what your app does, what features it uses, and what bugs in the runtime that it takes advantage of, it may or may not continue to run cleanly on future versions of the runtime. MS gives some good examples of the breaking changes between Silverlight 3 and Silverlight 4 here.
One example of many: Silverlight 4 introduces a new "Watermark" property on the Textbox class. It's possible that a Silverlight 2 or Silverlight 3 application subclassed the Textbox class, and added their own Watermark property. References in XAML to that Watermark property could thus throw an AmbiguousMatchException when executed on a Silverlight 3 or Silverlight 4 runtime.
Presumably there will be more changes of this sort as MS moves to SL5 and then SL6, and so forth: and their dev team will stop worrying quite so much about breaking SL2 applications. A change that introduces a really cool feature but breaks some reasonable portion of SL2 applications would presumably be unacceptable in SL5, but maybe not in SL6 or SL7.
My recommendation in your specific situation would be to let your customer know about the possibility of future issues now, so that they have a chance to make a decision about it when it's not an emergency.
Take it easy :) It would allways work.. Silverlight have 100% backward compatibility for EVERY major version!
Related
As I write this question, 2 days after the beta of .NET 4.5 was released, the What's New in WPF 4.5 Version 4.5 Beta page on MSDN still lists "Integrating WPF with win32 Graphical User Interfaces" as an area in which WPF 4.5 offers improvements. That page talks about the two new properties on HwndHost that support this: IsRedirected and CompositionMode. Also, the top-level what's new in .NET 4.5 beta page mentions this integration as a new feature.
Again, as I write this, there are pages for those two items. You've got IsRedirected here and CompositionMode here. (Update 27th Jan 2014: original pages no longer available, so I've moved these links to point to the Internet Archive copies.)
However, if you go to the docs for HwndHost itself, neither of those properties is present. And they don't appear to be in Visual Studio either.
So it would appear that the rumours are true - it looks like the airspace improvements for interop have been dropped. But just in case anyone from Microsoft is reading this, it would be good if a) we could get positive confirmation and b) the pages mentioned above could be updated to stop getting our hopes up.
Update 27th Jan 2014: I've updated the links for IsRedirected and CompositionMode to point into the Internet Archive, because the original links are now dead. Also note that the What's New pages no longer mention this because those links are now for the final release. You can see the old pages that were current when I originally asked this question at this archived page and here.
There is a rather good blog post from Dwayne Need that describes the extraordinary effort they put in trying to make it work. Nothing subtle, they for example ending up intercepting over 200 GDI functions to get them to play along with the WPF rendering model. The outcome was to be expected:
You can imaging my heartbreak when, after an extensive review, we decided we could not actually ship this feature. Our concern was that we had to hack too deeply into the system, and in ways that were too difficult to explain - let alone maintain. Even though we required that developers explicitly turn on this feature for each HwndHost, we felt the kinds of problems they would encounter would be baffling to them and training our support engineers to handle the escalations would be very difficult. Even towards the end of our development, we were struggling with a long bug tail and performance concerns.
This is exactly the kind of deep system integration that needs to be done by the Win32 platform team, officially sanctioned and supported. With Win8, we are beginning to see some incremental improvements in this space, as noted before in the DirectComposition API. Unfortunately, it is still not possible to build the same kind of rich composited experience we had developed.
Whether the Windows group is going to commit to providing this kind of integration is right now an open question. They certainly put their money on a very different horse and spent a lot of effort on WinRT, a rendering model that's certainly inspired by WPF but doesn't do anything to make it better. If it is going to be tackled at all then count on years to get there.
Do check the rest of the blog post as well. It has excellent, albeit it high-level, advice on addressing existing airspace issues.
A suggestion to "Bring back the HwndHost.IsRedirected and CompositionMode" was posted at the Visual Studio UserVoice.
Microsoft declined it, saying:
at this time, we will not be able to add the feature to WPF and the .NET Framework.
It also looks like the MSDN pages you linked to have been taken down.
I have been planning since Summer to build a new hobby site over Christmas break in which I will use Silverlight to make some super-awesome navigation menu. I was crushed to read that Microsoft is de-emphasizing Silverlight (to throw all their weight into HTML 5 I guess).
I have never used Silverlight, but I am trying to build my development skills around Microsoft products, and Silverlight seems like a really cool technology, thus my interest. If it is not going to have Microsoft's full support I am a bit apprehensive about committing to it.
With that said I have some questions:
1.) At this point in time can I get roughly the same results from HTML 5 as I could Silverlight when creating my navigation menu and with roughly the same amount of effort?
2.) If HTML 5 cannot fill the shoes of Silverlight at this time then what (Flash)?
3.) Is my apprehension about Silverlight even justified (would you use it now)?
I would point you to these two posts:
http://timheuer.com/blog/archive/2010/11/01/silverlight-is-dead-long-live-silverlight.aspx
http://team.silverlight.net/announcement/pdc-and-silverlight/
In summary, Silverlight is not going away. Microsoft is recognizing the true cross-platform potential of HTML 5, but the spec for that isn't even complete yet, and we've got years before there is consistent support for it across the most popular browsers. Silverlight is the basis for development on Windows Phone 7, which is a bet-the-farm play for Microsoft.
Speaking for myself, I'm getting ready to develop an entire ERP in Silverlight.
This was simply unaltered tech journalism which may have focused a bit much on the face value, without further probing and questioning which was courtesy of Mary J Foley. Read the BobMu post.
Let me sum up the HTML5 vs Silverlight debate saying this...use Silverlight to build web apps, and HTML5 to build web sites.
Silverlight is moving forward just as it was pre-PDC. Ignore the hype, it is just that...hype.
We have a moderately complex silverlight based application written in Silverlight 2. Eventually we will move to Silverlight 4. In terms of porting effort, would it be better to to port our app from SL2 to SL3, and then to SL4. Or, should be port from SL2 to SL4 in one step.
Bear in mind that Silverlight 4 is currently in beta and does not have an end user runtime; so upgrading your app to Silverlight 4 right now is not really an option.
I'd go with the SL2->SL4 port directly. SL4 simply offers more, so it's a good opportunity to start looking at your app and making optimizations using the latest.
You'll find that 3 and 4 are more
similar and therefore take around the
same level of effort in terms of
learning curve.
Assuming porting takes you a while,
expect SL4 to be out sometime in Q2
CY10 with or around the same time as VS2010 is released. That should offer you time to
iron out the issues in beta and then
when RTW happens, you'll be nearly
ready with your port.
After RTW, expect a couple of months
for most people to upgrade their run
time. It should happen relatively
quickly given Windows Update, etc. In a corporate environment, it may happen much quicker if yours is an LOB and certain employee groups rely on your app - you have the upper hand in dealing with IT.
We are a team of .net winform and asp.net developers building custom enterprise applications for organisations mainly in the public sector. Is it time to retrain/retool the team in WPF/Silverlight? How to make management, in first place and clients second buy the idea?
Clients shouldn't care, necessarily. You'll convince clients by showing them how you can be more productive and succeed in their goals, not by explaining tech. to them.
Management, on the other hand, is trickier. You need to convince them of the arguments for using WPF or Silverlight vs. Windows Forms. This can include:
Easier maintainability, especially when designed properly
More flexibility
More options to gain a competitive edge, via using new techniques such as better graphics/etc
Better support/lifecycle, since the newer technologies are actively developed and improved by Microsoft
Better deployment options (particularly with Silverlight), allowing for more flexible deployment strategies
Personally, I think that with VS 2010, WPF is finally mature enough to be the only option. Previously it was held back by performance issues, poor text rendering and a lack of out-of-the-box controls.
Here's what Rocky has to say, and I completely agree with him:
Silverlight and WPF both compete with
Windows Forms. Poor Windows Forms is
getting no love, no meaningful
enhancements or new features. It is
just there. At the same time,
Silverlight gets a new release in less
than 12 month cycles, and WPF gets all
sorts of amazingly cool new features
for Windows 7. You tell me whether
Windows Forms is legacy. But whatever
you decide, I’m surely spending zero
cycles of my time on it
http://www.lhotka.net/weblog/ItIsOnly8HowCanItBeLegacy.aspx
Before you go down that path, have a careful read of the Silverlight 4 news that is coming out of PDC. You will end up doing a mix of both Silverlight and WPF, it is unlikely that you will end up doing only one, and they are sufficiently alike that skills from one can be used in the other. However you don't want to be wasting money and time on Silverlight training that is out of date, as Silverlight 4 will be no more than 6 or 9 months away from being released (possibly sooner). Therefore you may want to do the WPF training first.
To add to what #Reed said:
faster development cycle (once the developers are familiar with the technology)
very easy to do automated testing, including automated UI testing
Is it possible for you to step towards WPF by embedding a WPF app into one of your existing WinForm applications?
It can be a lot harder to sell a complete retooling without an example of some of the benefits (in particular, maintainability and flexibility, especially in the UI). Try starting with a well used portion of your current application and giving a demo with it in WPF.
It seems that Silverlight/WPF are the long term future for user interface development with .NET. This is great because as I can see the advantage of reusing XAML skills on both the client and web development sides. But looking at WPF/XAML/Silverlight they seem very large technologies and so where is the best place to get start?
I would like to hear from anyone who has good knowledge of both and can recommend which is a better starting point and why.
Should you learn ASP.NET or Winforms first? ASP or MFC? HTML or VB? C# or VB?
Set aside the idea that there is a logical progression through what has become a highly complex interwoven set of technologies, and take a step back and ask yourself a series of questions:
What are your goals; how do you want to balance profit against enjoyment
Are you short term oriented or in for the long haul
Are you the type of person who likes to get good at something and do it a lot or do you get bored once you fully understand it?
The next and hardest step is to come to accept that any advice you are given is bound to be wrong; and the longer the time horizon the more likely it is to be incorrect. If the advice is for more than six to 12 months, the probability the advice is wildly incorrect approaches 1.
I can only tell you my story, quickly. In 2000 I was happy as a consultant working profitably in C++ on Windows applications, writing about ASP.NET and WinForms. then I saw C# and the world turned upside down. I never went back.
Two years ago I had the same kind of revelation, only an order of magnitude bigger, stronger and with more conviction about Silverlight. Yes, WPF is magnificent, and it may be that I'm all wet about this, but I believe in my gut that Silverlight changes everything. There was no doubt then and there is no doubt today that Silverlight is the most important development platform for Microsoft since .NET (certainly) and possibly since the switch to C++.
In a nutshell, here is why. I don't understand where its limitations are. With most platforms I do: you can do this, but you can't do that. WPF is a pretty good case in point, as was ASP.Net and WinForms and, well really everything until now.
With Silverlight, I don't see the boundaries yet. Silverlight has already leaped off the desktop onto phones, and I don't see any reason for it to stop there. Yes, it is true, it is bound by the browser, but I see that less as a jail cell than as a tank in which Silverlight will be riding over lots of terrain (it must be very late, I should go to bed).
In any case, for now, learning Silverlight is a gas, there is a lot of material on the Silverlight.net site, and what is the very best thing about learning Silverlight is that if you don't see what you need you can holler at me and I'll make sure you get it pretty quickly.
Enjoy, good luck and the dirty little secret is you'll be fine whichever you choose. It's all just software.
-jesse
Jesse Liberty
"Silverlight Geek"
I'd say go with Silverlight first!
I have programmed with WPF and Silverlight before.
But as Silverlight is a subset of WPF if you go in too deep and try to switch to writing Silverlight applications, you'll be scratching your heads looking for that "tag" you learned to love in WPF but is not available in Silverlight.
When you master the basic things in Silverlight first, the extra mechanism/trigger/whatever features in WPF will simply add to most of what you've already known.
Silverlight in WPF differs at the features level, not just some missing controls or animations. Take the WPF triggers mechanism for example, is not available fully in Silverlight.
So learning the smaller subset first, you can extend that knowledge to the full set later, but if you started at the full set and gets addicted to some of the niceties available, you'll have trouble down the line when someone asks you to port your designed-utilizing-WPF apps to Silverlight.
I'll go against the grain and say learn WPF first.
Here's my reasoning:
Much more resources are available for WPF than Silverlight, such as books, blogs, and msdn documentation
WPF Books
You're not dealing with a Beta, moving target
You don't have to deal with working with only asynchronous calls
Not limited by lack of features such as Merged Dictionaries, Triggers, TileBrushes, etc.
You don't have to worry about re-learning to do things correctly because of lacks of features in SL
Silverlight is a stripped down version of WPF so it should have fewer things to learn inside. On the other hand, the two platforms have different targets (web & rich client) so I guess it depends on what app you're going to build.
If you just want to learn for yourself (no app in the close future) I'd pick Silverlight because it would be less to assimilate. Still, Silverlight is pretty much a moving target, much more than WPF, so you'll have to keep up with some changes from time to time (the joys of being an early adopter :)).
WPF has lots more stuff that you will probably want to use at some point but I would wait for the needs to arise first.
Every industry expert I've heard on podcasts, blogs and interviews recommend learning Silverlight first and then gradually moving to WPF which is a huge UI framework.
Silverlight is light and allows you to work on smaller subset of controls and features such that you get your head around this new UI building paradigm based on,
Templating
DataBinding
Styles
Update: 07/2011
I hate to mention this, but in recent times Microsoft has put more focus on HTML5, Javascript and CSS by bringing forward powers of IE 9 and IE 10, as well as the upcoming Windows 8.
More and more developers and CTOs are skeptical about Silverlight as a LOB application platform as the time passes by, we are suspecting Silverlight will be limited to Windows Phone and niche, domain areas like healthcare of graphics related applications rather than a regular LOB app.
As it seems right now, as of summer 2011, the future might look fragmented with more opportunities for pure web technologies (HTML5, JS and CSS) as opposed to a plugin and OS-specific UI technology.
I would start by learning XAML, by reading a few tutorials and playing around with XAMLPad. This will give you a feel for the basics before actually building an app.
I would start with WPF and doing very simple control familiarizaton samples. You goal should be to learn XAML and Binding. So if you just create some basic WPF window apps will bootstrap your learning speed. Then eventually you can move to silverlight. Yeah as other mentioned here Silverlight is a subset of WPF.
Well, it depends on what you are going to be working on. If you are working on client/server, then I would go with WPF. If you are working in an environment where you can guarantee that .Net is installed on all of the machines, then I would go with WPF as well, because you can use what is called an XBAP, which is a WPF application that is run through the browser.
It's really up to you. However, I would state that silverlight is not RTM yet, and WPF is. WPF has a lot of books out on the subject, where silverlight does not. It may be easier to get the whole Zen of WPF by reading a few of those books, and then dive into which ever one you would like to play with.
Just keep in mind that silverlight has a subset of the controls of WPF, a paired down .Net framework, and does not do synchronous calls. As long as you know that up front, you can start learned the core of the whole foundation and tailor your practical experience later on to whichever technology is best for you.
Some tips at Getting started with Silverlight Development