Software Architecture Problems
From Logic Wiki
Contents
Not Invented Here Syndrome
Collective intelligence will always be smarter than one developer or even a small team. Buy or borrow... don't build it unless you're doing something very special
Examples Include :
- Custom data caching layers
- In-house ORM/Data Access
- MVC Filters with business logic
Too Many Layers
As developers, we like architecture diagrams
We can get caught in the idea that more layers and abstraction layers are better... THEY ARE NOT
File:Layers.PNG
Layers
Integration Problems
Lack of unit tests
You can't determine code quality qithout tests
- Manual testing is good, but doesn't scale
- If you're not running test, your users are your testers
- Writing tests for client-side and server-side code
- When they are different (e.g. web)
- Most code smell originated in lack of testing
- Unit tests are more valuable for regression than creation
Continuous Integration
Building code frequently improves code quality
- Integration problems are surfaced earlier
- Running automated unit tests helps find regression bugs
- Breaking the build should be enforced by shame, not reprimands
- On large teams, this becomes even more important
- You should know the state of your code all the times
Coupling Problems
Dependency Injection
Circular Dependencies
Mistakes in Entity Framework Usage
Lazy Loading Problems : Turning lazy loading to false
in code first approach where context defined :
public class myDbContext : DbContext
{
public myDbContext()
: base("DefaultConnections")
{
this.Configuration.LazyLoadingEnabled = false;
}
.....
}