Low Level Design

Index:

  1. Introduction & Representation techniques
    1. OOAD (Object Oriented Analysis and Design) – CDAC reference
      1. Representation using UML(Unified Modelling Language) notation
      2. For Drawing UML Tools-
        • Offline- StarUML,
        • Online – Diagrams.net
      3. OO Analysis and Design Methodolgy
      4. OO Notation
      5. OO tool to draw OOAD Design
  2. OOP (implementation)
    1. OOP Principal
      1. P.I.E.A.
    2. SOLID
    3. Association, Aggregation, Composition
  3. Design pattern (implementation)
    • Behavioural
    • Creational
    • Structural
  4. Interview Outline

What does a OO Designer needs?

  1. OO Concepts
  2. OO Language
  3. OO Analysis and Design Methodolgy
  4. OO Notation
  5. OO tool to draw OOAD Design

OOAD Techniques

  1. Fusion
  2. Jacobson
  3. Rumbaugh
  4. Booch
  5. Rational Unified Process (RUP) with Unified Modeling Language (UML)

OO Design Tools

  1. Rational Software
  2. StarUML

UML Diagrams for OOAD design using RUP

At core we have Models and using which various representation can be drawn for specific analysis-

  1. Use-case Diagrams
  2. Class Diagrams
  3. Object Diagrams
  4. State-chart Diagrams
  5. Sequence Diagrams

Use Case Analysis – Drawing the Use Case Diagram

My take- useful in case of establishing relation between use-case/functionality

  • Stick Figure Represents Actor
  • Oval Represents Use Case
  • The Rectangle represents System Boundary

Use Case Analysis – Use Case Relationships

3 kinds of relationships between use cases

  1. Include
  2. Extend
  3. Uses

Include:

  1. «include» stereotype indicates that one use case “includes” the contents of another use case.
  2. Enables factoring out frequent common behavior

Use case “A” includes use case “B” if :

  1. B describes scenario which is part of scenario of A &
  2. B describes scenario common for a set of use cases including A

Extends:

  1. «extend» stereotype indicates that one use case is “extended” by another use case.
  2. Enables factoring out infrequent behavior or error conditions
  3. Used to show optional behaviour for a use case which will be required only under certain conditions

Uses:

  1. «uses» stereotype indicates that one use case is precondition for executing another use case
  2. Use case “A” uses use case “B” if
    1. B describes a scenario which is not part of scenarios carrying out service A &
    2. B is a precondition for successful invocation of A

Examples


OOAD: Activity Diagram

Depicts business processes and data flows to model the complex logic within the system


OOAD: Sequence Diagrams

Models the time ordering of messages between classifiers to accomplish given
functionality


UML Diagrams: Collaboration Diagrams

Focuses on the structural organisation of objects that send and receive messages.
Known as communication diagrams in UML 2.0.


UML Diagrams: Class Diagrams

Models a collection of static model elements such as classes, their contents and
relationships


UML Diagrams: State machine Diagrams

Describes states of an object and transitions between the states


UML Diagrams: Component Diagrams

Depicts the components, their interfaces and interrelationships


UML Diagrams: Deployment Diagrams

Shows the execution architecture of the application

Interview Prep

Topics to be covered

  1. Low Level Design
  2. High Level Design
  3. Resources

System Design Resources

Books for HLD

  1. Designing Data-Intensive Application
    • By Martin Klepmann
    • Very Good book for HLD
  2. Insider Guide to SD
    • By Alex xu
    • More specific to Interviews
    • it gives a framework that helps approach a problem
  3. Insider Guide to SD
    • By Maurice Jayson
  4. Solutions Architect
    • Saurabh and Nilanjali Srivastav (pakt publication)
    • more inclined towards architect
    • can refer a few chapters for enhancing knowledge
  5. Fundamentals of Software Architecture
    • Mark Richards (Oreilly publication)
    • more on architecture

Books for LLD (same order can be refereed)

  1. The Object Oriented Thought process
    • By Matt westfield (5TH EDITION)
    • for VERY BEGINNER Who don’t understand class and object and build on Design pattern and SOLID Pattern
  2. Design Pattern: Elements of reusable Object Oriented Software
    • By Gang of four
    • Categorization of patterns
    • How implementation of different pattern can be used
  3. Head First design patterns -Building extensible and maintainable Object oriented software
    • By Eric freeman and Elizabeth
    • with each pattern solve one problem
    • and gives some problem to solve and gives solution to you
  4. Clean Code- A Handbook for Agile Software
    • By Robert martin or uncle bob
    • It talks about maintainable and reusable code
  5. Head First Object-Oriented Analysis and design
    • How in real world the problem is solved is included – extensible and usable to end user.

FAQ
  1. Design BookMyShow kind of App(HashedIn)
    1. based on your input
      • what caching/db to use and why?
  2. Simple in-memory cache,(S)
  3. Design LLD for instagram/Photosharing App
  4. Design a cron jo bscheduler
  5. Design HLD for Twitter system
  6. automated parking lot to minimise the entry and exit times.,(S)
  7. Trafic
    • how will you handle multiple concurrent request not in cache still all going to bacckend
    • search – optimal way to search and partition
    • token generation and submission in optimal way

https://www.geeksforgeeks.org/system-design-url-shortening-service/