我可以使用没有ASP.NET核心的MVC吗? [英] Can I use MVC without ASP.NET core?

查看:60
本文介绍了我可以使用没有ASP.NET核心的MVC吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开设一个新网站。它不是,也绝不可能是一个使用频繁的网站。我想最多数十个用户。我有很多C#经验,并希望留在Visual Studio的舒适世界中进行开发。



我过去使用过WebForms但是没有'继续吧。我发现了整个想法,试图抽象网络的真实机制,使其更像是一个桌面应用程序,成为一个障碍,而不是一个帮助。



我我真的很喜欢HTML5 + CSS3 + MVC Core,但我刚刚发现我的托管服务提供商(我不愿意离开)现在不支持ASP.NET Core。



所以,这是我的问题......(在这里我道歉,如果这有点'模糊'。我很难看到无数的微软技术如何融合在一起 - 或者不这样做。)



我可以做一些像Razor页面那样不涉及WebForms的东西吗?我是否可以在95%的网站上使用静态HTML5 + CSS3,但在需要时以某种方式访问​​C#后端?理想情况下,我想在没有WebForms ViewState方法的所有开销的情况下这样做。



如果我没有多大意义,很抱歉。任何建议或指向解释所有这些东西的文章将非常受欢迎。我不介意买一本好书,带我了解我最终采取的任何方法的细节。



亲切的愿望 - Patrick



我尝试了什么:



很多互联网阅读但我不是更聪明。

I am starting a new website. It is not, and is never likely to be, a heavily used site. I imagine tens of users at most. I have a lot of C# experience and would like to stay inside the cosy world of Visual Studio for my development.

I've used WebForms in the past but didn't get on with it. I found the whole idea of trying to abstract the real mechanics of the web so that it worked more like a desktop application to be a hindrance, not a help.

I am really attracted to HTML5 + CSS3 + MVC Core, but I have just discovered my hosting provider (whom I am reluctant to leave) doesn't support ASP.NET Core right now.

So, here's my question... (And here I apologise if this becomes a bit 'fuzzy'. I'm struggling to see how the myriad of Microsoft technologies fit together - or don't.)

Can I do something a bit like Razor pages that does not involve WebForms? Can I use static HTML5 + CSS3 for 95% of the site but somehow access a C# back-end when I need to? Ideally, I'd like to do this without all the overhead of the WebForms ViewState palaver.

Sorry if I am not making much sense. Any suggestions or pointers to articles that explain all this stuff would be extremely welcome. And I wouldn't mind getting a good book that takes me through the details of whatever approach I end up taking.

Kind wishes - Patrick

What I have tried:

Lots of internet reading but I am none the wiser.

推荐答案

是的, MVC 只是一种几乎可以应用于任何事物的模式,例如:

< a href =https://www.geeksforgeeks.org/mvc-design-pattern/> MVC设计模式 - GeeksforGeeks [ ^ ]

设计模式MVC模式 [ ^ ]

模型 - 视图 - 控制呃(MVC)模式与C#/ WinForms [ ^ ]

了解模型 - 视图 - 控制器 [ ^ ]
Yes, MVC is just a pattern that can be applied to almost anything, some examples:
MVC Design Pattern - GeeksforGeeks[^]
Design Patterns MVC Pattern[^]
The Model-View-Controller(MVC) Pattern with C#/WinForms[^]
Understanding Model-View-Controller[^]


.NET Framework 4.6完全支持ASP.NET MVC



ASP.NET MVC和MVC之间的主要区别核心是后者是多平台,可能运行速度提高了1000倍。

但API,用法和输出非常相似。
.NET Framework 4.6 fully support ASP.NET MVC

The main difference between ASP.NET MVC and MVC Core is that the later is multiplatform and probably runs 1000x faster.
But the API, usage and output is very similar.


这篇关于我可以使用没有ASP.NET核心的MVC吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆