Created
June 28, 2012 22:51
-
-
Save xsawyerx/3014497 to your computer and use it in GitHub Desktop.
Dancer design graphs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.---------. | |
.----------.----------| Handler |--------.--------. | |
| | | '---------' | | | |
| | | | | | | |
| | | | | | | |
v v v '-> v v | |
.-----. .-----. .-----. .------------. .------. .-------. | |
| App | | App | | App | | Serializer | | Hook | | Route | | |
'-----' '-----' '-----' '------------' '------' '-------' | |
* There is a single handler. | |
* The handler includes multiple apps. | |
* Any serializer, hook and route (and a few other components) can global. | |
* They affect each other. A hook affects all routes across all apps. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.--------. | |
| Runner | | |
'--------' | |
| | |
v | |
.--------. | |
| Server | | |
'--------' | |
| | |
.---------|---------. | |
v v v | |
.-----. .-----. .-----. | |
| App | | App | | App | | |
'-----' '-----' '-----' | |
| | |
.-------------|----------. | |
| | | | |
| | | | |
v v v | |
.------------. .------. .-------. | |
| Serializer | | Hook | | Route | | |
'------------' '------' '-------' | |
* A runner is a singleton since only one runner can exist at any given time. | |
* A server is a singleton since only one server can exist at any given time. | |
(a concept of multiple runners, each running multiple servers, sounds | |
interesting, but unfeasible at the moment) | |
* A server can include multiple Apps. Apps are basically packages with Dancer | |
code. | |
* Each app can include serializers, hooks, routes, and more. | |
* Each serializer, hook and route is confined to that app. Nothing is shared. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment