ASP.NET 开发人员多久不使用 Visual Studio 设计模式?
我们正在开发一个 ASP.NET 应用程序。 我们聘请了一家外部 UI 设计公司,并且在很大程度上对他们的工作非常满意。 他们向我们“交付”的是可点击的屏幕——包含 ASPX 文件、图像、母版页等的 Visual Studio 解决方案。这些屏幕未连接到任何数据源。 他们有虚拟数据,以便我们可以看到用户界面是如何工作的。
我们遇到的一个问题是我们的开发人员习惯使用 Visual Studio 设计模式。 当我们从 UI 公司收到的页面进入设计模式时,有时会出现问题。 顾问的开发人员在没有使用设计模式的情况下对这些屏幕进行了编码。
我们假设他们会使用设计模式,但这在合同中没有具体说明。 这是不是太过假设了? 是不是有很多ASP.NET开发工作从来没有经过VS设计模式?
第三方编辑:
建议:回答此问题的人应具体说明哪些内容 他们的 Visual Studio 版本 使用,因为微软废弃了代码 VS2005 中的基础和 早期的设计师,并取代了它 与他们购买时购买的那个 购买了Expression产品。 这 两者完全无关,而新的 其中一个要好得多。 - 约翰 桑德斯
We are developing an ASP.NET application. We retained an outside UI design firm, and for the most part have been very pleased with their work. Their "deliverable" to us was clickable screens -- Visual Studio solutions with ASPX files, images, master pages, etc. The screens were not connected to any data source. They had dummy data so that we could see how the UI worked.
One problem we've run into is that our developers are used to using Visual Studio design mode. The pages we receive from the UI firm have problems sometimes when we pull them up into design mode. The consultant's developers coded these screens without using design mode.
We assumed they'd be using design mode, but this wasn't specified in the contract. Was this too much to assume? Is there a lot of ASP.NET development work that never goes through VS design mode?
Third party edit:
Suggestion: people responding to this question should specify which
version of Visual Studio they're
using, as Microsoft trashed the code
base that was in the VS2005 and
earlier designers, and replaced it
with the one they purchased when they
purchased the Expression products. The
two are totally unrelated, and the new
one is far better. - John
Saunders
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(18)
使用 Visual Studio 的次数越多,对设计模式的依赖就越少。 复杂的用户界面往往会让设计视图看起来很糟糕。
The more and more you work with Visual Studio, the less and less you rely on Design Mode. Complicated UIs tend to make the design view look atrocious.
我(和同行)从不使用设计模式,原因有二:
我在 VS 2003 中学会了不要接触设计模式,因为你的 HTML 是由 VS 管理的。 (虽然从 2008 年起就不再这样了,但一旦被咬过......)
渲染可能需要很长时间。
从工具箱中拖放和手动代码要快得多。
I (and peers) never use Design Mode, for two reasons:
I learnt in VS 2003 not to touch Design Mode because your HTML was managled by VS. (Not anymore though since 2008, but once bitten ...)
It can take ages to render.
Much quicker to drag-drop from toolbox and hand-code.
事实上,我发现确实使用设计器的 ASP.NET 开发人员非常罕见。 众所周知,Visual Studio 设计器不擅长生成干净的标记。
I actually find that ASP.NET developers that do use the designer to be quite rare. The Visual Studio designer is notoriously bad at generating clean markup.
我从不使用设计模式,可能是因为它曾经让我的标记变得非常混乱。 另外我做了很多动态渲染,所以没有意义。 而且我只使用 CSS 进行格式化,我不想让 VS 搞乱。
I never use design mode, probably because it used to mess my markup so much. Plus I do a lot of dynamic rendering, so there is no point. And I use exclusively CSS for formatting, I don't want VS messing around.
由于过去的糟糕经历,许多人从未使用过它。 当使用现代控件时,我发现 VS2008 中的设计模式没有什么问题,这些控件是最新的并且具有良好的设计器支持。
另一方面,由于早期的问题,许多自定义服务器控件没有有良好的设计器支持,因此在设计模式中的用处要小得多,因为早期的设计器代码库已被替换为一个很好的。
Many never use it, because of bad past experiences. I have found little trouble with Design mode in VS2008, when using modern controls, which are up to date and have good designer support.
On the other hand, because of the earlier problems, a lot of custom server controls do not have good designer support, so are much less useful in design mode now that the earlier designer code base has been replaced with a good one.
我几乎从不使用设计模式。 它通常会创建丑陋的 HTML,并称我为肛门,但我真的很喜欢干净的 HTML。 如果这意味着手动编码,那就这样吧。
I almost never use design mode. It typically creates ugly HTML, and call me anal, but I really like to have clean HTML. If that means hand-coding it, so be it.
我更喜欢手动完成,我喜欢控制。
如果我想看结果,F5。
I prefer doing it manually, I like to have control.
If I want to look at the result, F5.
我几乎从不使用设计模式。 对我来说,最大的原因是因为我在记事本中学习了网页设计/开发,所以我习惯(并且舒服)使用代码。 设计模式让我感到不舒服,因为我永远不确定 VS 将在 HTML 等方面做出什么决定。此外,我无法想象开发人员会使用设计模式学习有关 ASP.NET 和 VB/C# 的知识。
我唯一一次使用设计模式是自动配置 GridView 或类似的东西。
I almost never use design mode. For me, the biggest reason is because I learned web design/development in Notepad, so I was used to (and comfortable) working with code. Design mode makes me uncomfortable because I'm never sure exactly what decisions VS will make with regard to HTML, etc. Additionally, I can't imagine that a developer would learn nearly as much about ASP.NET and VB/C# using design mode.
The only time I use design mode is to automatically configure a GridView or something like that like.
设计模式在这里受到了很大的打击,但让我指出它对于学习新控件非常。 当您刚接触 ASP.NET 或正在使用新的控件库时,设计模式是天赐之物,原因有二:
当我第一次学习使用 Telerik 控件时,我非常依赖他们提供的智能标签,它们非常强大且完整。 由此,您可以看到生成了哪种 ASPX 标记,并学习如何在设计模式之外工作。 我是一个边做边学的人,所以我更喜欢这种方法,而不是在第一次使用某些东西时查看文档。
Design Mode is taking quite a beating here, but let me point out that it is great for learning about new controls. When you are new to ASP.NET, or are using a new library of controls, Design Mode is a godsend for two reasons:
When I was first learning to use Telerik controls, I relied heavily on the Smart Tags they provide, which are very robust and complete. From that, you can see what kind of ASPX markup is generated and learn to work outside of Design Mode. I am a learn-by-doing kind of guy, so I much prefer this approach to looking at the documentation when using something for the first time.
我用的是VS2008,从来不用设计视图。 我发现代码视图比设计器更容易、响应更快。
I'm using VS2008, and I never use the design view. I find the code view to just be easier and more responsive than the designer.
你知道,我什至从未意识到我 100% 的时间都在使用源屏幕。 我一般都是用VS2005开发的。
每当我真正打开设计模式时,都是偶然的,我会尝试在渲染之前点击源视图。 我对设计模式从来没有印象深刻,发现它很慢并且添加了很多不必要的标记。 我还发现智能感知和属性窗口意味着我不需要 GUI 来开发。
当您尝试添加任何嵌套项目时,设计模式也可能是一场噩梦。 因为我们一直在为使用 IE6 的客户进行开发,所以我们一直使用表格进行格式化,因此我们不需要不同的 DIV 定义。 仅单击空单元格可能很困难,并且调整列大小可能需要很长时间。
对于网格中的模板字段之类的东西,我什至不知道如何在设计视图中进行设置!
话虽如此,每次 Windows 应用程序的设计模式!
Y'know, I never even realised I use the source screens 100% of the time. I usually develop in VS2005.
Whenever I do actually open the design mode, it's by accident, and I try and hit the source view before it renders. I've never been impressed with the design mode, and find it slow as well as adding a lot of unnecessary markup. I also find that intellisense and the properties window mean that I don't need a GUI to develop.
The design mode can also be a nightmare when you're trying to add any nested items. Because we've been developing for a customer using IE6 we've been using tables for formatting so we don't need different DIV definitions. Just clicking in an empty cell can be difficult, and resizing a column can take far too long.
For things like Template Fields in grids, I don't even know how I'd go about setting this up in design view!
Having said that, design mode every time for windows apps!
设计模式正在变得越来越好,我想说,随着时间的推移和设计模式工具的不断改进,它可能会变得更加普遍。 我为设计模式设计了所有组件,但我仍然手工完成大部分代码 - 它允许更好地控制代码布局,并且最终不会创建自动格式化的混乱,然后我必须深入研究以找出结果找出需要做出哪些改变。 我知道,将来我的组件可能会被通过拖放完成大部分设计的开发人员使用,现在满足这一点比必须在活动结束后回来完成更容易。
Design mode is getting better and I'd say that it's likely to become more prevalent as time goes on and the design mode tools continue to improve. I design all my components for design mode, but I still do the large majority of my code by hand - it allows greater control of code layout and doesn't end up creating an auto-formatted mess that I then have to dig through to figure out what changes need making. I know that in future my components are likely going to be used by developers that do most of their design by drag/drop and it's easier to cater for that now than have to come back and do it after the event.
当然,我正在做 MVC 的东西,但我从不使用它——我是在 PHP 和代码编辑器的陪伴下“长大”的,它仍然对我有用。
Granted I'm doing MVC stuff, but I never use it - I "grew up" with PHP and code editors, and it still does me just fine.
我使用两个不同版本的.NET(2003 和 2005)。 一些2003年编写的表单在2003年无法再编辑,并且安装要求在2003年维护它们,因此我使用KEDIT来编辑这些表单。
一个应用程序中的某些表单对于 .NET 编辑器来说太大了,无论如何我更喜欢一个强大的编辑器。
I'm using two different versions of .NET (2003 & 2005). Some of the forms that were written in 2003 can no longer be edited in 2003 and the installation requires that they be maintained in 2003, so I use KEDIT to edit those forms.
Some of the forms in one application are too big for the .NET editor and I prefer a strong editor anyway.
我在设计模式下工作没有问题。 一个例外是 asp:Repeaters,它不受支持,或者 GridViews 往往会覆盖我的手动列定义。
另一种情况是,如果我重命名一个控件,VS 会尝试进行完整的项目扫描,然后失败。
I have no problem working in design mode. One exception is asp:Repeaters, which are not supported, or GridViews which tend to override my manual column definitions.
The other is if VS tries to do a full project scan if I rename a control, and then fails.
我们主要使用代码视图。 我们在 VS 2008 中发现设计模式有很多错误。由于某种原因,XML 控件往往会拒绝随机字符集,并且 VS 在尝试在屏幕上渲染所有内容时通常会运行缓慢。 我主要使用代码视图。
We primarily use the code view. The design mode is quite buggy we've found in VS 2008. XML controls tend to barf random character sets out for some reason, and VS will generally run slow whilst trying to render everything on screen. I mainly use the code-view.
传统上,WYSIWYG 设计人员生成的代码很差,CSS 和 #INCLUDEd 文件的渲染效果很差,因此它们的用途有限,因此开发人员倾向于手动编码。 此外,这些工具允许您在不真正了解自己在做什么的情况下进行一定的距离,这对于网络教程和个人主页来说很好,但是一旦您想要额外的控制程度,您就会陷入困境 - 当意味着您有无论如何,都要诉诸于寻找“幕后”。
尽管工具随着时间的推移而不断改进,但许多开发人员对手动编码非常满意,以至于他们几乎忘记了设计视图 - 我当然不记得上次使用它是什么时候。 我确信在很多情况下这些工具确实有用,但我们在没有这些工具的情况下也做得很好,并且不想费心去计算何时需要使用这些工具。 最能利用这些功能的地方。
Traditionally WYSIWYG designers produced poor code and render CSS and #INCLUDEd files poorly so they were of limited use, so developers tended to code by hand. In addition, these tools allowed you to go a certain distance without real knowledge of what you were doing, which was fine for web tutorials and personal homepages, but as soon as you wanted an extra degree of control you became unstuck - when meant you had to resort to looking 'under the hood' anyway.
Although tools have improved over time, many developers are so comfortable with hand-coding that they all but forget about the Design View - I certainly can't remember last time I used it. I'm sure there are a number of situations where such tools could be genuinely useful, but we are doing fine without and don't want to be bothered with figuring when & where such features can best be used.
我们的UI很复杂,我们不可能使用VS2005的设计模式。
我唯一一次接触设计模式是做一个快速而肮脏的原型或内部应用程序。
我多久不使用设计模式? 99%的时间。
Our UI is complicated and it is impossible for us to use design mode with VS2005.
The only time I have touched design mode is to do a quick and dirty prototype or an internal app.
How often do I not use design mode? 99% of the time.