views:

101

answers:

3

When you start creating an application or site in ASP.NET MVC, what do you do before typing in that first line of code?

I'm personally fond of creating a new ASP.NET MVC Web Application project and then cleaning out controllers/views until I have what is essentially a blank project (i.e. it runs but doesn't offer functionality). Then I start working on my model and adding controllers/views as needed.

I've also read about starter kits and sample applications but I have not yet started actively working with any of them. However, in my reading I have seen authors suggest that it might be good to start off with an existing template and build on it.

I'm trying to determine if there are better ways of starting off a project such that time is saved and/or the resulting deliverable is of higher quality.

+2  A: 

The other things I do (I also clear out the controller/views etc)

Put an IOC in place. Put ELMAH into the project.

Then I grab a coffee and write my first test.

Kindness,

Dan

PS: At some point I shall get around to creating a template for this so I don't redo it everytime. As soon as I decide upon my favourite IOC. :-)

Daniel Elliott
+1 for ELMAH. it's always good practice to add logging to your app
Black Horus
Thanks, Black Horus
Daniel Elliott
Interesting about the ELMAH - hadn't heard of it but sounds great.
Mayo
+1  A: 

I usually clear out the Content folder as well and put in place a nice CSS reset file and/or a CSS framework like the 960 grid

Victor
+1  A: 

Before starting any type of project you must know what you want to do. So take a sheet of paper and start writing on here:

  • The name of your application
  • Enumerate the features
  • Make a quick draft of the domain model (entities that you are going to have)
  • Try finding the ways (choosing a technology) you are going to do different stuff like: data access, validation (client and server side), logging, IoC, Security, Caching etc.
  • Do a quick draft of all the views you are going to have in your application
  • Identify any other problems you might need to solve/implement/develop and think how are you going to do that
Omu