simara-svatopluk / cart

Licence: other
Domain-Driven Design shop cart demonstration

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to cart

tdd-demo-forumphp2020
Live coding examples used during Forum PHP 2020 talk "Too many mocks killed the test: What Hexagonal Architecture has changed"
Stars: ✭ 25 (-68.75%)
Mutual labels:  tdd, ddd
Thewisedev Mailing
theWiseDev | API for a squeze page to register users on a mailing list and to email them a bonus (written in Node.js and TypeScript in a Clean Architecture). This project can be used as a reference implementation of the Clean Architecture with Node.js and TypeScript.
Stars: ✭ 145 (+81.25%)
Mutual labels:  tdd, ddd
Event Sourcing Castanha
An Event Sourcing service template with DDD, TDD and SOLID. It has High Cohesion and Loose Coupling, it's a good start for your next Microservice application.
Stars: ✭ 68 (-15%)
Mutual labels:  tdd, ddd
Php Ddd Example
🐘🎯 Hexagonal Architecture + DDD + CQRS in PHP using Symfony 5
Stars: ✭ 1,960 (+2350%)
Mutual labels:  doctrine, ddd
ema
External memory app - allows one to quickly post and search text notes
Stars: ✭ 43 (-46.25%)
Mutual labels:  tdd, ddd
iam-ddd-cqrs-es-nestjs
Identity and Access Management
Stars: ✭ 34 (-57.5%)
Mutual labels:  tdd, ddd
Interviews
A list of fancy questions I've been asked during the interviews I had. Some of them I ask when interviewing people.
Stars: ✭ 140 (+75%)
Mutual labels:  tdd, ddd
symfony-prooph-example
prooph in symfony example
Stars: ✭ 19 (-76.25%)
Mutual labels:  tdd, ddd
Cqrs Clean Eventual Consistency
CQRS, using Clean Architecture, multiple databases and Eventual Consistency
Stars: ✭ 247 (+208.75%)
Mutual labels:  tdd, ddd
Dotnet New Caju
Learn Clean Architecture with .NET Core 3.0 🔥
Stars: ✭ 228 (+185%)
Mutual labels:  tdd, ddd
domain
A collection of entities and helpers for creating domain objects and events
Stars: ✭ 18 (-77.5%)
Mutual labels:  doctrine, ddd
bdd-for-all
Flexible and easy to use library to enable your behavorial driven development (BDD) teams to easily collaborate while promoting automation, transparency and reporting.
Stars: ✭ 42 (-47.5%)
Mutual labels:  tdd, ddd
Ddd Tdd Rich Domain Model Dojo Kata
DDD patterns implemented following TDD
Stars: ✭ 91 (+13.75%)
Mutual labels:  tdd, ddd
Migration
《系统重构与迁移指南》手把手教你分析、评估现有系统、制定重构策略、探索可行重构方案、搭建测试防护网、进行系统架构重构、服务架构重构、模块重构、代码重构、数据库重构、重构后的架构守护
Stars: ✭ 2,753 (+3341.25%)
Mutual labels:  tdd, ddd
Lumen-Doctrine-DDD-Example
Domain Driven Design Application Example, built with Lumen 5.3 and Doctrine.
Stars: ✭ 72 (-10%)
Mutual labels:  doctrine, ddd
Cart
No description or website provided.
Stars: ✭ 22 (-72.5%)
Mutual labels:  ddd, cart
swoole-postgresql-doctrine-driver
🔌 A Doctrine DBAL Driver implementation on top of Swoole Coroutine PostgreSQL client
Stars: ✭ 15 (-81.25%)
Mutual labels:  doctrine
ftgogo
FTGOGO - event-driven architecture demonstration application using edat
Stars: ✭ 82 (+2.5%)
Mutual labels:  ddd
NStore
Opinionated eventsourcing library
Stars: ✭ 81 (+1.25%)
Mutual labels:  ddd
Plastic
This project provides encapsulation of things like Domain, Application Rules, Business Rules or Business Logic in Application.
Stars: ✭ 30 (-62.5%)
Mutual labels:  ddd

Cart

Scrutinizer Code Quality Code Coverage Travis CS & Static Analysis Build Status

Sample project that demonstrates how simple e-shop cart can look like. Created to show how do I understand domain-driven design.

  • Domain objects
  • Layers
  • Unit testing
  • Contract testing
  • Doctrine infrastructure

You can also see how do I program, commit, what technology I can handle...

Dynamic Prices

Prices are not stored in the Cart itself but are loaded on demand. This is a common use-case because we usually need fresh prices from a database or ERP.

Cart is separated from "loading prices" by an interface Prices. This is a domain element but have to be implemented by the project needs - by API calls or database queries.

Fixed Prices

Once we add a product into the cart, the price may be fixed. If it is the project use-case, check out fixed-prices version.

How to Assemble Real Application

We have to implement domain interfaces by our infrastructure, eg. if we use Doctrine, we implement DoctrineRepository, if we use CSV for storing pricing, we implement CsvPrices and so on by the project needs.

Then we register these classes in or favorite DI container. If you don't know how, you can find inspiration in DependenciesTest.

We can use domain objects directly in UI/CLI/target layer, and then we have to pass objects like Repositories to that layer. Or we can wrap domain objects into classes that represent full use-cases. You may call them handlers/facades/useCases/... depending on the project infrastructure.

TDD

This project was written in the spirit of TDD, see commits.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].