Should I build my next web app in ASP.NET MVC?

前端 未结 7 1945
情书的邮戳
情书的邮戳 2021-02-14 23:20

My team is considering building our next web app using the ASP.NET MVC framework. I am slightly hesitant, as are some others, because it is still only in beta. I really want t

相关标签:
7条回答
  • 2021-02-15 00:01

    If it's not mission critical and you and your team have the time to learn it, why not?

    0 讨论(0)
  • 2021-02-15 00:04

    Unless your app is super simple, it's likely that MVC will be released before you go to production. That hardly matters though. I have been building on MVC since Preview 2. Each new version has contained breaking changes; however, they have not been very hard to track down and fix. It's very unlikely that by 1.0 you could create a mountain of code that would be toppled over by some breaking changes. Simply budget a few person hours to apply each new version.

    0 讨论(0)
  • 2021-02-15 00:20

    I'd recommend giving it a shot.

    We just recently released an e-commerce platform with MVC running the front end, and while there are some gotchas that you may stumble upon (Say, resolving Url's with anonymous types is currently far slower than using a RouteValueDictionary, was a surprise to me), it certainly feels like it was a lot easier to build a manageable system in MVC compared to our older WebForms apps.

    If you have the luxury of choosing, then you should definitely have a closer look. The bugs that have shown up while we worked on it have all been fixed fairly promptly, and most things work well now, and it's starting to feel pretty complete.

    But in the end, it's always a risk to take on an early beta product. :)

    0 讨论(0)
  • 2021-02-15 00:21

    It's a pretty simple decision tree, really.

    Choose ASP.NET MVC if you...

    • Care deeply about URLs
    • Care deeply about your HTML
    • Want true separation of concerns
    • Want testability through and through
    • Want flexibility of view engines (ASPX, NVelocity, NHaml, etc)

    Choose WebForms if you...

    • Enjoy the stateful abstraction of WebForms (ViewState)
    • Don't mind PostBack model
    • Prefer components that you can "drag & drop" on a page

    For me, the answer will 99% be ASP.NET MVC, because I think it is a much better match for the web. I think the ajax story is much cleaner as well, and I have complete control over my HTML & URLs. On top of all of that, I can test-drive my website (controllers) quite easily.

    Yes, I know you can achieve clean URLs in WebForms, and you can have clean(er) HTML through Control Adapters, and you can achieve a level of testability with the MVP pattern in WebForms, but these are all off-the-beaten path approaches. With ASP.NET MVC this stuff is core. That's just the way you do it.

    And don't worry about the preview/beta status. The team has always maintained that you don't need a go-live license to deploy it (even though they now offer one). It's purely additive on the existing ASP.NET Runtime.

    It's like automatic vs. manual transmission. Pick one that makes you happy and run with it.

    0 讨论(0)
  • 2021-02-15 00:21

    So far Mvc looks good, however I m a castle advocate I have used monorail in many production sites and it got me into learning about IoC and AR Cheack out castleproject.org

    0 讨论(0)
  • 2021-02-15 00:24

    I prefer ASP.NET MVC to WebForms, so I would choose that, but you need to work out as a team where your core skill set is and whether or not choosing MVC will:

    1. Create a better product.
    2. Get you to market quicker.

    Don't just choose it because it's new. WebForms is still a great choice, and you can write code for WebForms that's both testable and has clear seperation of concerns.

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