Silverlight .NET RIA 项目结构
我正在启动一个新的 Silverlight 3 RIA 应用程序。 从历史上看,在进行网络开发时,我有一个具有以下项目结构的解决方案。
Core - Generic and misc stuff.
Model - Domain model in nHibernate
Services - Business logic, services and repositories
Web - Web using MVC
对于我在 Silverlight RIA 中的新项目,它默认创建 Silverlight 客户端和 Web 项目。 Silverlight 项目似乎映射到 Web 项目,而 Web 映射到服务和应用程序。 模型。 人们通常是这样设置 Silverlight RIA 项目的,或者您是如何做到的?
I am starting a new Silverlight 3 RIA application. Historically when doing my web development I have a solution with the following project structure.
Core - Generic and misc stuff.
Model - Domain model in nHibernate
Services - Business logic, services and repositories
Web - Web using MVC
With my new project in Silverlight RIA it by default creates the Silverlight client and Web projects. The Silverlight project seems to map to the Web project and Web maps to Services & Model. Is this how people normally set up their Silverlight RIA projects, or how do you do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下是我通常为简单解决方案执行的操作:
步骤 1:创建 Web 项目 - 可以是简单的 Web 应用程序,也可以是 MVC Web 应用程序。
步骤 2:创建 SL 应用程序,并将其链接到 Web 项目以进行部署和 .NET RIA 服务链接。
对于更复杂的项目,我有:
步骤 1:创建一个类库来表示我的 DAL 和实体类型
步骤 2、3:上面的 #1 和 #2。
如果有意义的话,我可能会将域服务和应用程序逻辑拆分到一个单独的项目中,或者将其放入 DAL 程序集中。 取决于预期的重用场景......而不是硬性/固定的规则。
Here's what I typically do for simple solutions:
Step 1: Create Web project - either a simple web app, or an MVC web app.
Step 2: Create an SL app, and link it to the Web project for deployment and for the .NET RIA Services link.
For a more complex project, I have:
Step 1: Create a class library for representing my DAL, and entity types
Step 2, 3: #1 and #2 from above.
Potentially if it makes sense, I'd split out the domain services and app logic into a separate project, or put it into the DAL assembly. Depends on what are the intended reuse scenarios... rather than hard/fixed rules.