3

Currently I'm in the very beginnings of the planning stages of a project I was hired to take part in. It's fairly large, but small enough to be handled by 1 or 2 programmers and a handful of others (for design, marketing, etc.). Mostly the designers and marketers are working on their plans right now, but I have to start thinking about how I'm going to approach it.

I think I'm going to use C# and ASP.NET MVC 3 to build it. I'm familiar with C# and the MVC pattern, but haven't done a big project with this particular technology before. I'd like to build a "checklist" of things I need to look at, buy, become familiar with, etc. before starting the project:

  • Database: I'm assuming that MS SQL server is the standard to use with .net, but: for larger projects, do I need to upgrade from whatever is free/comes with VS2010 express? What steps do I need to take in designing the database for use with MVC? Or LINQ?
  • Testing: What testing framework is best for this type of application? What testing methodologies should I consider for a web application? How should I approach testing the models and views? Is there a difference between testing controllers from testing a class in any other application?
  • Development: Is there a particular pattern/patterns which mesh well with MVC development? Do I write the models first, then the controllers? The views first, then the models? Controllers first? How do I write the application to allow for easy update rollouts?
  • Deployment: What is involved in deploying a .net web application? Do I need to purchase IIS? What should I look into before deployment, wrt configuring the production server? How do I roll out updates with minimal downtime?
  • Etc.: Is there anything else I should be aware of? Costs? Caveats? Books/websites I should read before ever launching VS?
1
  • Just curious, but why is this question, asking for a checklist for mvc3 project, closed as not a real question, while this (programmers.stackexchange.com/questions/51553/…) question asking for a checklist for an open-source project received 32 upvotes?
    – Forty-Two
    Commented Oct 24, 2012 at 18:12

2 Answers 2

1

Tools - Visual Studio 2010 http://msdn.microsoft.com/en-us/library/ee410104.aspx#adding_projects_and_items

Database: doesn't really mater but to keep it simple and cheap download SQL Server 2008 R2 Express and the management tools.

Data Layer - Create a separate project which complies a DLL "Windows Class Library" reference this project to your Web Project, consider using EF4, Linq-2-SQL to connect to database a simple data access class:

namespace myProject.Data
{
  public partial class Product
  {
    public static Product GetById(int productId)
    {
      using(var dbContext = new DataContextEntities())
      {
        return dbContext.Products.Where(x=>x.ProductId == productId).FirstOrDefault();
      }
    }

    public static List<Product> GetAll()
    {
      using(var dbContext = new DataContextEntities())
      {
        return dbContext.Products.ToList();
      }
    }

  }
}

Testing nUnit or visual studio testing if your using a full version.

Development simply use the MVC pattern provided with the framework, although you could take a look at Unit Of Work pattern for the Data layer or Factory Pattern for the Controllers, but keep it simple if your not very familar with the framework or patterns. Good example to is ScottGu http://nerddinner.codeplex.com/

Source Control Microsoft Team Foundation Server, tortoise hg mercurial, subversion and etc. all are good.

Deployment IIS 7 comes with Windows Vista, 7 Professional and above but for the live box Windows server 2003 and above is best. You'll need to host the website somewhere so find host internal or external e.g. webcentral

Cost web hosting can range from $10 to thousands depending on your needs. Visual Studio 2010 Express is free, full edition can be thousands.

2
  • 1
    What is the benefit of having the data layer in a separate project? And why is Windows server 2003 better than IIS 7? Commented Jun 10, 2011 at 5:52
  • (data Layer) flexibility, able to re-use for another project and most importantly dependency injection. I said "Windows Server 2003 or above" I'd prefer Windows 2008 R2, sometimes you don't have a say in the server infrastructure. I agree IIS 7.0 is much better than II 6.0.
    – Nickz
    Commented Jul 4, 2011 at 2:33
2

Database - even if you develop on MS SQL Sever, you typically have a license only for development needs. From scalability standpoint, it is perfectly suitable for large projects.

Testing - no matter what testing framework you choose, rest assured MVC is designed with testability in mind. The architecture is very modular and easy to write test against.

Development - just use good OOP practices. The framework already guides you in the right direction.

2
  • So before I deploy I'll have to buy a licence to use SQL server? Would it be better to just buy a better version with more features? Commented Jun 10, 2011 at 5:53
  • Not necessarily. You might buy a hosting which already has SQL Server license included. Just something to keep in mind. Commented Jun 10, 2011 at 17:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.