使用ExtJS与ASP.NET,Webforms或MVC? [英] Using ExtJS with ASP.NET, Webforms or MVC?

查看:200
本文介绍了使用ExtJS与ASP.NET,Webforms或MVC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于使用0个ASP.NET控件而不是一个100%extJS界面的场景,使用ASP.NET MVC或ASP.NET WebForms的好处是什么?和劣势?有没有办法做到这一点?

For a scenario using 0 ASP.NET controls at all but rather an 100% extJS interface, what would be the advantages of using ASP.NET MVC or ASP.NET WebForms? And the disadvantages? Is there a OBVIOUS way to do it properly?

我希望对您的经验有反馈意见。

I would love to have feedback's on your experiences.

谢谢!

推荐答案

WebForms +任何纯粹的客户端框架只会给你一个无尽的头痛,如果你可以得到它的工作在所有我过去曾经遇到的一些问题(在我的头上,已经有一段时间了):

WebForms + any purely client-side framework will give you nothing but endless headaches, if you can get it working at all. Some of the issues I've had in the past (off the top of my head, it's been a while):


  • WebForms限制你单个< form> 标签。虽然这并不一定妨碍使用Ext或类似的东西,但在许多情况下,它是严重(和任意的)限制

  • WebForms是围绕回发和viewstate构建的。假设您没有使用这些功能(因为您没有服务器控件),您将会面对WebForms想要工作的方式。你可以做到这一点,但事情真的很快就变得黑客了。

  • WebForms具有整个页面生命周期和服务器端事件框架。再次,既然你不会使用任何一个,那么挑选WebForms的意义是什么?

  • 除非你想真正与IIS进行斗争,否则你会陷入恶作剧。

  • WebForms limits you to a single <form> tag per page. While this does not necessarily prevent use of Ext or something like it, it is severely (and arbitrarily) limiting in many cases
  • WebForms is built around postbacks and viewstate. Assuming that you aren't using those features (since you have no server controls) you'll be fighting against the way WebForms wants to work. You can do this, but things really quickly turn hacky.
  • WebForms has an entire page lifecycle and server-side event framework. Again, since you won't be using any of that, what's the point in picking WebForms?
  • You're stuck with nasty urls unless you want to really fight with IIS.

ASP.Net MVC是一个更好的选择,如果你仍然想要利用.NET可以在服务器端提供没有痛苦的是WebForms。如果您搜索,还可以在Ext论坛中提供几个不同的Ext.Direct MVC提供程序。祝好运找到任何东西,帮助您整合Ext与WebForms(没有什么)。

ASP.Net MVC is a much better alternative if you still want to take advantage of what .NET can offer on the server side without the misery that is WebForms. There are also several different Ext.Direct providers for MVC available in the Ext forums if you search. Good luck finding anything out there to help you integrate Ext with WebForms (there is nothing).

编辑:我一直在使用此实现堆栈为ASP.NET MVC一段时间,出色的结果。

EDIT: I've been using this implementation of the Ext.Direct stack for ASP.NET MVC for a while with excellent results.

这篇关于使用ExtJS与ASP.NET,Webforms或MVC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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