I'm trying to learn some best practices while I ramp up on MVC4. I have a solution with three projects:
- Web: MVC stuff
- Core: Data Model
- Tests: Testing classes
I'm now trying to add:
- Services: Business Logic
This will take logic such as "GetFilteredItems()" from my controllers and place them into a Service project, which depends on Core, and upon which Web depends. Nothing to do with HTTP requests. As I'm beginning to do this, I want to honor single responsibility and create one class per method. My questions:
1) Is this a good approach?
2) Say I need a GetFilteredItems method that takes an ID and returns a List. What's the convention here in terms of naming classes and methods? I can't have a class SampleClass with a method SampleClass() that returns something, right?