Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 542085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:24:36+00:00 2026-05-13T10:24:36+00:00

I am a Java Developer making the transition to the C# world. I’ve gotten

  • 0

I am a Java Developer making the transition to the C# world. I’ve gotten a pretty good handle on ASP.NET MVC (and can compare/contrast it to the concepts I learned for Struts).

However, I’m looking for advice on how to structure my project. Currently, I have two solutions in the project: the MVC Web Application and a ClassLibrary section.

The application uses a tiered architecture: Controllers/Services/DAOs. To make things work “right”, I have the Controller and Model classes in the MVC solution, and Services, DAO, and Security in the ClassLibrary solution. Unfortunately, this is causing all sorts of minor issues (example: extending the UserAccount object from the Entity Framework on the ClassLibrary side is ambiguous when I try to extend it on the MVC side for form validation).

The only solution I can come up with is to put EVERYTHING into the MVC project, and organizen what is currently in the ClassLibrary under the App_Code folder. It would solve some issues, but just seems “wrong” to me; my Java projects separated code into a src directory and views (jsp’s) into ta webapp directory.

What do some of the more experienced .NET developers think?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:24:37+00:00Added an answer on May 13, 2026 at 10:24 am

    Generally in .NET solutions, the best bet is to separate code into different projects only if that code may be useful to other applications, or when the code itself represents a complete solution to some problem domain. A class library that is only referenced by one application project is a waste.

    Also, keep in mind that .NET does not allow circular references between objects in two different assemblies (which translates one-to-one with projects usually).

    In your example I would suggest that you consider one class library for the model, services, and security… depending on what you mean when you say “services” though.

    In most cases, data access is somewhat coupled to the concept of the MVC model, so you might consider putting the data access in there too… but if you have a very cleanly separated data access layer it might fit into it’s own class library.

    The controllers and views generally should go into the web project directly.

    In general, my advice is to split stuff into separate projects ONLY when you have an actual “need” to do so. But assemblies and projects are NOT a good way to represent layers or tiers in most applications. Those are logical concepts that don’t always map well to a physical project structure.

    If you design your actual classes well and avoid tight coupling, you can usually move code into class libraries later if a real compelling need does arise.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 382k
  • Answers 382k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You're getting the error because your project is configured to… May 14, 2026 at 10:31 pm
  • Editorial Team
    Editorial Team added an answer You are battling the rulez of SetForegroundWindow(). Note the long… May 14, 2026 at 10:31 pm
  • Editorial Team
    Editorial Team added an answer I've used it with millions of entries and the performance… May 14, 2026 at 10:31 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.