1. Overview
In this tutorial, we’ll discuss low-level and high-level design types in software engineering.
2. What Is High-Level Design?
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:
- It specifies database design, systems, services, platforms, and relationships among modules
- It contains a description of hardware, software interfaces, and also user interfaces
- A solution architect creates it
- It details the user’s typical process workflow, along with performance specifications
- It describes significant limitations and trade-offs of the system
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.
3. What Is Low-Level Design?
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:
- It is created by the developer manager and designers
- It involves the actual logic of all the system components
- It includes a step-by-step plan for the system’s implementation
- It works as a guide for developers during coding, ensuring that system functionalities are accurate and efficient
We can say that LLD delves into the technical specifics, translating the high-level design into detailed implementation plans:
4. HLD vs. LLD
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.
5. Conclusion
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.