-
Notifications
You must be signed in to change notification settings - Fork 30
/
NOTES
31 lines (19 loc) · 1.33 KB
/
NOTES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Design Notes / Constraints
- All scripts will comform to Unix argument conventions
- All scripts will die immediately on ^C
- All scripts, and framework loads, will take less than 100 ms
- Autoreload will happen by killing and restarting, not in-place
- Releases will follow semantic versioning
- You only call Raptor when you're constructing stuff to return to the framework.
- The framework will avoid inheritance as much as possible (both internally and externally).
## Sanity Notes
- Mutating a record in a presenter is an error
- No two injectables may register the same name
## Testing
- Running request tests generates transcripts of the requests as text files. Reviewing these on commit can reveal unintended changes.
- Add request metatests that duplicate requests that should be idempotent (everything except POSTs) and verify that they actually are. (Good idea?)
## Possible database layer primitives
https://github.com/nateware/redis-objects
## Misc TODOs
Build an example of implementing an access policy at the routing layer. Something like `DocumentAccessRequirement#match?(user, document)`, with a corresponding `:require => document_access` in the route.
Requirements should probably raise/return objects indicating HTTP status code instead of simply matching. That way, an auth requirement can cause a 403 instead of just a 404.