如何使用 Silverlight 作为 .Net 程序集/代码的表示层?
我们的应用程序中有以下层,所有层都构建在 .Net 2.0
- 对象库上[在所有层中使用]
- Win Form 客户端
- Asp.Net Web 服务
- 业务逻辑库
- 数据库访问层
- 数据库
继续获得 Silver 的最佳方式是什么轻作为另一个表示层。我想我可以通过引用 Silverlight 应用程序中的对象库并调用 Web 服务来添加新的 Silverlight 层。但似乎这是不可能的。请参阅 CLR 团队博客。
有什么建筑见解吗?
谢谢。
We have following layers in our app all layers are built on .Net 2.0
- Object library[ used across all layers]
- Win Form client
- Asp.Net web service
- Business Logic library
- Database Access Layer
- Database
What would be the best way to move forward to have Silver Light as another presentation layer. I thought I could just add new Silverlight layer by referencing Object library in Silverlight app and calling web service . But seems like its not possible. Refer CLR Team Blog.
Any architectural insights?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您想要重用代码时,您基本上有三个选择:
通常将所有基本类库创建为 Silverlight 类库项目,因为它是具有最低功能集的框架。丢弃除 mscorlib.dll、System.dll 和 System.Core.dll 之外的所有引用。然后,您可以在任何完整的 .NET 项目中链接此类 Silverlight 库。
您可以使用“添加为链接”功能链接另一个项目中的单个代码文件(右键单击项目 -> 添加现有项目 -> 将“添加”按钮更改为“添加为链接” ”)。这样您就可以创建 Silverlight 项目并链接完整 .NET 项目中的各个文件。但是,如果您有很多文件并且经常在源项目中添加/删除文件和文件夹,这可能会变得乏味。
要解决此问题,您可以查看项目链接器:http:// /msdn.microsoft.com/en-us/library/dd458870.aspx ...但我自己还没有尝试过。
When you want to reuse code, you have basically three options:
Generally create all your basic class libraries as a Silverlight class library project, because it is the framework with the lowest set of features. Throw all references out except for mscorlib.dll, System.dll and System.Core.dll. You can then link such kind of Silverlight library in any full .NET project.
You can link individual code files from another project with the "Add as link" feature (Right click project -> Add Existing Item -> Change "Add" Button to "Add as link"). That way you can create a Silverlight project and link individual files from your full .NET project. However that can get tedious if you have a lot of files and you often add/remove files and folders in your source project.
To cure this problem, you may check out the Project Linker at http://msdn.microsoft.com/en-us/library/dd458870.aspx ... but I haven't tried it myself yet.