Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC - Is it viable for small web outfits?

Tags:

asp.net-mvc

I work for a small website company (couple of programmers, couple of designers). Currently we use ASP.NET website projects - this makes it easy for me to sort the programming out on my local machine, while the designers work directly on a development server and the 'on-the-fly' compilation allows them to see any changes made without having to compile and deploy the website (and all tied up with SVN).

I'd like to start using ASP.NET MVC for pretty much all the reasons that makes it different from Webforms (logical urls, no viewstate, more control over html, unit testing etc..) but don't want to make the dev process over complicated, so:

  • Any reasons you can't set MVC websites up as website projects instead of Apps so they don't have to be explicitly compiled throughout the dev process? (Our 'live' websites all use web compilation projects anyway).
  • Will this still allow unit testing?
  • Is there any other way of allowing the designers to develop MVC sites in the same way as they currently do? Note: They use Dreamweaver, so no Cassini development server.

Can anyone advise with any of the above (even if only to tell me my dev process makes no sense.. :)

Thanks.

like image 247
Nick Avatar asked Jan 12 '09 17:01

Nick


People also ask

Is ASP.NET MVC still relevant?

ASP.NET MVC is no longer in active development. The last version update was in November 2018. Despite this, a lot of projects are using ASP.NET MVC for web solution development. As to JetBrains' research, 42% of software developers were using the framework in 2020.

Should I always use MVC?

Basically, MVC serves well when you have an application that needs separation of the data(model), the data crunching(controller), and the presentation of the data(view). This also serves well in an application where the data source and/or data presentation can change at any time.

Why ASP.NET MVC is lightweight?

Complex web application + tight schedule = ASP.NET MVC. asp.net mvc doesn't have any concept of view state. This is one of the reason why mvc called light weight.

Which is better ASP.NET or ASP.NET MVC?

ASP.NET requires less expertise than MVC and is much faster to develop web applications overall. Prior knowledge of HTML is not required. ASP.NET uses a more mature code-base and has a larger web control toolbox. It's more sensible to use ASP.NET if you are already relying on 3rd party UI controls.


2 Answers

ASP.NET MVC is a great platform no matter what type of project. If you already understand the basics of HTTP and how websites actually work ASP.NET MVC will be like the thing missing from your life. If you're used to the postback model of ASP.NET WebForms it may be a little harder to grasp at first but it's very easy to understate. It's basically a stateless model. Your controller is given some parameters, it writes back some HTML... end of story until the next request.

  • I don't think so, and I think the reason for this was to allow bin-deployable ASP.NET MVC projects. You can publish an ASP.NET MVC app straight from Visual Studio 2008 without the end server ever even having to know about ASP.NET MVC, as long as it has ASP.NET 3.5 (with SP1 I think)
  • ASP.NET MVC is all about unit testing, it's extremely flexible in this matter and even some of the design decisions behind ASP.NET MVC are based off allowing users to unit test their code. Scott Guthrie specifically names unit testing in the latest release of ASP.NET MVC (beta) http://weblogs.asp.net/scottgu/archive/2008/10/16/asp-net-mvc-beta-released.aspx#six
  • Any controls that work with ASP.NET WebForms will work with ASP.NET MVC as long as it does not rely on postback. If it does than you cannot use that control/code.

MVC is a proven design pattern for websites and even the very one you posted your question on is based on ASP.NET MVC and was built by only a few people and is now maintained by 1 (one) person (soon to be 2). I currently am using it for 3 private projects and I love it. I've seen the light and I will never go back to WebForms.

Resources:

  • Scott Guthrie's blog
  • Phil Haack's blog
  • Rob Conery's blog He has created an MVC Storefront demo over 25+ videos.
  • Scott Hanselman's blog
  • Stephen Walther's blog
  • PDC08 ASP.NET MVC Session Session was with Phil Haack and Jeff Atwood (creator of this site).

HTH!

like image 159
Chad Moran Avatar answered Nov 16 '22 01:11

Chad Moran


I used to be an ASP.NET developer. Recently I started developing with Django and do so with one other developer remotely via SVN. I find that MVC frameworks make small projects even easier, and larger projects a lot less painful than oldschool ASP.NET did.

Templates are far easier to control and style than the web controls in ASP.NET. Separation of logic (beyond the code-behind methodology) makes it easier for more than one person to be working on different parts of the site at the same time. RESTful design centered around actions starts making a lot more sense after having to deal with ASP.NET page life cycle issues long enough. Also, the URL-driven routing and the ability to do reverse lookups means fewer hard coded links in your code, its easier to add new sections to your site, etc.

To answer some of your questions:

  • I'm not sure about live compilation, but its easy enough to write some simple deployment tools to automate this process.
  • Unit testing is often easier on an MVC framework thanks to actions in controllers compartmentalizing the logic much better.
  • ASP.NET MVC allows you to use webforms as the default template language, but I'd advise looking into cleaner templating languages such as NVelocity. Any HTML-centric templating system is going to be better than webforms because of how difficult it is to tame and style even simple aspects of web controls.
like image 37
Soviut Avatar answered Nov 16 '22 01:11

Soviut