由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - 新手提问:如何理解MVC中的前端(Frontend)和后端(backend)?
相关主题
A question about MVCAnswer Re: ASP.NET 难题测试 (1)
问个MVC3的问题Maverick for dotnet: MVC for web publish
MVC效率高一些,可是大项目也不可以推倒重做呀。ASP.NET IIS6 Hanging problem
.net position in Houston FYI我用asp.net写的网站,各位给提提意见
请推荐一本 .net web site 的入门书How do you like ASP.NET MVC?
感觉MVC比web form好用多了[讨论]Does asp.net start from the wrong foot?
大家谈谈S.O.L.I.D.用在project上的经验教训。 (转载)SilverLight 4 is coming
User control question:Microsoft Launch 2010 Events
相关话题的讨论汇总
话题: side话题: mvc话题: backend话题: server话题: view
进入DotNet版参与讨论
1 (共1页)
w*******7
发帖数: 188
1
MVC中的frontend对应的是client side 吗?
backend对应的是Server Side吗?
在stackoverflow提到了area的概念,是否Admin和Member都是属于backend(server
side)? 而site则是属于frontside (client side)?
http://stackoverflow.com/questions/11923149/asp-mvc-front-end-b
而在有的MVC的书里,又感觉M(MODEL)和C(Controller)是Server side,View则是
Client side,概念很混乱?希望大牛可以指点迷津!!!
s***o
发帖数: 2191
2
"Backend" is the place where you take care of the business logic and
infrastructure including data access, authentication, etc. They are usually
built as separate modules from your mvc Web project. (server side)
The functionalities of the "backend" are usually available through various "
services". (server side)
"Fontend" is more about UI, about how you present information to end users,
e.g., HTML markup (in the "view"s), CSS, JS modules related to the UI logic,
etc. (client side)
Consider a controller as a "gateway". It listens to user input; grab
necessary "model"s through "services" based on the specific user input; then
select the appropriate "view" and dispatch it in client's browser. (server
side, but could be considered as part of the "front end")
In many cases, it's awkward or even impossible to use domain models directly
in your views, the "model" here in MVC is more about view models.
w*******7
发帖数: 188
3
谢谢!很清楚的解释。
u**********a
发帖数: 448
4
Thanks so much.

usually
"
,
logic,
.

【在 s***o 的大作中提到】
: "Backend" is the place where you take care of the business logic and
: infrastructure including data access, authentication, etc. They are usually
: built as separate modules from your mvc Web project. (server side)
: The functionalities of the "backend" are usually available through various "
: services". (server side)
: "Fontend" is more about UI, about how you present information to end users,
: e.g., HTML markup (in the "view"s), CSS, JS modules related to the UI logic,
: etc. (client side)
: Consider a controller as a "gateway". It listens to user input; grab
: necessary "model"s through "services" based on the specific user input; then

H*******g
发帖数: 6997
5
哈哈,楼上的大牛已经解释的灰常好了。
我就多嘴再磨叽几句好啦。
VIEW就是你放HTML, JS, CSS的地方,当然如果你愿意你也可以直接放C# CODE。
MODEL你可以理解成是最底层。CONTROLLER是连接MODEL和VIEW的中间层。现有的教程都
是一个SOLUTION里就放了一个PROJECT,然后这个PROJECT里有M, V, C。实际上是一个
SOLUTION里,你想放多少个PROJECT都可以,每个PROJECT提供不同的功能,然后ADD
REFERENCE.
甚至是你都可以单独写一个PROJECT来放CONTROL,然后再单独写一个PROJECT来放VIEW
。呵呵,随便你怎么整了。
AREA其实没啥特殊的,理解成一种ORGANIZE的方式就好了。
1 (共1页)
进入DotNet版参与讨论
相关主题
Microsoft Launch 2010 Events请推荐一本 .net web site 的入门书
刚看到的有趣观点感觉MVC比web form好用多了
Free Video Training: ASP.NET MVC 3 Features大家谈谈S.O.L.I.D.用在project上的经验教训。 (转载)
Webforms vs. MVCUser control question:
A question about MVCAnswer Re: ASP.NET 难题测试 (1)
问个MVC3的问题Maverick for dotnet: MVC for web publish
MVC效率高一些,可是大项目也不可以推倒重做呀。ASP.NET IIS6 Hanging problem
.net position in Houston FYI我用asp.net写的网站,各位给提提意见
相关话题的讨论汇总
话题: side话题: mvc话题: backend话题: server话题: view