-1

I want to develop a very big product with many categories. I want to use Asp.net forms with jQuery and WebMethods like

$.ajax({
        type: "POST",
        url: "Just.aspx/Fetch",
        data: "{'date':'" + sdate + "','edate':'" + edate + "'}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (msg) {}
});
[System.Web.Services.WebMethod()]
[System.Web.Script.Services.ScriptMethod()]
public static string Fetch(string date, string edate)
{
//my code here
}

Now my questions are

  1. I am familiar with this method, so should I proceed with this? OR should I use Asp.net MVC?

  2. Is this approach good for developing such big products? If not then suggest me a good one.

  3. I have a lot of categories, so my URL becomes very lengthy. Like this..

    mywebsite.com/categories/auto/new/subcategory/save.aspx?id=2332&cat=38

    I want to make these URL more userfriendly, how to create a standard for all URL using here?

  4. Should I use URL Rewriting OR Asp.net Routing?

Christian Strempfer
  • 7,291
  • 6
  • 50
  • 75
user3244721
  • 714
  • 2
  • 11
  • 29

1 Answers1

0

The biggest problems facing developers is managing complexity and keeping code "clean". MVC gives the developer the reins to leverage OOP to tuck away complexity and make code easy on the eyes.

Webforms will be faster to develop in the short term, but it doesn't lend itself to long term sustainability in terms of maintenance and growth.

You don't choose ASP.Net MVC over ASP.Net, because ASP.Net MVC still is ASP.Net. You do choose ASP.Net MVC or ASP.Net Web Forms, and there are lots of good reasons to do that:

Easier to get control over your HTML
Easier to do unit testing
Few "Gotchas"

On the other hand, Web Forms do have a few points in their favor:

Easy to put simple CRUD/business apps together extremely fast
Hard to beat ViewState performance in local LAN enviroment
Easy to learn forms paradigm

The result is that if you're building business apps in a corporate LAN environment (which honestly is still most web developers), Web Forms is really great. In that sense Microsoft really knows their market. But if you're building an app for the public internet, you might want MVC so you can test thoroughly and be sure your pages aren't bloated with un-necessary viewstate or javascript data.

In asp.net mvc you have Url routing in which you can rewrite urls as you want, but if there are many parmeters of a url, you can use a form and post the vlaues using hidden field, as it is not a good approach to show so long parmeters in the url.

Check the following links as well:

http://weblogs.asp.net/shijuvarghese/archive/2008/07/09/asp-net-mvc-vs-asp-net-web-form.aspx

Hope it helps.

Ehsan Sajjad
  • 61,834
  • 16
  • 105
  • 160
  • Thanks for your response...I got advantage of MVC,but as i am not familiar with that which will take time from me,so i will select Webforms using webmethods..Please also answer last points in my question – user3244721 Apr 06 '14 at 10:25