Good Programming Practices
I love Onion Architecture since it focused on the domain as the core part of your application.
- Use SOLID Principles:
- Single Responsibility Principle
- Open/Close Principle: Open to extends / Close to change
- Liskov Substitution Principle
- Interface Segregation Principle
- Dependency Inversion Principle
- Don’t put an interface to your Business Logic. For example, if your BLL is about taking payment and send an email, you should inject the services that are responsible to do that, and the BLL simply call those method in a logical way.
- Focus your Testing on Business Logic. For example, don’t test Entity Framework (EF) DbSet<Item>.Add(item); , instead test your BLL _inventoryService.AddItem(item);
http://jaider.net/handy-tricks/#ASP.NET MVC Solution Best Practices