Course contentsShow
← Software Engineering
Lesson 1263 of 1,93338. Layered and Modular ArchitectureFree lesson

Limitations and Alternatives to Layers

Recognizing tight coupling to data models and rigidity as motivations for vertical slicing approaches.

Limitations and Alternatives to Layers

You'll learn why layered architectures can create tight coupling to data models and why that drives teams toward vertical slicing approaches.

The Problem with Layer-First Thinking

In classic layered architectures, you organize code horizontally: presentation layer, business logic layer, data access layer, and database. This sounds clean, but it creates an insidious problem: everything revolves around the database schema.

When your data model sits at the foundation, every feature must flow through all layers just to reach it. Changes ripple upward—modify a database column, update the data access layer, adjust business logic, change the UI. This "horizontal slicing" means touching multiple layers for every feature.

Tight Coupling to Data Models

The presentation layer often mirrors database tables through DTOs. The business layer passes data structures that look suspiciously like database rows. This creates rigid, database-centric thinking where your entire application becomes a thin wrapper around CRUD operations.

Analogy: Imagine organizing a company by job function—all designers together, all developers together, all testers together. To ship one feature, you need approvals and handoffs across every department. Slow and frustrating.

The Alternative: Vertical Slices

Instead of organizing by technical layer, organize by feature or business capability. A vertical slice contains everything needed for one feature: UI code, business logic, data access—all together in one module.

This approach reduces coupling to the data model because each slice can structure data however that feature needs it, not how the database dictates.

Key Takeaway

Layered architectures can become overly coupled to database schemas and rigid across features, motivating vertical slicing approaches that organize code by business capability instead of technical layer.