Silverlight:访问企业数据的最佳实践
我开始为我公司的一个新项目整理系统架构文档。 基本上,我们有一个相当大的业务层,遵循企业库数据模式,我需要从新的 silverlight 应用程序访问这些数据对象。
我的问题是在 silverlight 中访问这些对象的最佳方式是什么? 我最初的想法是使用 WCF,但我不确定如何最好地重建客户端中的对象。
I am starting to put together a system architecture document for a new project at my company. Basically we have a rather large business layer that follows the enterprise library data pattern, and i will need to access these data objects from a new silverlight application.
My question is what is the best way to gain access to these objects in silverlight? My initial idea is using WCF, but i am unsure of how to best to reconstruct the objects in the client.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
新的 .net 标准是 WCF(代号 indigo)
性能
您可以选择几种传输协议:tcp(最快)、http、https,具体取决于您的安全/消息加密级别。 (还有更多,netpipe 等)
我的典型端点/服务布局
在我的项目中,我的服务的每个版本都有一个端点,因此如果它的版本为1,那么我会以http://localhost:8080/YourEnterpriseName/Project/Version1/
我还发现响应/请求方法是最好的请求方式数据,其中您需要对服务器进行的每次调用都有 2 个类(一个请求,一个响应)。 (使用已知类型,我稍后会告诉您)
还有 Shawn Wildermuth 和 Shawn Wildermuth 。 米格尔·卡斯特罗 (Miguel Castro) 在 dnrtv 上制作播客
http://www.dnrtv.com/default.aspx?showNum=127 关于 Silverlight 数据
http://www.dnrtv.com/default.aspx?showNum=122 关于极限 WCF
The new .net standard is WCF (codename indigo)
for performance
You have the choice of a few transport protocols tcp (being the fastest), http, https, depending on your security/message encryption level. (there are a few more as well, netpipe's, etc)
my typical endpoint/service layout
with my projects, i have one endpoint for each version of the service, so if its version 1 then i end it with http://localhost:8080/YourEnterpriseName/Project/Version1/
I have also found that the response/request method is the best way of requesting data where you have a 2 classes (one request, one response) for every call you would need to make to the server. (using knowntype, i ca fill you in later)
Also Shawn Wildermuth & Miguel Castro have done podcasts on dnrtv
http://www.dnrtv.com/default.aspx?showNum=127 on Silverlight Data
http://www.dnrtv.com/default.aspx?showNum=122 on Extreme WCF
看看这本书,Silverlight 2 的数据驱动服务。 我发现这是解决这个问题的最佳资源。 我所做的是创建一个轻量级 WCF 层,该层从现有 DAL 检索对象,然后将这些对象传递回客户端。
Check out this book, Data-Driven Services with Silverlight 2. I found this to be the best resource for figuring this out. What I did was create a lightweight WCF layer that retrieves objects from an existing DAL and then passes those objects back to the client.