ASP.NET MVC 让我想起了旧的经典 ASP 意大利面条式代码 [英] ASP.NET MVC reminds me of old Classic ASP spaghetti code

查看:9
本文介绍了ASP.NET MVC 让我想起了旧的经典 ASP 意大利面条式代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在查看此站点一段时间后,我刚刚浏览了一些 MVC 教程.只是我,还是 MVC 视图页面带回了经典 ASP 意大利面条式代码的可怕闪回,所有跳入和跳出 HTML 和 ASP.NET 以及随处可见的黄色分隔符使得无法阅读?代码/设计分离的重要性发生了什么变化?在教程出现在查看页面开发"部分之前,我真的很喜欢这项新技术.

I just went through some MVC tutorials after checking this site out for a while. Is it just me, or does MVC View pages bring back HORRIBLE flashbacks of Classic ASP spaghetti code with all the jumping in and out of HTML and ASP.NET with yellow delimiters everywhere making it impossible to read? What ever happened to the importance of code/design separation?? I was really sold on the new technology until the tutorials hit the View page development section.

还是我遗漏了什么?(并且不要说您可以使用模板来提供帮助,因为它只是将意大利面移到另一个位置 - 将其扫到地毯下 - 它不能解决问题)

Or am I missing something? (And don't say you can use the template to help because it's jsut moving the spaghetti to another location - sweeps it under the rug - it doesn't fix the problem)

推荐答案

参见 Jeff 的帖子 (http://www.codinghorror.com/blog/archives/001155.html) 回应了您的问题,以及 Rob Conery 的回应 (http://blog.wekeroad.com/blog/asp-net-mvc-avoiding-tag-soup/)

see Jeff's post (http://www.codinghorror.com/blog/archives/001155.html) which echoes your question, and Rob Conery's response (http://blog.wekeroad.com/blog/asp-net-mvc-avoiding-tag-soup/)

总而言之,ASP.NET MVC 为开发人员提供了一个选择,让他们自己动手,尽管这样做当然是可能的.因此,它适用于熟悉 Web 开发并拥有简洁风格的开发人员,但它不适合希望像 winforms 那样的 Widgetized 行为而不必深入研究标记的开发人员.

In summary, ASP.NET MVC gives developers the choice of shooting themselves in the foot, although it's certainly possible to do it cleanly. As such, it is suited for developers who are comfortable with web development and have a clean style, but it is not for the developers who want Widgetized behavior a la winforms without having to delve too deeply into the markup.

这篇关于ASP.NET MVC 让我想起了旧的经典 ASP 意大利面条式代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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