Advice on using ASP.net WebForms or MVC

后端 未结 7 1549
無奈伤痛
無奈伤痛 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 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."

提交回复
热议问题