Low Level Design ( Day - 32 )
Introduction to Low Level Design ( LLD )
While High-Level Design (HLD) outlines what the system should do, LLD specifies how it will do it, down to the level of individual classes and data flows
Definetion
Low-Level Design (LLD) is the detailed design phase where each high-level component is broken down into classes, methods, data structures, and interactions.
Three pillars of LLD
1. Scalability
2. Maintainability
3. Re-usability
Scalability: If we want to implement new feature into our application then it should allow to do that, it should not be like if we integrate one feature then other features are down, that’s not good, and if millions of users are coming to our application then it should be scalable enough to handle everyone.
Maintainability: It should be maintainable like it should allow us to add new features with no errors like everything decoupled, if new members are analysing the code then they should understand the code, to maintain it in the future, the code should easily debuggable, like if anything goes wrong then the code should allow us to fix the bug easily.
Re-Usability: Our Code should be like Plug & Play model, it should be reusable to other applications also for example Payment gateways, delivery services, etc…, it should allow developers to integrate to other features also in simple words, the code should be loosely coupled
Difference Between HLD & LLD
| Aspect | High-Level Design (HLD) | Low Level Design (LLD) |
| Scope | System architecture, major components, data flow, external interfaces | Detailed class/module design, data structures, algorithms, and interactions |
| Artifacts | Block diagrams, component diagrams, deployment diagrams | Class diagrams, sequence diagrams, state diagrams, activity diagram |
| Focus | What the system does and where components fit | How each component works internally and how components communicate |
| Granularity | Coarse-grained: services, modules | Fine-grained: classes, methods, variables, data flows |
| Audience | Architects, product owners | Developers, QA engineers |
In simple words DSA is the brain of the software, LLD is its skeleton, and HLD is the architectural blueprint that lays out where all the major “bones” and “organs” will go before you design each individual “bone” (LLD) or define the “nerve signals” (DSA).