Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using ExtJS with ASP.NET, Webforms or MVC?

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.

Thank you!

like image 884
TigrouMeow Avatar asked Nov 12 '09 00:11

TigrouMeow


People also ask

When should I use ASP NET MVC vs Web Forms?

Asp.Net MVC has Partial Views for code re-usability. Asp.Net Web Form has built-in data controls and best for rapid development with powerful data access. Asp.Net MVC is lightweight, provide full control over markup and support many features that allow fast & agile development.

Should I use Web Forms or MVC?

MVC is still “relatively” new The application framework should be chosen based upon the needs and resources of the company doing the development. If you have a development cycle that requires faster than expected turnaround, then Web Forms might be the best option for your company.

Is Ext JS outdated?

In 2016, we were using a framework called ExtJS 4 which was released sometime in 2013. Back in the day, ExtJS made perfect sense, but by 2016 it felt heavy and outdated. With a huge footprint, our application would take about 10 seconds to load. Such performance is not acceptable for a web-based application.

Is ASP.NET Web Forms dead?

Does this mean ASP.NET Web Forms is dead and should no longer be used? Of course not! As long as the . NET Framework ships as part of Windows, ASP.NET Web Forms will be a supported framework.


2 Answers

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 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 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).

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

like image 74
Brian Moeskau Avatar answered Sep 18 '22 06:09

Brian Moeskau


Consider building your Ext JS front-end in isolation from the server.

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.

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.

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!

like image 29
Jonathan Julian Avatar answered Sep 22 '22 06:09

Jonathan Julian