承接 theaddresstechnology/ddd 相关项目开发

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

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

theaddresstechnology/ddd

Composer 安装命令:

composer require theaddresstechnology/ddd

包简介

DDD Laravel-structure-generator

README 文档

README

to Install This Package Following this steps:

1-Update your composer.json with following code

   "autoload": {
      "psr-4": {
          "App\\": "app/",
          "Database\\Factories\\": "database/factories/",
          "Database\\Seeders\\": "database/seeders/",
          "Src\\":"src/"
      }
  },

2- run following command :

  composer dump-autoload

3-setup package by writting folowing command :

  composer require theaddresstechnology/ddd

usage

The package provide 2 commands:

1-First command :

  php artisan ddd:directory

after run php artisan ddd:directory will generate src folder in base path this folder contain 3 major folders:

1-Common: this will contain all common folders such as :
    
    1.1-Commands   :folder will contain all console commands files that will generate through project.
    
    1.2-Console    :folder will contain `kernel.php` that where All of your console commands are registered within your application's.
    
    1.3-Exceptions :folder will contain `kernel.php` This class contains a register method where you may register custom exception reporting and rendering callbacks
    
    1.4-Helpers    :folder will contain all helpers files that may need or adding new helper files as you need such as : `main.php`,`Enum.php`
    
    1.5-Http       :folder will contain: 
        1.5.1-Http Folder : Will contain Middleware Folder which will contain All middlewares that will available in project.
        
        1.5.2-kernel.php : This class is used to register your middleware
   
   1.6-Providers   :folder will contain  service providers that will bootstrp your own application such as (DomainServiceProvider,RouteServiceProvider,RepositoryServiceProvider`,HelperServiceProvider,EventServiceProvider,PolicyServiceProvider)
   
2-Infrastructure will contain all infrastucture files that will be base calsses for classes that find in Domain Folder  such as:

    2.1-AbstractModels : contain BaseModel class that all entities  extend from it 
    
    2.2-AbstractProviders :contain ServiceProvider class that all service providers extend from it
    
    2.3-AbstractRepositories :contain basis calsses that all entity EloquentRepository and entity contract repository will extend from it
    
    2.4-Commands :contain basis calss that all commands in project will extend from it
    
    2.5-Contracts :contain BaseRepository class  that EloquentRepository extend from it and scope class that all scopes in class extend from it
    
    2.6-Http : contain basis for Controller,Request,Resource,Factory
    
    2.7-scoping: contain scoper class
    
    2.8-Traits :contain set of traits that will used in app
    
3-Domain Holds the future-domains of the app by default Dashboard And User will be in Domain each domain contain folders 

  3.1-Database contain all migrations ,factotories,seeders entities in Domain
  
  3.2-Entities Contain all entities in Domain besides Traits Folder that contain (CustomAttributes folder contain entityAttributes and Relations Folder contain entity Relations )
  
  3.3-Http contain three folders (Controller ,Request ,Resources) in each folder contain contain logic for aspecific job
  
  3.4-Policies contain policy that declared in domain
  
  3.5-Providers contain providers that related to domain such as  (DomainServiceProvider,RouteServiceProvider,RepositoryServiceProvider`,HelperServiceProvider,EventServiceProvider,PolicyServiceProvider)
   
  3.6-Repositories contain two folder (Contracts,Eloquent) that are included to support l5 Repository
  
  3.7-Routes      contain two folder one for api  and other for web containing (auth,guest,public)
  
  3.8-Resources containing views related to Entites in Domain
  
  3.9-Traits   can declare traits that specific for each domain in it
  
the command will modify the Kenel namespace in the `boostrap/app.php` + overwrite the service-providers namespaces in `config/app.php`

2- second command : php artisan ddd:make {type}

`{type}` can be : 

`Domain` : create new folder in Domain with name that passes in command and will contain three folders (providers,routes,traits,contract)

`Entity` : create new Entity in Entities Folder  in specified Domain

`Repo`   : create new Repository in Repositories folder in specified Domain

`Event`  : create new Event in Events folder in specified Domain and adding to listen in EventServiceProvider in specified Domain

`Listener` : create new Listner in Listners folder in specified Domain and adding to listen in EventServiceProvider in specified Domain

`Resource`   : create a new resource in a specified domain with apecific entity

`Request`     : create a new Request in a specified domain

`Rule`        :create a new Rule in a specified domain

`Migration`    :create a new migration in a specified domain

`Factory`     :create a new factory in a specified domain 

`Seeder`     :create a new seeder in a specified domain

`Notification` :create new notification in aspecified domain

`Controller`   :create new controller in aspecified domain that can be (resource,sac)

`Crud` : [ creates : Entity + DatabaseView + Migration + Factory + Seeder + Views + Datatable + Request + Repo + Resource + Controllers ]

Please note that there are options that may be required in order to create any type and you will be asked throwghout the creation process. Therefore you can run the command above without specify any additional option

theaddresstechnology/ddd 适用场景与选型建议

theaddresstechnology/ddd 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.42k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 04 月 01 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 theaddresstechnology/ddd 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 theaddresstechnology/ddd 我们能提供哪些服务?
定制开发 / 二次开发

基于 theaddresstechnology/ddd 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-01