Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
73 lines (43 sloc) 1.42 KB
Make possibility to use different dispatchers.
Use grammas inheritance to create DSL for uri to call transfer.
Use {*} and Actions as application structure.
Simple translator request to call:
GET /foo/bar?umh=baz
$app.('GET', 'foo', 'bar', :umh => 'baz')
$'GET'), :tags => 'baz')
REST, call HTTP-methods on the resource:
GET /foo/bar?umh=baz
$resource_foo.GET('bar', :umh('baz'))
Resource is object, with HTTP-methods: GET, POST, PUT, DELETE. Use multi methods to cover typical resource manipulations by this methods.
Chains realization:
GET /company/1/offer
$res_company.Link(1, 'offer');
and then
$res_offer.GET('company', Model::Company $company);
We can use types and/or some args to set chains compatibility. And this give use flexibility to have different chains from the same links:
GET /company/1/offer
GET /user/23/offer
Can call GET on the Offer with different args.
see drafts/{,}
One place with rules for dispatchering.
Use arrays with * as simple pattern for action or resource.
['foo', *]
This is usefull for chain actions schema:
['foo', *, 'bar', * ]
see drafts/
Actions as regular Objects
my $action = @parts.reduce: &dispatcher;
Use .* to call all begins, then alll executes and then all ends of actions.
see ./web-framework-roles