Using ExtJS with ASP.NET, Webforms or MVC?

For a script that uses 0 ASP.NET controls rather than a 100% extJS interface, what are the benefits of using ASP.NET MVC or ASP.NET WebForms? And the flaws? Is there a USUAL way to do it right?

I would like to receive feedback on your experience.

Thanks!

+4
source share
5 answers

WebForms + any purely client-side structure will not give you anything but endless headaches, if you can make it work at all. Some of the problems that I had in the past (from head to toe, it was a while):

  • WebForms restricts you to one <form> per page. Although this does not necessarily prevent the use of Ext or something like that, it severely (and arbitrarily) limits in many cases
  • WebForms is built around postbacks and viewstate. Assuming that you are not using these features (since you do not have server controls), you will struggle against how WebForms wants to work. You can do this, but things really quickly turn into hacks.
  • WebForms has an entire page life cycle and server-side event infrastructure. Again, since you will not be using any of this, what's the point of choosing WebForms?
  • You’re stuck in nasty URLs if you don’t want to really fight 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 suffering that WebForms is. There are also several different Ext.Direct providers for MVC available on Ext forums if you are searching. Good luck finding something there to help you integrate Ext with WebForms (there is nothing).

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

+10
source

Think about how to create an Ext JS frontend separately from the server.

This denouement forces you to create a clean javascript application and keeps you away from the problems introduced by the helpers in various frameworks.

This reduces the amount of time you will "switch gears" between server languages ​​and javascript. In my experience, especially for developers new to Ext JS, the biggest obstacle is the separation of front-end logic on the server-side side.

And he will glow fast! Communicate with the server using pure HTTP and JSON and build an Ext JS application as intended!

+6
source

For this, I would like to use the MVC style for ASP. This is mainly because ASP.net tends to add random garbage that you don't need. What you want is the purest thing that outputs data in ExtJS. If you don’t need any interaction with the server at all, say that you are sending any input back to Azure or S3, then you do not need any ASP at all, you can send static HTML.

+1
source

ASP.Net MVC integrates better with ExtJs. If you need to use web forms, I would suggest taking a look at http://www.coolite.com/ . This is an ASP.Net shell on top of ExtJs and may make life easier.

+1
source

Another perspective: I am building an extjs web client for a remote .NET server. I suppose that basically I could just use the raw data for the look, since the server application handles all the logic, but since my remote access is not "web knowledge", I use a set of custom http (.ashx) handlers for analyze parameters and set mime types, session processing and everything related to the web server. With this architecture, it works very well with several scripts. I don’t feel the need to use a fancier setting like ASP.NET MVC (I don’t even think it will do), but I also don’t use WebForms.

0
source

All Articles