Asp.Net Web窗体和Asp.Net网页 [英] Asp.Net Web Forms and Asp.Net Web Pages

查看:257
本文介绍了Asp.Net Web窗体和Asp.Net网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Asp.Net Web窗体和Asp.Net网页?

What is the difference between Asp.Net Web Forms and Asp.Net Web Pages?

这里的它说,网页和Web Forms不同的方法。

Here it says that Web Pages and Web Forms different approaches.

推荐答案

有ASP.NET的3味道

There are 3 flavors of ASP.NET

第一个是历史最悠久,被称为Web窗体。基本上它是一个高层次面向组件的Web框架,与这样的封装行为和视图按钮和网格控制工作。这是ASP.NET最流行的味道,但被批评为缺乏对生成的标记控制。目前,大多数新项目ASP.NET MVC,但肯定是有很多的Web窗体在那里。虽然这是我个人最喜欢的,我必须指出,这是一个糟糕的方​​式开始学习网络编程,因为它隐藏你的实现细节(当你有经验,这是好的),是一个有点复杂,学习。

The first one is the oldest and is called Web Forms. Basically it is a high level component oriented web framework that works with controls like buttons and grids that encapsulate behaviour and view. It was the most popular flavor of ASP.NET but has been criticised for the lack of control over the generated markup. Currently most new projects are ASP.NET MVC but there is definitely a lot of Web Forms out there. While this is my personal favorite I must point out that it is a bad way to start learning web programming because it hides the implementation details from you (which is good when you have experience) and is a bit complex to learn.

来源: http://www.asp.net/web-forms

ASP.NET MVC是MVC模式的ASP.NET的实现。有些人声称,这是更容易开发维护应用程序的单元测试和关注良好的分离使用此框架比它与Web窗体。我不同意这一点,认为使用模式,如MVP可以达到相同的Web窗体。在另一方面ASP.NET MVC有一个很大的优势 - 它可以完全控制生成的标记。这是web开发的,其中的很多东西都控制支持JavaScript的现代风格非常重要。例如添加花哨的动画更容易做一个MVC视图的顶部比它在Web窗体顶部。

ASP.NET MVC is an implementation of the MVC pattern for ASP.NET. Some people claim that it is easier to develop maintainable applications with unit tests and good separation of concerns with this framework than it is with Web Forms. I disagree on this point and think that using patterns like MVP one can achieve the same with Web Forms. On the other hand ASP.NET MVC has one big advantage - it allows full control over the generated markup. This is very important for the modern style of web development where a lot of things are controlled with JavaScript. For example adding a fancy animation is easier to do on top of an MVC view than it is on top of a Web Form.

来源: http://www.asp.net/mvc

ASP.NET网页是(目前)最新的是针对较小的项目和初级开发者(至少在我看来)的味道。这是良好的用〜10页开发较小的项目。大部分的逻辑都写在我所说的基本PHP风格每页一个文件。它使用剃刀语法注入服务器端code。

ASP.NET Web Pages is a (currently) the latest flavor that is targeted at smaller project and beginner devs (at least in my opinion). It is good for developing smaller projects with ~ 10 pages. Most of the logic is written in a single file per page in what I call "Basic PHP style". It uses the Razor syntax for injecting the serverside code.

来源: http://www.asp.net/web-pages

需要注意的是Web窗体使用网页(不同于MVC),因此有一个什么样的混乱ASP.NET网页是

Note that Web Forms uses pages (unlike MVC) therefore there is a confusion what ASP.NET Web Pages is

这篇关于Asp.Net Web窗体和Asp.Net网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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