维护 .NET Web 应用程序

发布于 2024-10-08 14:33:07 字数 301 浏览 0 评论 0原文

我正在考虑在我的下一个 Web 应用程序中使用 .NET MVC,但要求之一是客户端(将维护该网站)涉及的工作量应该最少。

他们习惯了简单的 HTML 网站,为了进行微小的更改,他们所要做的就是在记事本中修改 html 并上传它。

.NET Web 应用程序的哪些部分需要编译?难道只是其中的.cs部分吗?
可以通过用记事本等修改文件来自由更新其余部分吗?
另外,在MVC环境中,编译文件中是否有更多与视图相关的代码?

在客户将在交付时接管站点(并且对需要安装 VS 和需要编译不感兴趣!)的情况下,通常如何进行这种维护?

I am considering using .NET MVC for my next web app but one of the requirements is that there should be minimum work involved from the clients side (who will be maintaining the site).

They are used to simple HTML sites where all they have to do in order to make a minor change is to modify an html in notepad and upload it.

What parts of an .NET web app needs to be compiled? Is it only the .cs parts of it?
Can all the rest be updated freely by modifying files with e.g. notepad?
Also, in an MVC environment, is more of the view related code in compiled files?

How is this kind of maintenance usually done in such cases where the client will take over the site on delivery (and are not interested in needing VS installed and needing to compile!)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

倾其所爱 2024-10-15 14:33:07

如果您确实需要一个 Web 应用程序,那么为了对“应用程序”部分进行更改,它们将需要能够重新编译。

如果他们要进行视觉上的更改,那么您最好的选择是为他们提供一种编辑网站 HTML 的方法。您可以更改 ASP.NET MVC 中的视图(.aspx 文件),而无需重新编译。如果您对控制器或模型进行更改,则必须重新编译。

If you really need a web application, then in order to make changes to the 'application' part, they're going to need to be able to recompile.

If they're going to make visual changes, then your best bet is to provide a method for them to edit the HTML of the site. You can make changes to the views (.aspx files) in ASP.NET MVC without having to recompile. If you make changes to your controllers or your Model, then you'll have to recompile.

自由如风 2024-10-15 14:33:07

如果这是您的客户的主要要求,您可以使用 ASP.Net Web 窗体而不是 ASP.NET MVC 构建网站,在这种情况下,对 .cs 文件的更改将在首次访问页面时即时编译。请注意,这仅适用于 Web 窗体项目中的 .cs 文件。引用的程序集中的任何 .cs 文件都需要预编译。

也就是说,我怀疑您的客户主要对修改页面的外观/感觉/内容感兴趣,因此他们可能会满意地修改 Web 表单或 MVC 应用程序中的 .aspx 文件。
如果他们有预算,听起来最好的解决方案是构建内容管理系统,这样他们就不必再次编辑文件。

If this is a major requirement for your client, you can build the site using ASP.Net Web Forms instead of ASP.NET MVC in which case changes to the .cs files will be compiled on the fly when the page is first accessed. Note that this only applies to the .cs files in your Web Forms project. Any .cs files in referenced assemblies will need to be pre-compiled.

That said, I suspect your client is primarily interested in modifying the look/feel/content of a page, so they would probably be satisfied modifying the .aspx files in either a Web Forms or MVC app.
If they have the budget for it, sounds like the best solution is to build a Content Management System, so they don't have to edit files ever again.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文