Skip to content

Instantly share code, notes, and snippets.

@sevos
Created December 19, 2011 07:57
Show Gist options
  • Save sevos/1495987 to your computer and use it in GitHub Desktop.
Save sevos/1495987 to your computer and use it in GitHub Desktop.
MVC isn't enough!

MVC is not enough for backend apps. It's time for car (t)rap!

  • C as Context (former controllers). Assigns roles to actors, runs the play.

  • A as Actor - user, system, external system

  • R as Role - DCI role injected to Actor by Context. User: [buyer, inviter], system: [shop, blog]

  • T as Template - html, json, xml, whatever. It's optional, sometimes Presenter does the job

  • R as Router - we need something parsing requests and passing them to proper context

  • A as Artifact - product of actor's action. Order, invoice, product, post, profile. Persistence goes here

  • P as Presenter (former helpers)

@andrzejkrzywda
Copy link

sounds great :) T and P may duplicate each other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment