web应用程序的最佳实践

web应用程序的最佳实践

本文介绍了多个asp.net web应用程序的最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有在一个ASP.NET网站或解决方案多个Web应用程序时,寻找最佳做法。我有几个选项,我玩弄:

  1. 将所有的应用程序和网站主到一个解决方案/一个Web应用程序的老友们

  2. 我的老板担心有30'应用'是所有下VS每次都在同一个项目,我们做出改变一个必须部署到所有。所以这让我们想打破每到同一个解决方案下的一个单独的项目。这使我们不得不考虑主网页解决方案

    • 在母版页需要支持动态菜单结构。这一点是我可以用一个SITEMASTER吗?是否VirtualProvider为此提供正确的解决方案?任何人有任何好的教程?
  3. 创建用户控件为每个应用程序,并引用它在主应用程序

解决方案

我问了两个类似的问题在这里:

跨项目主页

最好的办法是单独的项目在一个单一的解决方案,使用的NuGet包,以同步常见的器物,包括母版页。眼下,这是工作的罚款在22项目解决方案我的工作。您还可以存储的NuGet包本身的源代码控制。

更新:

您可以使用一个XML文件,你的菜单和的NuGet分享出来。可能添加的jQuery的滑动效果等。

Looking for the best practice when having multiple web applications within one ASP.NET "site" or "solution". I have a few options I am toying with:

  1. old faithful of putting all applications and Site master into one Solution / one web application

  2. My boss is worried about having 30 'applications' that are all under the same project in VS and every time we make a change to one have to deploy to all. So this makes us want to break out each into a separate project under the same solution. This makes us have to look into Master page solutions

    • Master page needs to support dynamic menu structure. Is this something that I can do with a single SiteMaster? Does VirtualProvider provide the right solution for this? Anyone have any good tutorials on it?
  3. Creating a UserControl for each application and reference it in the main application

解决方案

I asked two similar questions here:

Cross-Project Master Page

Best bet is separate projects under a single solution and use Nuget package to synch up the common artifacts, including master pages. Right now this is working fine on a 22 project solution I'm working on. You can also store the Nuget package itself in source control.

Update:

You could use an XML file for your menu and share it out with Nuget. Possibly add jQuery for a sliding effect, etc.

这篇关于多个asp.net web应用程序的最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 07:54