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?
对于使用0个ASP.NET控件而非100%extJS接口的场景,使用ASP.NET MVC或ASP.NET WebForms会有什么好处?而且缺点呢?有没有一种合适的方法来正确地做到这一点?
I would love to have feedback's on your experiences.
我很想得到关于你的经历的反馈。
Thank you!
5 个解决方案
#1
10
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 +任何纯粹的客户端框架都会给你带来无穷无尽的麻烦,如果你能让它工作的话。我过去遇到过的一些问题(在我的脑海中,已经有一段时间了):
- 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将您限制为每页一个
WebForms是围绕回发和视图状态构建的。假设您没有使用这些功能(因为您没有服务器控件),您将会遇到WebForms想要工作的方式。你可以做到这一点,但事情真的很快变成黑客。
WebForms具有整个页面生命周期和服务器端事件框架。同样,既然你不会使用任何这些,那么选择WebForms有什么意义呢?
除非你想真正与IIS战斗,否则你会被困在讨厌的网址中。
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是一个更好的选择,如果你仍然希望利用.NET可以在服务器端提供的东西而没有WebForms的痛苦。如果您搜索,还可以在Ext论坛中使用几种不同的Ext.Direct提供程序。祝你好好找到任何可以帮助你将Ext与WebForms集成(没有什么)。
EDIT: I've been using this implementation of the Ext.Direct stack for ASP.NET MVC for a while with excellent results.
编辑:我已经使用Ext.Direct堆栈的这个实现为ASP.NET MVC一段时间有很好的结果。
#2
6
Consider building your Ext JS front-end in isolation from the server.
考虑与服务器隔离构建Ext JS前端。
This decoupling forces you to create a pure javascript application, and keeps you far away from the issues introduced by the "helpers" in various frameworks.
这种分离迫使您创建一个纯粹的JavaScript应用程序,并让您远离各种框架中“帮助者”引入的问题。
It reduces the amount of time you'll be "shifting gears" between server-side languages and javascript. In my experience, especially for developers new to Ext JS, the single biggest hurdle is in separating the front-end logic from the server-side logic.
它减少了你在服务器端语言和javascript之间“转换”的时间。根据我的经验,特别是对于刚接触Ext JS的开发人员来说,最大的障碍是将前端逻辑与服务器端逻辑分开。
And it will be blazing fast! Communicate with the server using pure HTTP and JSON and build an Ext JS application as it was intended!
它会很快!使用纯HTTP和JSON与服务器通信,并按照预期构建Ext JS应用程序!
#3
1
For that I would tend to use the MVC style of ASP. Basically it is because ASP.net tends to add random junk you don't need. What you want is the purest cleanest thing to push data out to ExtJS. If you don't need any server interaction at all, say you're sending any entered back to Azure or S3, then you don't need any ASP at all you can sent static HTML.
为此,我倾向于使用ASP的MVC风格。基本上是因为ASP.net倾向于添加你不需要的随机垃圾。你想要的是将数据推送到ExtJS最纯粹最干净的东西。如果您根本不需要任何服务器交互,比如说您要将任何输入回送到Azure或S3,那么您根本不需要任何ASP就可以发送静态HTML。
#4
1
ASP.Net MVC would be better for integrating with ExtJs. If you have to use Web Forms, then I would suggest to take a look at http://www.coolite.com/. This is a ASP.Net wrapper over ExtJs and will probably make life easier.
ASP.Net MVC可以更好地与ExtJs集成。如果您必须使用Web窗体,那么我建议您查看http://www.coolite.com/。这是一个基于ExtJs的ASP.Net包装器,可能会让生活更轻松。
#5
0
Another perspective: I am building a web client in extjs for a domain-specific .NET server remoting. I guess I could basically just push "raw" data to ext as the server app handles all logic, but as my remoting is not "web-aware", I am using a set of custom http handlers (.ashx) to parse parameters and set mime-types, session handling and all that web-server related stuff. With this architecture its working very well with just a few.ashx scripts, I dont feel any need to use a fancier setup like ASP.NET MVC (I dont even think that would fit), but I'm not using WebForms either.
另一个观点:我正在extjs中构建一个Web客户端,用于特定于域的.NET服务器远程处理。我想我基本上可以将“原始”数据推送到ext,因为服务器应用程序处理所有逻辑,但由于我的远程处理不是“网络感知”,我使用一组自定义http处理程序(.ashx)来解析参数和设置mime-types,会话处理和所有与Web服务器相关的东西。有了这个架构,它只需要几个.ashx脚本,我不觉得有必要使用像ASP.NET MVC这样的更高级的设置(我甚至认为不合适),但我也没有使用WebForms。
#1
10
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 +任何纯粹的客户端框架都会给你带来无穷无尽的麻烦,如果你能让它工作的话。我过去遇到过的一些问题(在我的脑海中,已经有一段时间了):
- 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将您限制为每页一个
WebForms是围绕回发和视图状态构建的。假设您没有使用这些功能(因为您没有服务器控件),您将会遇到WebForms想要工作的方式。你可以做到这一点,但事情真的很快变成黑客。
WebForms具有整个页面生命周期和服务器端事件框架。同样,既然你不会使用任何这些,那么选择WebForms有什么意义呢?
除非你想真正与IIS战斗,否则你会被困在讨厌的网址中。
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是一个更好的选择,如果你仍然希望利用.NET可以在服务器端提供的东西而没有WebForms的痛苦。如果您搜索,还可以在Ext论坛中使用几种不同的Ext.Direct提供程序。祝你好好找到任何可以帮助你将Ext与WebForms集成(没有什么)。
EDIT: I've been using this implementation of the Ext.Direct stack for ASP.NET MVC for a while with excellent results.
编辑:我已经使用Ext.Direct堆栈的这个实现为ASP.NET MVC一段时间有很好的结果。
#2
6
Consider building your Ext JS front-end in isolation from the server.
考虑与服务器隔离构建Ext JS前端。
This decoupling forces you to create a pure javascript application, and keeps you far away from the issues introduced by the "helpers" in various frameworks.
这种分离迫使您创建一个纯粹的JavaScript应用程序,并让您远离各种框架中“帮助者”引入的问题。
It reduces the amount of time you'll be "shifting gears" between server-side languages and javascript. In my experience, especially for developers new to Ext JS, the single biggest hurdle is in separating the front-end logic from the server-side logic.
它减少了你在服务器端语言和javascript之间“转换”的时间。根据我的经验,特别是对于刚接触Ext JS的开发人员来说,最大的障碍是将前端逻辑与服务器端逻辑分开。
And it will be blazing fast! Communicate with the server using pure HTTP and JSON and build an Ext JS application as it was intended!
它会很快!使用纯HTTP和JSON与服务器通信,并按照预期构建Ext JS应用程序!
#3
1
For that I would tend to use the MVC style of ASP. Basically it is because ASP.net tends to add random junk you don't need. What you want is the purest cleanest thing to push data out to ExtJS. If you don't need any server interaction at all, say you're sending any entered back to Azure or S3, then you don't need any ASP at all you can sent static HTML.
为此,我倾向于使用ASP的MVC风格。基本上是因为ASP.net倾向于添加你不需要的随机垃圾。你想要的是将数据推送到ExtJS最纯粹最干净的东西。如果您根本不需要任何服务器交互,比如说您要将任何输入回送到Azure或S3,那么您根本不需要任何ASP就可以发送静态HTML。
#4
1
ASP.Net MVC would be better for integrating with ExtJs. If you have to use Web Forms, then I would suggest to take a look at http://www.coolite.com/. This is a ASP.Net wrapper over ExtJs and will probably make life easier.
ASP.Net MVC可以更好地与ExtJs集成。如果您必须使用Web窗体,那么我建议您查看http://www.coolite.com/。这是一个基于ExtJs的ASP.Net包装器,可能会让生活更轻松。
#5
0
Another perspective: I am building a web client in extjs for a domain-specific .NET server remoting. I guess I could basically just push "raw" data to ext as the server app handles all logic, but as my remoting is not "web-aware", I am using a set of custom http handlers (.ashx) to parse parameters and set mime-types, session handling and all that web-server related stuff. With this architecture its working very well with just a few.ashx scripts, I dont feel any need to use a fancier setup like ASP.NET MVC (I dont even think that would fit), but I'm not using WebForms either.
另一个观点:我正在extjs中构建一个Web客户端,用于特定于域的.NET服务器远程处理。我想我基本上可以将“原始”数据推送到ext,因为服务器应用程序处理所有逻辑,但由于我的远程处理不是“网络感知”,我使用一组自定义http处理程序(.ashx)来解析参数和设置mime-types,会话处理和所有与Web服务器相关的东西。有了这个架构,它只需要几个.ashx脚本,我不觉得有必要使用像ASP.NET MVC这样的更高级的设置(我甚至认为不合适),但我也没有使用WebForms。