[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.
/ wall Public archive

This is simple framework agnostic (backend and frontend) DDD example in PHP. This project is written for exhibition purposes and illuminates different architectural bottlenecks.

Notifications You must be signed in to change notification settings

cn0047/wall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wall

Codacy Badge Maintainability

This is simple wall
where everyone can left any message or advertising or picture or something else...

Technical side of project.

This is simple DDD example in PHP.
This project has high-level abstraction over database, php framework, javascript framework and so on and so forth.

Architecture:

wall
└── src
    ├── 🗂 app                             # Stuff common for all PHP and JavaScript frameworks.
    │   │
    │   ├── 🗂 config                      # All project's configs.
    │   │                                  # Any particular PHP implementation must use these configs.
    │   │
    │   ├── 🗂 implementation              # PRESENTATION LAYER.
    │   │   ├── 🗂 laravel
    │   │   ├── 🗂 phalcon
    │   │   ├── 🗂 plainphp
    │   │   └── 🗂 symfony
    │   │
    │   ├── 🗂 kernel
    │   │   ├── 🗂 Exception               # Kernel exceptions.
    │   │   └── Di.php                     # Simple DIC container.
    │   │                                  # One for any PHP framework implementation (with purpose to support DRY).
    │   │                                  # This DIC also performs common stuff like init bridges, init facades
    │   │                                  # with custom logic which is common for all PHP implementations.
    │   │
    │   ├── 🗂 migrations                  # Framework agnostic DB migrations.
    │   └── 🗂 var                         # Cache, logs, etc.
    │
    ├── 🗂 bin                             # All binary files must be hosted here (artisan, console, migration, etc).
    │
    ├── 🗂 ddd                             # All stuff related to DDD.
    │   └── Wall
    │       ├── 🗂 Application             # 🔰 APPLICATION DDD LAYER.
    │       │   │                          # Any PHP implementation can work only with this layer.
    │       │   │
    │       │   ├── 🗂 Exception
    │       │   ├── 🗂 Service
    │       │   └── 🗂 VO                  # Any request must be represented by VO.
    │       │
    │       ├── Domain                     # 🔰 DOMAIN DDD LAYER.
    │       │   ├── 🗂 Model
    │       │   └── 🗂 Service
    │       │
    │       └── Infrastructure             # 🔰 INFRASTRUCTURE DDD LAYER.
    │           ├── 🗂 FullTextSearching
    │           │   └── 🗂 ElasticSearch
    │           ├── 🗂 Logging
    │           └── 🗂 Persistence         # Implements all domain interfaces and returns canonical DTOs as result.
    │               ├── 🗂 MongoDB
    │               └── 🗂 MySql
    │
    └── 🗂 web                             # USER INTERFACE LAYER (public stuff).
        ├── 🗂 css
        │
        ├── 🗂 html
        │   └── implementation
        │       ├── 🗂 jquery              # Index page for SPA based on jQuery.
        │       └── 🗂 react               # Index page for SPA based on ReactJS.
        │
        ├── 🗂 js                          # FRONTEND.
        │   └── implementation
        │       ├── 🗂 jquery              # jQuery scripts.
        │       └── 🗂 react               # ReactJS components, etc.
        │
        ├── 🗂 laravel                     # Laravel entry point.
        ├── 🗂 phalcon                     # Phalcon entry point.
        ├── 🗂 plainphp                    # PlainPHP entry point.
        └── 🗂 symfony                     # Symfony entry point.

About

This is simple framework agnostic (backend and frontend) DDD example in PHP. This project is written for exhibition purposes and illuminates different architectural bottlenecks.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published