silverlight ajax调用,AJAX, XBAP, Silverlight

博客讨论了在不同技术间做选择的问题,包括AJAX、Silverlight和XBAP,考虑因素涉及部署便捷性、高延迟性能、客户端-服务器交互、稳定性和平台兼容性。作者指出,Silverlight在性能和功能上优于AJAX,特别是对于Windows用户,但需要较大的初始下载量。XBAP则提供了与浏览器的集成和更新便利性,但需要用户信任证书且仅限Windows。Silverlight2.0的发布带来了更多控件和跨平台能力,可能是C#和Web开发者的好选择。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

AJAX, XBAP, Silverlight

01/08/2008

3 分钟可看完

本文内容

Ramblings (in response to a question)…

I would have to know a lot more about his requirements before making a recommendation. In particular – what are the skill sets of his existing resources?

I’m guessing the primary things you are looking for are ease of deployment for first-time use as subsequent updates. Performance over high latency. Resiliency – say when your internet connection goes down. Client-server transactions. Etc..

· High performance over high latency networks comes from asynchronous transactions and transferring as little data as possible per transaction. Compression and other factors also come into play.

· Optimum resiliency/stability typically translates to a form of local storage. If you are able to queue transactions locally and securely - you can re-try in the event that the network is down – otherwise your transaction data may be lost.

For us – those two factors eliminated asp.net / ajax. Secure local storage isn’t an option. And - even with maximum caching enabled – in a sizable application most transactions still contain UI rendering information in addition to the data – eg html – that has to be downloaded to the client (browser). Also Silverlight’s or XBAP’s use of the CLR is much faster than the browser’s javascript engine (by about 42%).

Let’s start with XBAP… XBAP (or Xml Browser Application) really just refers to a standard WPF application deployed via clickonce over the internet – and hosted within the browser. Clickonce, of course, allows for incremental updates – so most of the time you don’t need to re-download your presentation layer.

I’ve seen blogs and info stating a variety of limitations inherent in XBAP such as calling web services, opening new windows, talking to the registry and/or local files… but from our experience I know all of those things are possible with an XBAP. Those are not limitations inherent in the technology. So long as your XBAP application and deployment manifests are signed with a certificate that resides in your Trusted Root certificates then you can do pretty much anything with an XBAP application. If you don’t need that much power – you can still write files to isolated storage and go with a less trusted cert – giving you the resiliency.

The cons of using xbap vs. silverlight is that you require the end user to trust your certificate (typically a prompt) and – the big “and” – they have to be on the windows operating system and download the prerequisite version of .NET 3.0 (or greater). The bootstrapper is only around 2.5mb – but the entire framework is around 50mb! Imagine how long that takes to install with 300ms latency. Once they have that installed – as your application advances be prepared for upgrades (3.5, etc).

Silverlight provides capabilities to use Web Services, Isolated Storage and other features but with a small under 5mb initial download, cross-platform capabilities and most of the core features that come in the WPF libraries – hence the name “WPF/e”.

Depending on your resources - if they are C# / web developers – then Silverlight may be the best option for you. Silverlight 2.0 due out this month - is releasing a whole bunch of new controls – mirroring all the standard control in the WPF library. (eg textbox, combobox, etc) – making development in visual studio fairly easy. It isn’t just a “flash” replacement anymore. When *matured* – it’s a substantial new technology.

I’m currently investigating Silverlight 2.0 for migration of our xbap/clickonce WPF application to Silverlight 2.0.

- Rob.

_____________________________________________________________

Hi Rob,

One of my friend has the following requirement,

· Thin client

· Real time update of data from server to client (Since server push is not possible, he is thinking of AJAX. There are commercial frameworks like COMET available that gives the server push which he will not be using )

· Performance (Stability and responsiveness are preferred over jazzy look and feel – say 3d transformations)

He is looking at the following options:

· ASP.net + AJAX

· MS Silverlight

· XBAP

· Smartclients with CAB framework

Each has its own advantages and disadvantages. It is hard to decide as he does not have visibility into the roadmap for some of these options. Can you suggest something on this?

In fact “Adobe Flex” supports all these requirements except the fact that integration with .net framework is not available. So he had to drop the idea of using Flex!!!!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值