Srikar Doddi
Srikar Doddi

Reputation: 15609

How do you organize your web application project in Visual studio?

+1 if you are specific to ASP.NET MVC projects.

Update 9:42 PM:

I am thinking about this from now as I need several developers across the globe to work on this project. We will be using VS 2010 and I heard some thing about web application templates.

Upvotes: 2

Views: 770

Answers (2)

John Farrell
John Farrell

Reputation: 24754

I'm going to answer with a semi technical anser instead of posting the subjective way I organize projects. IMHO there is a severe case of "Projectitus" in the .NET world where everybody makes a new project for logical organization reasons. Use namespaces for that.

Do not make a project unless there is a physical reason for you to do so. A perfect reason to create a new project is that many solutions need access to a single assembly and need to debug against it.

This may by subjective but also do not make any new projects for deployment reasons. Single .dll hotfixes are indicative of issues with your development and deployment cycle. Like Scott Hanselman said "If you are deploying with XCopy ( or Explorer I think ) you're doing it wrong. ;)

Upvotes: 3

griegs
griegs

Reputation: 22770

I have several projects

  1. the mvc web application
  2. the data repository
  3. custom attributes
  4. custom extensions
  5. helpers
  6. models
  7. tests

inside my web application i create a "PartialViews" folder in each view folder and register that path in global.asax

this works really well for me and i've used it for about 5 projects now.

For validation of my object model i use DataAnnotations in the repository.

[MetadataType(typeof(Company_Validation))]
public partial class Company
{
}

public class Company_Validation
{
    [Required(ErrorMessage = "Required")]
    [DisplayName("Company Name")]
    public string name { get; set; }

    [DisplayName("Company display color")]
    public string color { get; set; }

Upvotes: 1

Related Questions