ASP。NET MVC vs. Webforms:替换Webforms控件。

时间:2022-08-05 03:19:09

I have read several other posts here, so i get the idea on the pro vs. cons, especially having full control over the rendered html code etc. (in MVC).

我在这里已经读了一些其他的文章,所以我了解了pro和cons的概念,尤其是完全控制呈现的html代码等等(在MVC中)。

My question is regarding the UI controls: In MVC, i will have to write all UI controls myself (or the html equivalent). Now is that not going to be very difficult? The reason why these 3rd party vendors for asp.net are there is just because of the fact that it is difficult to write UI controls for ASP.NET all by ourselves, and be able to target to all web browsers, and also that we are better off concentrating our time on the business logic rather than spending the whole lot of time writing the UI controls HTML code ourselves.

我的问题是关于UI控件的:在MVC中,我必须自己编写所有的UI控件(或者html等效的控件)。这不是很难吗?这些asp.net第三方供应商存在的原因仅仅是因为很难为ASP编写UI控件。NET完全依靠我们自己,并且能够针对所有web浏览器,而且我们最好将时间集中在业务逻辑上,而不是花大量的时间编写UI控制HTML代码。

I understand that this feature gets us the full control over the final html, but is it not counter-productive to do this UI bit ourselves. If it was so easy to write them ourselves, how come these 3-rd party vendors are all living now. We could have done this all by ourselves all these years of WebForms days.

我知道这个特性让我们对最终的html有了完全的控制,但是这样做不会适得其反。如果我们自己很容易就能写出来,那么为什么这些第三方供应商都活在当下呢?这些年来,我们都可以自己做这些事情。

I am sure i am missing something here or being a little stupid, but please enlighten me as to what i am missing in specific regard to the UI bit being written by ourselves.

我确信我在这里漏掉了什么,或者有点愚蠢,但是请您告诉我,在我们自己编写的UI位方面,我遗漏了什么。

Just because i get full control over the program by writing in IL code, do we go and do that? We still use C# and things like that - So that theory of "having full control over html" - i am not bought into that idea.

仅仅因为我通过写IL代码来完全控制程序,我们就去做吗?我们仍在使用c#之类的东西——因此“完全控制html”的理论——我并不认同这个观点。

Please help in getting my head around this UI bit. Other things i understand, about the separation of concern, TDD based development possible with MVC etc. But why would i go around writing the UI controls all by myself - it is a bit a work isn't it?

请帮助我了解这个UI位。我理解的其他事情,关于关注点的分离,基于TDD的开发在MVC中是可能的,但是为什么我要自己写UI控件——这有点麻烦,不是吗?

12 个解决方案

#1


11  

The thing is:

事情是这样的:

If you want to master in web development you have to master HTML + CSS + Javascript

如果你想精通web开发,你必须精通HTML + CSS + Javascript

And with WebForms you have to learn the WebForms way to do it, but with MVC you have the power of .Net with the freedom to generate the HTML + CSS + Javascript you want.

有了WebForms,你就得学习WebForms的方法了,但是MVC你有。net的强大功能,你可以*地生成HTML + CSS + Javascript。

#2


2  

Here's a new rant on the subject http://www.charliedigital.com/PermaLink,guid,6dcb0333-9d70-40c7-975b-0ff4011c4661.aspx

这里有一个关于这个话题的新的咆哮http://www.charliedigital.com/PermaLink,guid, 6dcb0333-9d70c7-975b -0ff4011c4661.aspx

#3


2  

Problem is, ASP.NET MVC is much younger product than ASP.NET. For many years 3rd party companies have been developing TONS of reusable components, and I believe that it is only a matter of time before comparable set of controls will be available for ASP.NET MVC.

问题是,ASP。NET MVC比ASP.NET更年轻。多年来,第三方公司一直在开发大量的可重用组件,我相信,对于ASP来说,类似的控制集将会出现只是时间问题。净MVC。

If you really need very rich GUI with 3rd party controls, and you can't rewrite them in acceptable time - stick with asp.net. Altough in my opinion, MVC gives you tons of power it wouldn't be wise to spend much more time rewriting controls than you can save. If you can live without controls, and like MVC concepts - use MVC, and you'll most certainly see 3rd party solutions as soon as they'll there is growing market (maybe thay've already noticed that, I don't know) for mvc extensions.

如果您真的需要非常丰富的GUI和第三方控件,并且您不能在可接受的时间内重写它们——使用asp.net。在我看来,MVC给了你大量的力量,花更多的时间重写控件是不明智的。如果您可以不使用控件,并且像MVC概念一样使用MVC,那么您肯定会看到第三方的解决方案,因为MVC扩展的市场正在增长(我不知道)。

#4


1  

I believe that the UI and the user experience are vital to the success of a web app. Making the page intuitive and easy to use, minimizing the amount of navigation the user has to do to get the job done, and providing effective feedback and interactivity can make all the difference between a site that users want to use and one that they avoid.

我相信用户界面和用户体验对于一个web应用程序的成功至关重要。使页面直观且易于使用,减少导航用户的数量来完成工作,并提供有效的反馈和互动可以让所有网站,用户想要使用的区别,他们避免。

If you are trying to attract users on a public website, a pleasing appearance and excellent usability are key to building repeat visits.

如果你想在公共网站上吸引用户,一个令人愉快的外观和卓越的可用性是建立重复访问的关键。

If you are writing an intranet app to be used by hundreds or thousands of employees all day long -- as I mostly do -- making the UI efficient and easy to use really means a lot to your users.

如果您正在编写一个内部网应用程序,供数百或数千名员工全天使用(就像我通常所做的那样),使UI高效且易于使用对您的用户来说真的非常重要。

So, I wouldn't downplay the importance of the UI. It isn't a nuisance. It's a key part of the user experience. I suggest that a web developer should embrace whatever tools and strategies that will get the job done. That often means coding the UI controls yourself. Or working with a teammate who likes doing that part of the work.

所以,我不会低估UI的重要性。它不是一个麻烦。它是用户体验的关键部分。我建议web开发人员应该采用能够完成工作的任何工具和策略。这通常意味着编写UI控件。或者和喜欢做那部分工作的队友一起工作。

#5


1  

I recently refactored a very complex website using ASP.NET + handworked javascript to MVC + jQuery. The complexity of the code was reduced by 50%-75% and became much more testable. I replaced all the complex webcontrols I had to write (with a steep learning curve I had to overcome) with very simple HtmlHelper methods.

我最近重构了一个使用ASP的非常复杂的网站。NET +手工javascript到MVC + jQuery。代码的复杂度降低了50%-75%,变得更加可测试。我用非常简单的HtmlHelper方法替换了我必须编写的所有复杂的webcontrols(用我必须克服的陡峭的学习曲线)。

Don't forget, when you use custom webcontrols, you are given a very static UI by the control developer. With raw HTML, you can take advantage of styles and ui developed by the whole web industry.

不要忘记,当您使用自定义webcontrols时,控件开发人员将为您提供一个非常静态的UI。使用原始HTML,您可以利用整个web行业开发的样式和ui。

Increased simplicity, decreased development time, testability, flexibility in UI... I don't want to go back.

增加了简单性,减少了开发时间,可测试性,UI的灵活性…我不想回去。

#6


1  

You also have to remember that ASP.NET MVC is just the first release. I don't think there is intrinsically any reason why you couldn't have the equivalent of server controls to enable certain tasks - remember, there are many server controls that don't generate any mark-up (such as the Repeater, PlaceHolder, ListView). These type of controls could be useful in a future MVC setting, I think.

你还必须记住这个ASP。NET MVC只是第一个版本。我不认为有什么本质上的原因使您不能使用等价的服务器控件来启用某些任务——请记住,有许多服务器控件不会生成任何标记(比如中继器、占位符、ListView)。我认为,在未来的MVC设置中,这些类型的控件可能是有用的。

#7


1  

I believe that ASP.net came around when lots of developers were still used to doing desktop applications and just beginning web development. AT that point in time abstracting the details of the web with controls and post backs was a great way to get people started. At that point we weren't trying to perfect the web, we just wanted to get on it!

我相信,当许多开发人员还习惯于做桌面应用程序和刚刚开始web开发时,ASP.net就出现了。在那个时候,用控件和post back抽象web的细节是让人们开始的好方法。在那时,我们并没有试图完善网络,我们只是想去做它!

Now that the web has matured and we've all slowly learned about html, css, javascript and the likes we want to optimize our websites for our own needs and we don't want to depend on ASP.net Forms controls to control the fine details of our websites.

现在网络已经成熟,我们都慢慢地学习了html、css、javascript以及我们想要根据自己的需要优化我们的网站,我们不想依赖ASP.net表单控件来控制我们网站的细节。

In summary, I think this is about the natural evolution of many developers from the desktop to the web

总之,我认为这是许多开发人员从桌面到web的自然进化

#8


1  

I for one, am very thankful that you cannot use ASP.NET controls in MVC.

我很感激你不能用ASP。在MVC净控件。

Controls, as many have already pointed out, are just server side blocks of code that render HTML and javascript on your behalf. Things like a datagrid are great, until someone asks you to make a slight modification, like having a delete confirmation alert, and then it seems impossible to do certain tasks.

正如许多人已经指出的,控件只是代表您呈现HTML和javascript的服务器端代码块。像datagrid这样的东西很不错,直到有人让你做一个小小的修改,比如有一个删除确认警报,然后似乎不可能完成某些任务。

The good news is that there are very powerful jQuery tools written to help you. jQgrid is a great grid replacement that does WAY more than the ASP.NET grid...

好消息是有非常强大的jQuery工具可以帮助您。jQgrid是一种很棒的网格替换,它的功能远不止ASP。净网格……

http://www.trirand.com/blog/

http://www.trirand.com/blog/

jsTree is a treeview that is fantastic. Again with the jQuery....

jsTree是一个非常棒的treeview。再次与jQuery ....

http://www.jstree.com/

http://www.jstree.com/

And the truth is that most things you can do with razor, HTML, javascript and CSS. It's so simple that it's just stupid.

事实是,你可以用razor, HTML, javascript和CSS来做很多事情。这太简单了,简直太愚蠢了。

It's hard for people like myself who were web forms developers to grasp MVC and why you should use it because it's so simple. It's difficult to let go of the complexity of conventional ASP.NET. But it feels so good when you do.

像我这样的web表单开发人员很难理解MVC,为什么要使用它,因为它太简单了。传统ASP.NET的复杂性很难让人放弃。但当你这么做的时候,感觉很好。

And don't mix web forms with MVC. You can do it, but you will wish you hadn't.

不要把web表单和MVC混在一起。你能做到,但你会后悔没有。

#9


0  

Here is the key thing that I think you are missing. When ASP.NET is no longer the MS way of doing things...you will eventually be forced to move on and do something else. I have programmed in perl, ASP classic, then ColdFusion, then PHP, then ASP.NET web forms, then ASP.NET MVC...the only thing that they all have in common is the underlying database, design patterns, best practices for a given set of technology AND...HTML, JavaScript, CSS, and Photoshop.

这是我认为你错过的关键。在ASP。NET不再是MS的做事方式……你最终会*离开,去做别的事情。我已经编程了perl, ASP classic,然后ColdFusion,然后是PHP,然后是ASP。NET web表单,然后是ASP。净MVC……它们唯一的共同点是底层数据库、设计模式、一套特定技术的最佳实践和……HTML、JavaScript、CSS和Photoshop。

No one is asking you to learn MVC. No one is telling you to not use WebForms. However, complaining that you have to write a raw UI is not going to get you very far in this industry. You should be learning something new every day...and it sounds like some time spent on HTML and CSS would be a great place to start your focus!

没有人要求你学习MVC。没有人告诉你不要使用WebForms。然而,抱怨你必须编写一个原始的UI并不会让你在这个行业走得很远。你应该每天学习新的东西……这听起来像是花在HTML和CSS上的一段时间,将会是你开始关注的好地方!

The biggest problem you have with relying on third party controls is when a client asks you to do something that the third party controls don't cover. If you can't replicate their complexity plus the added feature request on your own you are skirting a possible failure in your professional livelihood! You will need to know how to do it all...eventually!

依赖第三方控件的最大问题是,当客户要求您做一些第三方控件不涉及的事情时。如果您不能复制它们的复杂性,再加上您自己添加的特性请求,那么您就避免了在您的职业生涯中可能出现的失败!最终,你需要知道如何做到这一切!

I generally suggest that you embrace new technologies. You don't have to use them...but you should at least know how. This way you will know what the best tool is for any given project.

我一般建议你采用新技术。你不必使用它们……但你至少应该知道怎么做。通过这种方式,您将知道任何给定项目的最佳工具是什么。

#10


0  

I've been wondering - what's an equivalent of 'control' from webforms in asp.net mvc? It's not a partial view for sure. What else it can be? Controller + partial views via partial requests?

我一直在想,在asp.net mvc中,什么是等同于webforms的“控件”?这不一定是片面的观点。它还能是什么?控制器+部分视图通过部分请求?

Maybe i'm dumb, blind or both, but i haven't seen any 'control' for asp.net mvc. Just a lot of code snippets to accomplish one specific thing or another.

也许我是笨的,瞎的,或者两者都有,但是我还没有看到任何对asp.net mvc的“控制”。只需要很多代码片段来完成一件或另一件特定的事情。

I believe that asp.net mvc is quite unfriendly with rapid development. Only way out of this problem - a lot of open source code (like MvcContrib), tutorials, sample applications & most important - slightly smarter developers.

我认为asp.net mvc对于快速开发是非常不友好的。只有这样才能解决这个问题——大量的开放源代码(比如mvc悔过)、教程、示例应用程序和最重要的是——稍微聪明一点的开发人员。

#11


0  

You do not have to replace Webforms controls with something else from MVC. Just mix them - http://www.hanselman.com/blog/PlugInHybridsASPNETWebFormsAndASPMVCAndASPNETDynamicDataSideBySide.aspx

您不必用MVC中的其他东西替换Webforms控件。只需混合它们——http://www.hanselman.com/blog/pluginhybrid aspnetwebformsandaspmvcandaspnetdynamicdatasidebyside.aspx

#12


0  

Well, I was also wondering how to use 3rd party controls in ASP.NET MVC. Obviously, and contrary to some answers here, it had to be possible.

我也想知道如何在ASP中使用第三方控件。净MVC。显然,与这里的一些答案相反,它必须是可能的。

As much time has passed since the question was asked, the industry has evolved. So I've searched and found (but havent' yet tested) solutions such as Telerik Extensions for ASP.NET MVC .

自从这个问题被提出以来,这个行业已经发展了很久。所以我搜索并找到了(但还没有测试)解决方案,比如ASP的Telerik扩展。净MVC。

I'm posting this answer here mainly to support other MVC newbees such as myself - Just Google

我在这里发布这个答案,主要是为了支持像我这样的其他MVC newbees——只是谷歌。

"asp.net mvc" controls

“asp.net mvc”控制

#1


11  

The thing is:

事情是这样的:

If you want to master in web development you have to master HTML + CSS + Javascript

如果你想精通web开发,你必须精通HTML + CSS + Javascript

And with WebForms you have to learn the WebForms way to do it, but with MVC you have the power of .Net with the freedom to generate the HTML + CSS + Javascript you want.

有了WebForms,你就得学习WebForms的方法了,但是MVC你有。net的强大功能,你可以*地生成HTML + CSS + Javascript。

#2


2  

Here's a new rant on the subject http://www.charliedigital.com/PermaLink,guid,6dcb0333-9d70-40c7-975b-0ff4011c4661.aspx

这里有一个关于这个话题的新的咆哮http://www.charliedigital.com/PermaLink,guid, 6dcb0333-9d70c7-975b -0ff4011c4661.aspx

#3


2  

Problem is, ASP.NET MVC is much younger product than ASP.NET. For many years 3rd party companies have been developing TONS of reusable components, and I believe that it is only a matter of time before comparable set of controls will be available for ASP.NET MVC.

问题是,ASP。NET MVC比ASP.NET更年轻。多年来,第三方公司一直在开发大量的可重用组件,我相信,对于ASP来说,类似的控制集将会出现只是时间问题。净MVC。

If you really need very rich GUI with 3rd party controls, and you can't rewrite them in acceptable time - stick with asp.net. Altough in my opinion, MVC gives you tons of power it wouldn't be wise to spend much more time rewriting controls than you can save. If you can live without controls, and like MVC concepts - use MVC, and you'll most certainly see 3rd party solutions as soon as they'll there is growing market (maybe thay've already noticed that, I don't know) for mvc extensions.

如果您真的需要非常丰富的GUI和第三方控件,并且您不能在可接受的时间内重写它们——使用asp.net。在我看来,MVC给了你大量的力量,花更多的时间重写控件是不明智的。如果您可以不使用控件,并且像MVC概念一样使用MVC,那么您肯定会看到第三方的解决方案,因为MVC扩展的市场正在增长(我不知道)。

#4


1  

I believe that the UI and the user experience are vital to the success of a web app. Making the page intuitive and easy to use, minimizing the amount of navigation the user has to do to get the job done, and providing effective feedback and interactivity can make all the difference between a site that users want to use and one that they avoid.

我相信用户界面和用户体验对于一个web应用程序的成功至关重要。使页面直观且易于使用,减少导航用户的数量来完成工作,并提供有效的反馈和互动可以让所有网站,用户想要使用的区别,他们避免。

If you are trying to attract users on a public website, a pleasing appearance and excellent usability are key to building repeat visits.

如果你想在公共网站上吸引用户,一个令人愉快的外观和卓越的可用性是建立重复访问的关键。

If you are writing an intranet app to be used by hundreds or thousands of employees all day long -- as I mostly do -- making the UI efficient and easy to use really means a lot to your users.

如果您正在编写一个内部网应用程序,供数百或数千名员工全天使用(就像我通常所做的那样),使UI高效且易于使用对您的用户来说真的非常重要。

So, I wouldn't downplay the importance of the UI. It isn't a nuisance. It's a key part of the user experience. I suggest that a web developer should embrace whatever tools and strategies that will get the job done. That often means coding the UI controls yourself. Or working with a teammate who likes doing that part of the work.

所以,我不会低估UI的重要性。它不是一个麻烦。它是用户体验的关键部分。我建议web开发人员应该采用能够完成工作的任何工具和策略。这通常意味着编写UI控件。或者和喜欢做那部分工作的队友一起工作。

#5


1  

I recently refactored a very complex website using ASP.NET + handworked javascript to MVC + jQuery. The complexity of the code was reduced by 50%-75% and became much more testable. I replaced all the complex webcontrols I had to write (with a steep learning curve I had to overcome) with very simple HtmlHelper methods.

我最近重构了一个使用ASP的非常复杂的网站。NET +手工javascript到MVC + jQuery。代码的复杂度降低了50%-75%,变得更加可测试。我用非常简单的HtmlHelper方法替换了我必须编写的所有复杂的webcontrols(用我必须克服的陡峭的学习曲线)。

Don't forget, when you use custom webcontrols, you are given a very static UI by the control developer. With raw HTML, you can take advantage of styles and ui developed by the whole web industry.

不要忘记,当您使用自定义webcontrols时,控件开发人员将为您提供一个非常静态的UI。使用原始HTML,您可以利用整个web行业开发的样式和ui。

Increased simplicity, decreased development time, testability, flexibility in UI... I don't want to go back.

增加了简单性,减少了开发时间,可测试性,UI的灵活性…我不想回去。

#6


1  

You also have to remember that ASP.NET MVC is just the first release. I don't think there is intrinsically any reason why you couldn't have the equivalent of server controls to enable certain tasks - remember, there are many server controls that don't generate any mark-up (such as the Repeater, PlaceHolder, ListView). These type of controls could be useful in a future MVC setting, I think.

你还必须记住这个ASP。NET MVC只是第一个版本。我不认为有什么本质上的原因使您不能使用等价的服务器控件来启用某些任务——请记住,有许多服务器控件不会生成任何标记(比如中继器、占位符、ListView)。我认为,在未来的MVC设置中,这些类型的控件可能是有用的。

#7


1  

I believe that ASP.net came around when lots of developers were still used to doing desktop applications and just beginning web development. AT that point in time abstracting the details of the web with controls and post backs was a great way to get people started. At that point we weren't trying to perfect the web, we just wanted to get on it!

我相信,当许多开发人员还习惯于做桌面应用程序和刚刚开始web开发时,ASP.net就出现了。在那个时候,用控件和post back抽象web的细节是让人们开始的好方法。在那时,我们并没有试图完善网络,我们只是想去做它!

Now that the web has matured and we've all slowly learned about html, css, javascript and the likes we want to optimize our websites for our own needs and we don't want to depend on ASP.net Forms controls to control the fine details of our websites.

现在网络已经成熟,我们都慢慢地学习了html、css、javascript以及我们想要根据自己的需要优化我们的网站,我们不想依赖ASP.net表单控件来控制我们网站的细节。

In summary, I think this is about the natural evolution of many developers from the desktop to the web

总之,我认为这是许多开发人员从桌面到web的自然进化

#8


1  

I for one, am very thankful that you cannot use ASP.NET controls in MVC.

我很感激你不能用ASP。在MVC净控件。

Controls, as many have already pointed out, are just server side blocks of code that render HTML and javascript on your behalf. Things like a datagrid are great, until someone asks you to make a slight modification, like having a delete confirmation alert, and then it seems impossible to do certain tasks.

正如许多人已经指出的,控件只是代表您呈现HTML和javascript的服务器端代码块。像datagrid这样的东西很不错,直到有人让你做一个小小的修改,比如有一个删除确认警报,然后似乎不可能完成某些任务。

The good news is that there are very powerful jQuery tools written to help you. jQgrid is a great grid replacement that does WAY more than the ASP.NET grid...

好消息是有非常强大的jQuery工具可以帮助您。jQgrid是一种很棒的网格替换,它的功能远不止ASP。净网格……

http://www.trirand.com/blog/

http://www.trirand.com/blog/

jsTree is a treeview that is fantastic. Again with the jQuery....

jsTree是一个非常棒的treeview。再次与jQuery ....

http://www.jstree.com/

http://www.jstree.com/

And the truth is that most things you can do with razor, HTML, javascript and CSS. It's so simple that it's just stupid.

事实是,你可以用razor, HTML, javascript和CSS来做很多事情。这太简单了,简直太愚蠢了。

It's hard for people like myself who were web forms developers to grasp MVC and why you should use it because it's so simple. It's difficult to let go of the complexity of conventional ASP.NET. But it feels so good when you do.

像我这样的web表单开发人员很难理解MVC,为什么要使用它,因为它太简单了。传统ASP.NET的复杂性很难让人放弃。但当你这么做的时候,感觉很好。

And don't mix web forms with MVC. You can do it, but you will wish you hadn't.

不要把web表单和MVC混在一起。你能做到,但你会后悔没有。

#9


0  

Here is the key thing that I think you are missing. When ASP.NET is no longer the MS way of doing things...you will eventually be forced to move on and do something else. I have programmed in perl, ASP classic, then ColdFusion, then PHP, then ASP.NET web forms, then ASP.NET MVC...the only thing that they all have in common is the underlying database, design patterns, best practices for a given set of technology AND...HTML, JavaScript, CSS, and Photoshop.

这是我认为你错过的关键。在ASP。NET不再是MS的做事方式……你最终会*离开,去做别的事情。我已经编程了perl, ASP classic,然后ColdFusion,然后是PHP,然后是ASP。NET web表单,然后是ASP。净MVC……它们唯一的共同点是底层数据库、设计模式、一套特定技术的最佳实践和……HTML、JavaScript、CSS和Photoshop。

No one is asking you to learn MVC. No one is telling you to not use WebForms. However, complaining that you have to write a raw UI is not going to get you very far in this industry. You should be learning something new every day...and it sounds like some time spent on HTML and CSS would be a great place to start your focus!

没有人要求你学习MVC。没有人告诉你不要使用WebForms。然而,抱怨你必须编写一个原始的UI并不会让你在这个行业走得很远。你应该每天学习新的东西……这听起来像是花在HTML和CSS上的一段时间,将会是你开始关注的好地方!

The biggest problem you have with relying on third party controls is when a client asks you to do something that the third party controls don't cover. If you can't replicate their complexity plus the added feature request on your own you are skirting a possible failure in your professional livelihood! You will need to know how to do it all...eventually!

依赖第三方控件的最大问题是,当客户要求您做一些第三方控件不涉及的事情时。如果您不能复制它们的复杂性,再加上您自己添加的特性请求,那么您就避免了在您的职业生涯中可能出现的失败!最终,你需要知道如何做到这一切!

I generally suggest that you embrace new technologies. You don't have to use them...but you should at least know how. This way you will know what the best tool is for any given project.

我一般建议你采用新技术。你不必使用它们……但你至少应该知道怎么做。通过这种方式,您将知道任何给定项目的最佳工具是什么。

#10


0  

I've been wondering - what's an equivalent of 'control' from webforms in asp.net mvc? It's not a partial view for sure. What else it can be? Controller + partial views via partial requests?

我一直在想,在asp.net mvc中,什么是等同于webforms的“控件”?这不一定是片面的观点。它还能是什么?控制器+部分视图通过部分请求?

Maybe i'm dumb, blind or both, but i haven't seen any 'control' for asp.net mvc. Just a lot of code snippets to accomplish one specific thing or another.

也许我是笨的,瞎的,或者两者都有,但是我还没有看到任何对asp.net mvc的“控制”。只需要很多代码片段来完成一件或另一件特定的事情。

I believe that asp.net mvc is quite unfriendly with rapid development. Only way out of this problem - a lot of open source code (like MvcContrib), tutorials, sample applications & most important - slightly smarter developers.

我认为asp.net mvc对于快速开发是非常不友好的。只有这样才能解决这个问题——大量的开放源代码(比如mvc悔过)、教程、示例应用程序和最重要的是——稍微聪明一点的开发人员。

#11


0  

You do not have to replace Webforms controls with something else from MVC. Just mix them - http://www.hanselman.com/blog/PlugInHybridsASPNETWebFormsAndASPMVCAndASPNETDynamicDataSideBySide.aspx

您不必用MVC中的其他东西替换Webforms控件。只需混合它们——http://www.hanselman.com/blog/pluginhybrid aspnetwebformsandaspmvcandaspnetdynamicdatasidebyside.aspx

#12


0  

Well, I was also wondering how to use 3rd party controls in ASP.NET MVC. Obviously, and contrary to some answers here, it had to be possible.

我也想知道如何在ASP中使用第三方控件。净MVC。显然,与这里的一些答案相反,它必须是可能的。

As much time has passed since the question was asked, the industry has evolved. So I've searched and found (but havent' yet tested) solutions such as Telerik Extensions for ASP.NET MVC .

自从这个问题被提出以来,这个行业已经发展了很久。所以我搜索并找到了(但还没有测试)解决方案,比如ASP的Telerik扩展。净MVC。

I'm posting this answer here mainly to support other MVC newbees such as myself - Just Google

我在这里发布这个答案,主要是为了支持像我这样的其他MVC newbees——只是谷歌。

"asp.net mvc" controls

“asp.net mvc”控制