ASP.NET MVC加的Silverlight [英] ASP.NET MVC plus Silverlight

查看:104
本文介绍了ASP.NET MVC加的Silverlight的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我看来,对于具有深度和能力的广度结构化的开发,ASP.NET MVC和Silverlight必须做出具有超强UI的粒度一个不错的强大的框架的潜力,降低AJAX曝光。有任何您是否尝试过在心中建立这样一个堆栈未来耐久性?

It seems to me that, for structured development with both depth and breadth of capability, ASP.NET MVC and Silverlight have the potential to make a nice powerful framework with superior UI granularity and reduced AJAX exposure. Have any of you tried building such a stack with future durability in mind?

推荐答案

我已经建立了与SL和MVC一个小的测试应用程序。它没有工作那么好,但我不认为我在做正确的。我使用的观点,但SL缓慢切换页面,因为它的加载新的SL实例,所有的时间尝试。我试过一个单一的应用程序SL这意味着它包含了所有的控制code以及但是遇事推诿服务器对数据的访问,只需要一些WCF / Web服务code没有必要MVC那里。

I've built a little test app with SL and MVC. It didn't work that well but I don't think I was doing right. I've tried using SL in views but its slow to switch pages since its loading new SL instances all the time. I've tried a single SL app which meant it contained all the control code as well but that relegates the server to data access which only needs some WCF/Web service code no need for MVC there.

这可能更好地工作,如果我们与那里是许多视图页面的想法免除。在我的下一次迭代,我将使用的控制器与XML或JSON直接从包含意见的Silverlight应用程序的请求。但是这种方法仍然会留下一些悬而未决的问题,例如,如何控制器得到有什么看法实际显示有发言权?

It may work better if we dispense with the idea of there being many view pages. In my next iteration I shall be using controllers to respond with XML or JSON directly to requests from a Silverlight app which contains the views. However this approach would still leave some questions unanswered, for example, how does the controller get to have a say in what view is actually displayed?

说实话,我越来越觉得SL到ASP.NET MVC的尚未被塑造为一个很好的匹配。有些网络应用程序有可能从某些元素SL受益(图表为例),但应用在HTML中牢牢保持。在另一方面,应用程序的用户界面是纯粹SL(同时内部使用一些类似的视图/控制器的概念)并不真正需要MVC在服务器端。

To be honest, I'm getting the feeling that SL to ASP.NET-MVC are yet shaping up as a good match. Some web apps may benefit from some SL elements (charting for example) yet the app remain firmly in HTML. On the other hand, an app whose UI is purely in SL (whilst internally using some similar View/Controller concept) doesn't really need MVC on the server-side.

它的初期,将采取同时我们尝鲜,看看有什么真正的作品,哪些没有。那里是3版本更从MS进来的方式SL可以访问服务器端数据还可以改变的事情一个测试版。

Its early days, it will take while for us early adopters to see what really works and what doesn't. There being a beta for version 3 with more coming from MS in the way SL can access serverside data may change things further.

这篇关于ASP.NET MVC加的Silverlight的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆