Giter Club home page Giter Club logo

domain's Introduction

Build Status Quality Score Software License Coverage Status Code Climate Join the chat at https://gitter.im/RayRutjes/domain

What is this package?

This package aims to provide you with a bunch of interfaces, abstract classes and concrete value objects which will speed up your project's domain design.

This package is intended to be used, and enriched by following the Domain Driven Design approach.

Installation

composer require rayrutjes/domain

We will use strict Semantic Versioning starting from version 1.0.0.

Until we reach that stage, we will allow BC breaks in minor releases, so that we get a package that reflects the DDD way of solving problems as much as possible.

Requirements

This package is supported on PHP 5.4 and up, but also PHP-HHVM.

Php xdebug extension is required to run phpspec tests.

Naming conventions

Because the classes provided by this package will be used in the Domain Layer of applications, it is necessary that we write down some conventions.

  • The getters of your entities should not include the "get" prefix.
  • The getters of your domain events should not include the "get" prefix.

Note that this list has to be completed with some conventions that make sense from a DDD perspective.

DDD encourages code readability, and in that regard, it feels more natural to read:

$product->price();

Than it would with a "get"ter prefix.

Feel free to contribute to this list of conventions.

Contributing

SOLID code

To make some great code, you should follow the SOLID principles.

Coding standards

Please verify that you are using the coding standards as defined in PSR-1 and PSR-2.

Run the PHP Coding Standards Fixer before submitting your code.

Dependencies

If you plan on importing a new dependency into this project, please provide a good explanation. We'll then discuss if the dependency should be included or released as a separate package.

Run the tests

$ vendor/bin/phpspec run

Note that phpspec will need xdebug extension to be enabled in order to produce the code coverage files.

Please check that your code coverage is satisfying by consulting the html files residing in the generated "coverage" folder.

Recommended DDD resources

Books

Concrete Implementations

Todo: Add more references to books, websites, articles and communities as it goes.

domain's People

Contributors

codeatbusiness avatar gitter-badger avatar rayrutjes avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.