Advice on using ASP.net WebForms or MVC

后端 未结 7 1507
無奈伤痛
無奈伤痛 2020-12-21 00:34

I have a public facing hobby site that gets about 3000 unique visitors a day, written in classic ASP that is in bad need of a revamp and redesign. I\'ve faced the realizati

相关标签:
7条回答
  • 2020-12-21 00:45

    From my experience of passing from ASP to ASP.NET and ASP.NET MVC, it is easier to pass from ASP to ASP.NET MVC. However, the curve of learning is not so easy Please read and follow http://nerddinnerbook.s3.amazonaws.com/Intro.htm and , after you have read, see what's new in version 2 , for example :

    weblogs.asp.net/scottgu/archive/2010/01/10/asp-net-mvc-2-strongly-typed-html-helpers.aspx

    It will become a RAD for experienced developers!

    0 讨论(0)
  • 2020-12-21 00:47

    MVC is well suited to what you're doing.

    It's perfectly okay to have views which are static, if need be. Just take a look at what's generated by MVC's File->New Project template, for example.

    Considering that you're already accustomed to writing HTML/CSS and both frameworks will present a learning curve, I'd definitely recommend MVC. I think you'll find MVC fits requirements A and C much better than WebForms too (and both satisfy B).

    0 讨论(0)
  • 2020-12-21 00:47

    Use what is most productive, if you are familiar with webforms and like the event-driven model you can always look into MVP ( Model-View-Presenter ).

    ASP.NET MVC is really great and for me, it increases productivity.

    0 讨论(0)
  • 2020-12-21 00:47

    I would also recommend you to use ASP.NET MVC as you are pretty much familiar with HTML/CSS. Also with the features like Routing you can organize the structure of the website in a more better way. Also your website becomes much more predictive for visitors because of the URL's.

    Example :

    www.domain.com/hobbies/photography
    
    0 讨论(0)
  • 2020-12-21 00:50

    First of all you really need to make sure that a rewrite is worth the effort. In my experience rewrites take much more work than expected and have a long payback time. That doesn't mean they shouldn't be done, it does mean there have to be a really good reasons to start one. The features you mention can easily be implemented in classic ASP in just a fraction of the time. A legacy application are battle scared by tweaks, bugfixes and hidden features. A rewrite generally means losing those years of experience. It all depends on the current features/ new features ratio.

    Secondly, if you are going to rewrite, you might also want to checkout technologies besides asp.net. The site you describe seems to be very content orientated which might better fit django than asp.net mvc. Good luck with your site.

    0 讨论(0)
  • 2020-12-21 01:00

    Definitely go MVC, especially if you're more comfortable as an HTML/CSS guy. Postbacks offer no advantage for a site that is largely static, and it will take months for you to get your head around the page lifecycle (I have yet to meet a developer who was a master of the lifecycle after 6 months of coding in it.)

    Converting an ASP classic site to MVC will basically involve moving your HTML and ASP tags into Views, and replicating your existing URL's using the routing mechanisms. You'll need to upgrade your scripts to use some more modern functionality, but that should be fairly straightforward I would imagine.

    I do disagree with the idea that in MVC everything is pulled from the database - that's a bit irrelevant to the architecture. I've coded 100% static sites in MVC frameworks and loved it :)

    My rule of thumb is trending towards this: "MVC for websites, WebForms for enterprise web applications - maybe."

    0 讨论(0)
提交回复
热议问题