Learn through the super-clean Baeldung Pro experience:
>> Membership and Baeldung Pro.
No ads, dark-mode and 6 months free of IntelliJ Idea Ultimate to start with.
Last updated: April 8, 2024
In this tutorial, we’ll discuss low-level and high-level design types in software engineering.
An aerial view of a building shows its overall structure, residential floors, commercial spaces, and amenities and how they connect seamlessly. Similarly, a high-level design (HLD) is like the aerial view of a software system. It defines the overall architecture, major components, and how they interact. We can think of it as the blueprint that lays the foundation for our software architecture.
So, HLD is the outcome of an initial phase of the design process where architects, system designers, or project managers discuss the structure and components of a system at a high level. HLD shows the overall architecture and functionality of the system without delving into implementation details. To learn more about system architecture, check out our article on layered architectures.
Let’s dive into some key characteristics of HLD:
Just like architects focus on the budgets and timeline for their building along with a high-level design, in this phase, we weigh the costs and benefits of architectural design choices for our software. Though focusing on functionality and scalability is important, neglecting the financial and resource implications can result in inefficiencies and budget overruns later in the development cycle. For teams to make informed decisions that align with project goals and constraints, they must also consider these factors. This involves development time, maintenance complexity, infrastructure requirements, and potential scalability issues.
Moving inside the building, we dive into the exact layouts, materials, plumbing, electrical wiring, and more. Similarly, a low-level design (LLD) fleshes out the implementation details of every component specified in an HLD, such as class diagrams, algorithms, database schemas, and error-handling mechanisms.
In simple words, LLD is the next stage in the design process, where designers and developers translate the high-level design into detailed technical specifications.
Some key characteristics of LLD are:
We can say that LLD delves into the technical specifics, translating the high-level design into detailed implementation plans:
So, we have two design types:
Let’s summarize their differences:
| Aspect | Low-Level Design | High-Level Design |
|---|---|---|
| Focus | Detailed implementation specifics | Overall system architecture and design |
| Components covered | Individual components/modules | Major system components and their interactions |
| Design Artifacts | Class diagrams, data structures, algorithms, database schemas, error handling | Architecture diagrams, component diagrams, interface definitions, data flow diagrams |
| Input | High-Level Design (HLD) | Business requirements, constraints, and goals |
| Output | Code-level implementation | High-Level Design (HLD) plan |
| Time of implementation | After HLD, during the coding phase | Early in the software development lifecycle |
| Example decisions | Data structure choices, algorithm design, database normalization | Architectural style (e.g., microservices, monolith), technology stack, integration points |
| Also known as | Macro-level design | Micro-level design |
| Outcome | Review record, function design, and database design | Program specification and unit test plan |
HLD sets the software system’s overarching architecture and functionality, providing a roadmap for development to fulfill the requirements, while LLD deals with the implementation aspects. Our article on requirements contains details on how to differentiate between functional and non-functional ones.
In this article, we explained low-level and high-level software designs. HLD provides the vision, and LLD gives the detailed blueprint for execution. Knowing how to create both plans is essential for successful software development.