Can SilverLight Replace ASP.net
i am new to web development and i am learning Asp.net . i was the other day thinking and i came up with this question . i searched the web but all the answers i found were old
so my question is , can 开发者_JS百科silverlight4 replace Asp.net ??
I know this question sounds crazy . but let's think for moment we use ASP.net to talk to a server.to Create files there ,to talk to a database etc.... SilverLight can do the same thing ,right?
OK,you might say that if I built a web site using SilverLight then not all users out there can access it. but apparently SilverLight supports IE,FireFox Safari and googleChrome so i guess this isn't an issue anymore .
so what do you think ,can silverlight replace asp.net?
Probably not, that would be like flash replacing php, won't happen as silverlight is more for graphic appeal and not as quick for loading, which today is very important, because if I have to wait more than 5 seconds to view something, I will probably just hit back and try another page.
No, Silverlight can't communicate with the resources on the server like ASP.NET can. Silverlight runs on the client while ASP.NET runs on the server. To have a web page that interacts with the server you still need a platform with access to the resources on the server that the interface can talk to.
The question is rather if Silverlight can replace HTML as user interface. HTML might be replaced by something else in the future, but that won't be for some time yet. Silverlight might not even be around any more if/when that happens.
The actual answer is: Silverlight CAN replace Asp.net, but it won't. It's like saying: Trucks/buses can replace cars, but they won't. They all serve a different purpose.
They will both thrive in their own area
These two technologies are to live side-by-side happily ever after. They're intended for different purposes and they will most probably stay that way. Things that will change/shape them are browsers. With the upcoming HTML5 even Microsoft admits that Silverlight may not survive.
Also take into consideration SEO and content indexing. Silverlight content isn't really indexed as far as I know. So wasn't flash which is indexed nowadays. Silverlight may get to the same point as well, but indexing such dynamic content is much more difficult for search providers.
My opinion is that Silverlight will thrive in very rich web-connected client (or web client) application development as in line-of-business applications and other interfaces that need high user interactivity and complex presentation.
Silverlight is much much better suited for these purposes than Asp.net is. Give or take Ajax in Asp.net. HTML5 will make things a bit better, but it's still just HTML. So don't expect whole websites running as Silverlight applications (think of web-connected games, video/image editing/manipulation solutions, online casinos, user controlled animated content etc.) That's Silverlight. Imagine doing the same using HTML. That'd be a challenge!
Microsft (my personal opinion) made a very bad job evangelising Silverlight, because they tried to make it en-par with Flash video players and such. Try asking developers of what comes to their mind when someone mentions Silverlight. A lot of them don't really understand what's it for. And that is Microsoft's mistake for not making it very clear on this.
Also Silverlight is running in the Browser, while ASP.Net is running on the Server, Flash and PHP are a realy good analogy. So if you have to work on the server you can't take Silverlight. If you want good graphics and interactivity (without Ajax and JS) you'll have to take Silverlight.
SEO is still a significant problem for Silverlight. The solutions usually revolve around using an ASP.Net site as well to provide indexable information for search engines.
You now have the option of using/sharing RIA services with both Silverlight and ASP.Net, so I see it continuing as more a collaboration rather than replacing ASP.Net any time soon.
If you try most showcase apps on Silverlight.Net, most are slow to load and slow to run, so there is also a need for Silverlight developers to take usability seriously and start implementing incremental downloads (via Prism, MEF or other).
can silverlight replace asp.net?
Yes.
But you need to temper that answer with this: replacing ASP.NET with Silverlight is not always the best solution. They have different positives and negatives.
If you want to build a graphically rich UI that is web oriented (i.e. uses WCF to source its data or communicate with service providers) then Silverlight can be your answer. If you want a straight forward web site (as opposed to a web app) then ASP.NET is definately the better choice of the two. It can be used for complex web apps as well, but it takes a lot of hard work (i've built several of these, and it can be very tricky especially if you want a lot of user interaction, data refreshes, etc). If you are going to use ASP.NET then you will want to also use a third party library such as jQuery to assist with UI interaction and communicating with the server.
精彩评论