Can anyone summarize or bulleted list the types of things that go in each layer, and what layers are there in an MVC type design if you account for Dependency Injection?
I haven't found any clean diagrams that help me figure out where or try to go more in detail without writing an entire book.
I've been doing windows forms apps (including the sql server database design) for 3 years now as my sole function at work , with no one more experienced over me. I have been trying to break things apart into clean layers as much as I can figure my way through on my own based on presentation, business, database.
However based on reading the samples of Dependency Injection in .net it appears that the business logic should be the heart of the application with a separate layer that points to the specific database implementation. So then the ui goes in the presentation layer, controller just provides an abstraction/mapping layer to what the ui is allowed to do in the model layer, the business logic goes in the model layer, and the database/linq-to-sql goes in the database layer. Where everything can depend on the model layer, but it should depend on nothing.
To enable you to move the heart from X type to:
- Windows forms
- Asp.net
- Asp.net MVC
- Silverlight
- Anything else
right? Would a 4 layer/project approach cover this type of thing? I suppose it would be 5 if you add a TDD layer.
I'm not averse to reading books, but I have plenty to read ( 3 at home, 1 at work, 3 ordered, 1 for college) already that are quite thick. Both of these approaches have resounding supporters but seem to conflict on overall design.
- Extreme programming
- windows forms in action
- The productive programmer(75% done)
- User interface design for programmers (90% done)
- Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries (2nd Edition) - at work that I got from code camp
- The Art of Unit Testing - The Art of Unit Testing with Examples in .NET Roy Osherove
- Operating systems concepts with java - for a master's in computer science class
- C# in depth(not release yet)
- Functional Programming for the real world(not released yet)