简体   繁体   English

适用于新服务器端脚本程序的Microsoft mvc3或ASP.NET网页?

[英]Microsoft mvc3 or ASP.NET Web pages for a new server-side scripter?

I have experience in javascript, html(Bronze certified), css(Gold certified), sql and xml(Bronze certified), and now have turned my attention towards server side scripting. 我在javascript,html(铜牌认证),css(金牌认证),sql和xml(铜牌认证)方面都有经验,现在我将注意力转向服务器端脚本。 I have little experience in php but have no Idea what to choose between MVC and ASP.NET Web Pages. 我在php方面经验很少,但不知道在MVC和ASP.NET网页之间选择什么。 I like all the features that ASP.NET Web Pages(Since I already new a little about server side scripting, so getting started was not that difficult and I know a few basic things.) have like, automatic form authentication among others but I seriously doubt that it can never be by-passed. 我喜欢ASP.NET Web Pages的所有功能(因为我已经对服务器端脚本有了一些新知识,因此上手并不难,我知道一些基本知识。)具有自动表单身份验证等功能,但我很认真怀疑它永远不会被绕过。 Still, for safety I use my own algorithms against sql-injection and javascript codes. 不过,为了安全起见,我使用自己的算法来处理sql-injection和javascript代码。 But, now I am confused what to learn, MVC or ASP.NET Web Pages. 但是,现在我对要学习的东西,MVC或ASP.NET网页感到困惑。 All the posts I searched on internet where for new programmers. 我在互联网上搜索所有新程序员的所有帖子。 Since I am not new they are no use to me. 由于我不是新手,所以对我毫无用处。 So what should I learn MVC OR ASP.NET Web Pages and why? 那么我应该学什么MVC或ASP.NET网页,为什么呢?

*English is not my native language, there may be some grammatical mistakes. *英语不是我的母语,可能存在一些语法错误。

You are kind of asking what's the better option, apples or bananas. 您是在问哪种更好的选择,苹果还是香蕉。 MVC is a pattern and allows you greater control over what HTML is sent to the browser whereas Web Forms has a great number of pre-made controls that do all the hard work rendering out html to the browser (but often less control of how it is rendered out) MVC是一种模式,可让您更好地控制将HTML发送到浏览器的方式,而Web Forms具有大量的预制控件,这些控件可以完成将HTML呈现给浏览器的所有艰苦工作(但通常很少控制HTML的方式)呈现)

It's also down to preferences, I personally prefer MVC as the unit testing and component nature of it give me great flexibility. 这也取决于偏好,我个人更喜欢MVC,因为MVC的单元测试和组件性质为我提供了极大的灵活性。 Alternatively, using WebForms you can create some things quickly using drag and drop controls. 另外,使用WebForms可以使用拖放控件快速创建一些东西。

Hope that gives you a bit of useful info. 希望能给您一些有用的信息。 I'd recommend reading up about both, and seeing which fits into your style of programming and go from there, but there's nothing stopping you learning and using both (just don't use them in the same project, lol) 我建议您阅读两者,并从中了解哪种适合您的编程风格,但是并没有阻止您学习和使用两者的方法(只是不要在同一个项目中使用它们,大声笑)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM