Software design patterns

Software design patterns

A personal opinion on design patterns.

When to use them?

Most code base follow design patterns, even those that are considered to have a high degreed of technical debt. Design patterns are used to solve recurring problems in the business domain. Often time, they are present in the programming languages of choice, for example (c#): extensions methods, Linq, IoC, etc.

  1. Favor design patterns to encapsulate discreet domain business functions that describe the business problems (Clean-Architecture, the architecture scream the domain problem).
  2. For recurring cross-cutting concerns.
  3. To decouple business function implementations from external agencies.
  4. Setting business functions boundaries.
  5. Simplify code base aligned to business function evolution.
  6. Address technical debt and/or implementations that deviate from domain problems.

Use design patterns to simplify the business domain, avoid accidental complexity.

When to refactor?

Refactoring is an ongoing work in progress. Business evolve, so the source code too. Refactor to patterns following the above guidelines.


要查看或添加评论,请登录

Yusbel Garcia Diaz的更多文章

  • Class for Handling Duplicate Message

    Class for Handling Duplicate Message

    Derek Comartin wrote a post about duplicate messages, covering most cases. I wrote a code back in 2023 for handling…

    1 条评论
  • ChatGPT -> Analysis of My Resume

    ChatGPT -> Analysis of My Resume

    I requested ChatGPT a career and impact summary along with role and industry I should target. I like the response: Chat…

  • Data access

    Data access

    Back in 2023 (Off work) and followed on 2024, I wrote a repository class that encapsulate LINQ queries. While this…

    1 条评论
  • Mediator pattern

    Mediator pattern

    I have been criticized for implementing the mediator pattern in many companies. Everyone rightly want to use MediaR.

  • Open to work

    Open to work

    I have been looking for work since the end of Dec 2024. Since then, I started taking courses and applying for work.

  • About me

    About me

    A generic answer to questions about personality and point of view. I'm looking to raise my case to secure a job.

  • Career

    Career

    Brief People who have stepped out of the workforce face a tremendous challenge in getting back to work, regardless of…

    2 条评论
  • Transactional outbox pattern

    Transactional outbox pattern

    Often times, we find ourselves developing a feature that needs to publish an event. On a few occasions, message…

  • Calculate Min and Max

    Calculate Min and Max

    Given an array of integers and a k value to remove k numbers from the array return Min and Max. Example: arr = [1, 5…

  • Decouple components with domain events

    Decouple components with domain events

    A technical building block for decoupling components. Most applications are required to have independent, discrete…

社区洞察

其他会员也浏览了