承接 colvin/common-domain-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

colvin/common-domain-php

Composer 安装命令:

composer require colvin/common-domain-php

包简介

Domain structure for shared projects

README 文档

README

Colvin Common Domain is a brand-new composer package 📦 where you could find Core objects that could help you.

Table of Contents

Installation ⚒️

Simply run composer req colvin/common-domain-php. Note you have to be at least in PHP 8 (we are modern people, yup).

Usage 👩‍💻

This package has multiple tools which can be useful. We have taken advantage of the Hexagonal Architecture to organise it, so we have the three typical folders: Application, Domain and Infrastructure:

Application

Here we will find the two definitions of Command and Query, used in architectures like CQRS. They are just abstract implementations of the ActionMessage abstract class. We will cover it soon.

Domain 🌼

Here we'll find the big stuff. We have Exception, Message and Model Folders.

  • Exceptions (surprise 🙀🙀) store exception definitions.
  • In Message we find the definitions of:
    • ActionMessage (used in queries and commands, they are "actions").
    • AggregateMessage. This is the big boy, used to model Domain Events.
    • Message. The mother of all. It ensures all messages have the same structure.
  • In Model we can find different useful Value Objects, and an interesting AggregateRoot. This will be used in our future entities, and it has the ability to record Domain Events.
  • DomainEvent. There is not much to explain here 🦫

Infrastructure 🏗️

As in every Infrastructure HA folder, here we try to manage the relation with external dependencies. There are useful classes, for example; to serialize and deserialize messages following the JSON Api Standard.

Contributing 🤝

Pull requests are more than welcome!. For major changes, please open an issue first to discuss what you would like to change.

Please remember to update tests as appropriate.

统计信息

  • 总下载量: 1.3k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 7
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-10-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固