Software Design Pattern
- Main Principles:-
- KISS (Keep it simple & Stupid)
- SOLID Design Principles
- Regular Expression
- Twelve-Factor App methodology
- YAGNI (You Ain't Gonna Need It) principle
- Inversion of Control (IoC)
- Law of Demeter: The principle of Least knowledge (only use one dot).
- Composition over inheritance
- Creational Patterns (design patterns that involve instantiating concrete objects.):-
- Factory:-
- a pattern that delegates concrete instantiation to a method of a subclass.
- http://www.itlec.com/2017/05/factory-design-pattern.html
- https://github.com/ITLec/FactoryDesignPattern
- Dependency Injection:-
- Xamarin.Forms
- How Xamarin Handle Multiple Platform In One Code?
- Dependency Injection & Service Locator Example
- Builder.
- Lazy Initialization.
- Prototype:-
- Uses it when creating an instance of a given class is either expensive or complicated.
- Examples:-
- Copy, DeepCopy of an object
- Singletone:-
- Repository:-
- usually in the midlle between your BAL and DAL, we use it to make it easier in testing.
- Object Pool aka Recycle Bin
- Structural Patterns (design patterns that describe how objects are connected to one another.) :-
- Adapter:-
- a design pattern that connects two incompatible interfaces by fitting between them and providing a compatible interface to both.
- Example
- Bridge (abstraction++):-
- decouple an abstraction from its implementation
- Composite:-
- a design pattern for composing nested structures of objects and dealing with these objects uniformly.
- https://www.dofactory.com/net/composite-design-pattern
- Decorator (Wrapper):-
- the decorator pattern is a design pattern that allows behavior to be added to an individual object, dynamically, without affecting the behavior of other objects from the same class.
- Attaches additional responsibilities to an object dynamically.
- Provide a flexible alternative to sub-classing for extending functionality.
- Example: http://www.itlec.com/2019/06/decorator-design-pattern-example.html
- Facade:-
- a design pattern that involves encapsulating a complex system in a simple interface.
- Flyweight:-
- A space optimization technique that lets us use less memory by storing externally the data associated with similar objects.
- Use it when one instance of a class can be used to provide virtual instances.
- Save memory.
- Front Controller.
- Marker.
- Proxy
- Twin
- Anti-Corruption Layer:-
- Behavioral Patterns (design patterns that focus on how objects distribute work.):-
- Blackboard.
- Chain of responsibility:-
- a behavioural pattern for allowing multiple entities to handle requests.
- Example: http://www.itlec.com/2019/05/chain-of-responsibility-design-pattern.html
- Command:-
- a behavioural pattern for encapsulating requests as objects.
- Example: http://www.itlec.com/2019/06/command-design-pattern.html
- Transaction Command Design Pattern Example.
- Interpreter:-
- Compiler
- Business Rule Engine
- http://www.itlec.com/2019/08/business-rule-engine-linq-expression.html
- Iterator.
- Mediator:-
- a behavioral pattern in which a central object coordinates the activities of many objects (colleagues).
- For Example: Chat room, Broker
- Null Object.
- Observer:-
- a behavioural pattern for event handling.
- Publish / Subscribe
- Servant.
- State:-
- a behavioural pattern for handling requests taking into account the current state of the object.
- normal implementation in large switch statements should be avoided by implementing each case of the switch statement in a separate class.
- Strategy(aka Policy pattern):-
- a class behavior or its algorithm can be changed at run time.
- Instead of using inheritance, you can use behavior interface variable and add setter to those variables.
- Rule Design Pattern:-
- Most popular example is "Discount example".
- Template Design pattern:-
- a behavioural pattern that allows for similar behaviour to be inherited by multiple subclasses
- How To Implement Template Design Patter Using C#
- Visitor:-
- Use it when you want to add capabilities to a a composite of objects and encapsulation is not important.
- http://www.itlec.com/2021/01/visitor-design-pattern.html
- Memento:-
- provides the ability to restore an object to its previous state.
- Examples:-
- Undo, Restore.
- Provider Pattern :- create pluggable components.
- Context object Design Pattern
- Unit of Work Pattern: usually work with repository pattern to apply set of actions on each CURD operation.
- Concurrency Patterns:-
- Active Object. (Actor, Concurrent Object) - Behavioural patter.
- https://www.dre.vanderbilt.edu/~schmidt/PDF/Act-Obj.pdf
- Balking.
- Block Chain.
- Double-Checked Locking.
- Event-based asynchronous.
- Join
- Lock.
- Monitor Object.
- Reactor.
- Read-Write Lock.
- Scheduler.
- Thread Pool.
- Task-based asynchronous:-
- await/ async
- Architectural patterns:-
- Event Sourcing Pattern
- MVC:-
- stands for Model, View, Controller. A pattern that separates data, display, and control functions into separate roles.
- Is a compound pattern, usually consists of:-
- Observer (model uses observer pattern to keep view/controller/observer updated and decoupled).
- Strategy (Controller is strategy for the view, so the view can use different implementations of the controller to get different behavior).
- Composite (view uses the composite pattern to implement the user interface which usually consists of nested components like panels, frames, buttons…).
- MVVM
- MVP
- VIPER
- N-Tier
- Data Access Object:-
- ORM
- MS Entity Framework:-
- Active Record
- Data Transfer Object (DTO):-
- Simple class which contains only the fields with simple getter& setter. without any business inside it.
- are simple objects that should not contain any business logic but may contain serialization and deserialization mechanisms for transferring data over the wire
- Interceptor
- Service Locator
- Presentation Layer Design Pattern:-
- Intercepting Filter Pattern:-
- Example: Dynamic Filter https://www.c-sharpcorner.com/article/dynamic-filter-by-using-intercepting-filter-pattern/
- Front Controller Design Pattern
- View Helper Pattern
- Composite View Pattern
- Business Layer Design Pattern:-
- Business Delegate Pattern.
- Service Locator
- Session facade pattern
- Transfer object pattern
- Integration Design Pattern:
- Data access object pattern
- Web Service Broker Pattern
- Data Access Patterns:-
- Repository pattern
- Unit of work
- Lazy load
- Transaction Patterns:-
- Outbox pattern
- SOA Patterns:-
- Canonical model:-
- used to communicate between different data formats.
- Distributed & Scalable Design Patterns/ Algorithms:-
- Enterprise Service Bus ESB
- Microservices Design Patterns:-
- Domain Driven Development
- Aggregator:-
- a service that receives a request, then makes requests of multiple services, combines the results and responds to the initiating request.
- Three ways to implement aggregator:-
- Scatter Gather Pattern
- Chained Pattern:-
- slower pattern than scatter gather pattern.
- Branch Pattern
- Proxy
- Circuit Breaker
- Materialized View Pattern
- Domain Driven Design
- Saga Pattern
- Transactional Outbox Pattern
- 2PC: Two-phase commit protocol:-
- Mainly depends on transaction coordinator, which response for commit/rollback.
- ServiceMesh
- Network Design Patterns:-
- DMZ
- Cloud Design Pattern:-
- Compensating Transaction pattern
- Backends for Frontends pattern
- CQRS (Command Query Single responsibility)
- K8S Multi-Container Design Patterns:-
- Sidecar pattern:-
- eg. file puller
- Ambassador pattern:-
- eg. proxy server.
- Adapter pattern:-
- Transform the application output standardize/ normalized it for aggregation.
https://www.youtube.com/watch?v=LTE6BWfjOUo&list=PLZ9NgFYEMxp4pM7cZTe48udxbI1fR0zbM
https://refactoring.guru/design-patterns
Reference:-
https://en.wikipedia.org/wiki/Software_design_pattern#Creational_patterns
http://www.itlec.com/2016/03/software-design-patterns.html
https://www.javatpoint.com/jee-or-j2ee-design-patterns
https://www.coursera.org/learn/design-patterns
https://patterns.arcitura.com/soa-patterns
https://www.coursera.org/learn/design-patterns
https://patterns.arcitura.com/soa-patterns
https://docs.microsoft.com/en-us/azure/architecture/patterns/
COMP9054: Software Architecture & Design
SOFT8025 - Scalable Microservices
Software Architecture Fundamentals: A Study Guide for the Certified Professional for Software Architecture
Last update: 20250112
ReplyDeleteHi there to every , for the reason that I am truly eager of reading this blog's post to be updated regularly. It includes fastidious data. gmail login email
This blog is part of Big family "www.ITLec.com".
DeletePersonally I can confirm that "I will update post till I retired this job".
I hope you and all others come back again and again.
What's up, just wanted to tell you, I enjoyed this post. It was helpful. Keep on posting! outlook 365 email login
ReplyDeleteSure, I am updating this post regularly
DeleteHere are some tips you ought to take note of before obtaining an advertisement loan:. canada mortgage calculator Repaying your mortgage will take quite a long time, regardless that repayment strategy you go along with. mortgage payment calculator canada
ReplyDeleteDesign pattern is an important concept to learn as they simplify the design and architecture of applications and systems. Problems based on design patterns, data structures and algorithms are frequently asked in programming interviews. Thank you for sharing your valuable knowledge. Great blog. Data structures and algorithms course
ReplyDeleteGreat Post with valuable information. I am glad that I have visited this site. Share more updates.
ReplyDeleteIELTS Coaching in Chennai
IELTS Coaching in Tambaram
en son çıkan perde modelleri
ReplyDeleteen son çıkan perde modelleri
uc satın al
özel ambulans
lisans satın al
nft nasıl alınır
yurtdışı kargo
minecraft premium
ZModeler 3.4.1 Build 1194 Crack is a powerful application, it can make 3D models for video games, you can also effortlessly make models for other uses. Zmodeler 3 License Crack
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteFirst day of school quotes your education is AN integral element of your living since the primary day of faculty to the last. School First Day Wishes
ReplyDelete