MVC and ASP.NET forms

 

Most of MVC frameworks use Form action as mechanism to signal MVC front controller which commands the user request. MVC mechanism check predefined XML file to know which actions should be made by the server side in order to return HTML back to clients.

 

I checked up Maverick (.Net version) in the last 4 days. Maverick is based on HTTPHandler that catch incoming requests with certain appendix (.m is out of box default). Maverick HTTPHandler catch incoming request with *.m suffix, phrase client request command, looks in Maverick.xml file for command, page and transformation defined for given command and perform them. Decoupling of requests from controllers, pages and transformation is very powerful for develop and maintenance stage of web application.

 

Using the described Maverick mode is applicable for pages that not using code behind, postback mechanism available in ASP.NET. If you want to use Maverick with postback web form you cant use the describe mechanism due to the fact that Forms using in postback forms always change form action to the forms page even if you change from action to other page. To overcome that problem Maverick can be used with pages that are actually controllers. While this "trick" is working, using it we give up Front controller, controller and page decoupling since the page implement controller interface as part of the page.

 

Well, it looks more suitable to me to use Web Form postback pages with decoupling controllers and pages. To achieve it I add my own base page which implements Action property and Response filter. I use the Response filer with regular expression to substitute Form action to the given page action. Right now its working fine, I just want to test it against application center test to check for RPS

No Comments