views:

217

answers:

4

Coming from a corporate IT environment, the standard was always creating a class library project for each layer, Business Logic, Data Access, and sometimes greater isolation of specific types.

Now that I am working on my own web application project, I don't see a real need to isolate my code in this fashion.

I don't have multiple applications that need to share this logic or service enable it. I also don't see any advantage to deployment scenarios.

I am leaning towards putting all artifacts in one web application, logically separated by project folders.

I wanted to know what the thoughts are of the community.

+1  A: 

Start with the simplest thing possible and add complexity if and when required. Sounds as though a single assembly would work just fine for your case. However, do take care not to violate the layers by having layer A access an internal member of layer B. That would make it harder to pull the layers into separate assemblies at a later date.

HTH, Kent

Kent Boogaart
A: 

I'd say it depends on how serious you are about testing and unit-testing.

If you plan to only do user/manual tests, or use basically, only test from the UI downward, then it doesn't really make a difference.

On the other hand, if you plan on doing sort of unit-testing, or business rules validation, it definitely makes sense to split up your work into different assemblies.

Even for smaller personal projects, I find this approach makes my life easier as the project goes on. I still run everything from the same solution, just with a web project for the UI, library for the business rules / application logic and another library for the DAL.

Peter Bernier
A: 

You should still separate logically layers into there proper projects.

That is a good engineering practice, whether you are just 1 developer or 100. The negative about the code all in one place is that it is going to make you refactor or duplicate code for expansion.

David Basarab
can you give an example of where I would need to split the code based on refactoring or expansion?
A: 

Let me add more information...

I am writing this application using MVC preview 5, so the unit testing piece will be supported by the separation of concerns inherit in the framework. I do like to have tests for everything!