Software Engineering
1. Design Principles
SOLID
- Single Responsibility Principle (SRP)
- Open/Closed Principle (OCP)
- Liskov Substitution Principle (LSP)
- Interface Segregation Principle (ISP)
- Dependency Inversion Principle (DIP)
DRY (Don’t Repeat Yourself)
KISS (Keep It Simple, Stupid)
Other Important Principles
- YAGNI (You Ain’t Gonna Need It)
- Convention over Configuration (CoC)
- Composition over Inheritance
- Law of Demeter (LoD)
2. Design Patterns:
1. Creational:
Pattern Purpose Abstract Factory Create families of related objects without specifying concrete classes Builder Construct complex objects step by step Factory Method Define interface for creating objects, let subclasses decide instantiation Prototype Create new objects by cloning existing ones Singleton Ensure a class has only one instance and provide global access
2. Structural
Pattern Purpose Adapter Convert interface of a class into another expected interface Bridge Decouple abstraction from implementation so both can vary independently Composite Compose objects into tree structures to represent part-whole hierarchies Decorator Add responsibilities to objects dynamically Facade Provide simplified interface to complex subsystem Flyweight Share fine-grained objects efficiently when using large numbers Proxy Provide surrogate/placeholder for another object to control access
3.Behavioral
| Pattern | Purpose |
|---|---|
| Chain of Responsibility | Pass request along chain of handlers until one processes it |
| Command | Encapsulate request as object, enabling parameterization and queuing |
| Interpreter | Define grammar for simple language and interpreter for it |
| Iterator | Provide sequential access to elements without exposing underlying representation |
| Mediator | Define object that encapsulates how set of objects interact |
| Memento | Capture and externalize object's internal state without violating encapsulation |
| Observer | Define one-to-many dependency between objects so all get notified of changes |
| State | Allow object to alter its behavior when internal state changes |
| Strategy | Define family of algorithms, encapsulate each, make interchangeable |
| Template Method | Define skeleton of algorithm, let subclasses override specific steps |
| Visitor | Represent operations to be performed on elements of object structure |
AI Native Software Development:
1. Reference link - https://www.youtube.com/watch?v=9u6xvcNJaxc
Comments
Post a Comment