Skip to content

Instantly share code, notes, and snippets.

@etiennemarais
Created January 8, 2015 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etiennemarais/86a9b3fbfa18c188835b to your computer and use it in GitHub Desktop.
Save etiennemarais/86a9b3fbfa18c188835b to your computer and use it in GitHub Desktop.
Proposed Architecture
// App / app HTTP | commands | console | events
/ Http
/ Commands
/ Messages
/ MessageNewHttpCommand.php
/ Events
/ Messages
/ MessageWasCreatedEvent.php
/ Controllers
/ Messages
/ MessagesFrontController.php -> templates operations (public) / POST from a form
/ Api
/ Commands
/ Messages
/ MessageNewApiCommand.php
/ Events
/ Messages
/ MessageWasCreatedEvent.php
/ Controllers
/ Messages
/ MessagesController.php -> resource endpoint (admin) / REST CRUD
/ Console
...
/ Commands
/ MessageApiCommandHandler.php
/ MessageHttpCommandHandler.php
/ Events
/ MessageWasCreatedEventHandler.php
// Src / src
/ Domain Contracts | Interfaces
/ Core Actual Classes | Implementation
// Framework /framework Exceptions | Traits | TraitInterfaces (Contracts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment