A Review on Patterns and usage

Omid Eidivandi (XaaXaaX)
2 min readOct 3, 2021

* Software Design Patterns

In the preceding Articles about microservices i discovered some patterns used based on problematic’s category. Here i want to explore some of GoF that will help a microservice will be optimized.

In Componentization we can use some patterns which are based on components , we can achieve the resilience of our product to act nicely with a large scale of functionality but the minimum of code modifications , consider using these patterns:

Composite : It’s helpful to help product manage the components in an hierarchical manner, so any component can be added based on a defined process schema.

Fly-Weight : The components are organized in two different states Intrinsic and Extrinsic , which led the component to be optimized based on its scale of usage.

In Business Capable section we consider using some sort of patterns which led us easily to have business evolution:

Adapter : Helps us to overcome by adding new business entities based on the existing ones , using adapter you have less modifications in all parts of you application , the old entity’s impedance will be kept.

Command : Encapsulating a client request to an object and letting the operation be undoable, by using this pattern the parameterized requests will be lead to business entities easily.

Singleton : I call it as a degradation in software automation as it’s not testable in conjunction with other parts of a system. but it’s useful sometimes.

Object Pool : Keep the system with a pool of objects which can be reusable when the system can go under high request thresholds , consider automating this pattern to switch when the system goes under memory pressure.

Chain of Responsibility : Helps the system handle operations by limiting actors handling it or allowing multiple actors handle the operation.

Bridge : Use bridge vastly to extend the business process in the whole context, by separating abstraction from implementation. it’s widely used in the today’s software but by using carefully and well formed design the business get rich and extensible.(This patterns also covers the evolutionary)

Mediator : Helps entities act and communicate without have any knowledge about dependencies identities.

In Automated Keep track of the product and it’s reliability considering :

Observer : Keep your design extensible by operational aspects so any operation can raise one or more delegated operations so notify the whole service. it’s useful to implement the Sync/Async Queue messaging in a Publish/Subscribe manner .

In Evolutionary consider using :

Iterator : using it the elements of an iterative collection can be treated without exploring their underlying context.

Strategy : Helps have the independent interchangeable algorithms.

State : Same as strategy but based on object state.

Proxy : keeps nature of internal object and its accessibility hidden from the process.

--

--

Omid Eidivandi (XaaXaaX)

i'm a technial lead , solution/softwatre architect with more than 20 years of experience in IT industry,, i m a fan of cloud and serverless in practice