Api Adept : Your Website. Augmented.

Don't let technical problems KILL your AMBITIONS...

  • visitor badge
  • GitHub Followers
  • YouTube Channel Views
      ___           ___                              ___          _____          ___           ___
     /  /\         /  /\      ___                   /  /\        /  /::\        /  /\         /  /\        ___
    /  /::\       /  /::\    /  /\                 /  /::\      /  /:/\:\      /  /:/_       /  /::\      /  /\
   /  /:/\:\     /  /:/\:\  /  /:/                /  /:/\:\    /  /:/  \:\    /  /:/ /\     /  /:/\:\    /  /:/
  /  /:/~/::\   /  /:/~/:/ /__/::\               /  /:/~/::\  /__/:/ \__\:|  /  /:/ /:/_   /  /:/~/:/   /  /:/
 /__/:/ /:/\:\ /__/:/ /:/  \__\/\:\__           /__/:/ /:/\:\ \  \:\ /  /:/ /__/:/ /:/ /\ /__/:/ /:/   /  /::\
 \  \:\/:/__\/ \  \:\/:/      \  \:\/\          \  \:\/:/__\/  \  \:\  /:/  \  \:\/:/ /:/ \  \:\/:/   /__/:/\:\
  \  \::/       \  \::/        \__\::/           \  \::/        \  \:\/:/    \  \::/ /:/   \  \::/    \__\/  \:\
   \  \:\        \  \:\        /__/:/             \  \:\         \  \::/      \  \:\/:/     \  \:\         \  \:\
    \  \:\        \  \:\       \__\/               \  \:\         \__\/        \  \::/       \  \:\         \__\/
     \__\/         \__\/                            \__\/                       \__\/         \__\/

    

About 8mn to read

HOW IT WORKS:

There are mainly 3 layers :

  • 3 - Infrastructure : Code specific to your favorite CMS (Drupal,Joomla,TYPO3,WordPress,etc...)
  • 2 - Application : Code where you put Interfaces of Repository pattern, Clock Service to alter time
  • 1 - Domain : Code of your Value Objects, your Entities and your Business Rules specific to your Domain

I would like to add 2 more layers which are "horizontal layers" that can be used cross layers on all other layers

  • B - Libraries : PHP Libraries for example from packagist.org
  • A - Internal : PHP Core (or any language used by your component. It's the foundation on everything else depends)

SUMMARY:

Basically a layer MAY depend on itself and/or lower layers

EXAMPLE USE CASE: You own a Digital Marketing Agency

You want to be able to publish your content simultanuously on Drupal, Joomla, TYPO3 and WordPress because
that's what your VIP clients use. So you hire a team of 6 developers aware of DDD best practices. One of them used Joomla and stumbled on this article. How would these principles apply in real life for your agency?

  • 3: Infrastructure

    • Drupal
      • Drupal specific code implementing Application layer code and/or using Domain layer code
    • Joomla
      • Joomla specific code implementing Application layer code and/or using Domain layer code
    • TYPO3
      • TYPO3 specific code implementing Application layer code and/or using Domain layer code
    • WordPress
      • WordPress specific code implementing Application layer code and/or using Domain layer code
      • Your favorite CMS and/or Framework here
      • CMS and/or Framework specific code implementing Application layer code and/or using Domain layer code
  • 2: Application:

    • VIPClient
      • VIPClientRepositoryInterface
      • VIPClientRepositoryServiceInterface
      • ...
    • ClockInterface (Could use PSR-20 from Libraries "horizontal" layer)
  • 1: Domain

    • BusinessRules
      • DeployArticlesToVIPClientsOnly
        • ...
    • Common
      • AbstractValueObject
        • Name
        • Company
        • Role
        • ...
    • VIPClient
      • Reward
        • LifetimeCustomerValue
        • ...
    • ...
  • B : Libraries layer

    • composer packages, npm packages, ...
  • A : Internal layer

    • PHP Core (the language), Javascript (the language), etc...
  • About the author:

    Hi! Alex here,

    Joomla Developer since 2009, focused on Web Services since 2017,

    first in Joomla! 3 with jBackend and com_api

    More recently leveraging Web Services built-in Joomla! core.

    I like paperback format books, challenging projects and defensive cybersecurity "Blue Team".

    You can: