Opened 9 months ago
#4820 new Enhancement
Better routing
| Reported by: | ewinslow | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Near Term Future Release |
| Component: | Core | Version: | 1.8 |
| Severity: | minor | Keywords: | |
| Cc: | brett@… | Difficulty: | easy |
Description
One huge pain point in getting off the ground with an Elgg app is setting up urls. We've had ideas of how this could be improved for a long time.
Cash had some thoughts a while ago that he recorded here: http://trac.elgg.org/ticket/3451
Evan has implemented something here:
https://github.com/ewinslow/elgg-evan#basic-configuration
There is a document discussing API particulars here:
https://docs.google.com/a/elgg.org/document/d/1_UfolZA4PSFsPP2T3yK347tAJvjpYzpStW8XUpLFYWo/edit
My thought for V1:
elgg_register_route($pattern, $path_to_script); elgg_unregister_route($pattern);
No reason to get more complicated than that before we get something into core. It doesn't get us reverse routing; it doesn't get us OO handlers; it doesn't get us auto-validation of inputs; but we don't have any of that right now anyways, so it's not moving us backwards. What it does is make it stupid simple to make a URL pattern run a particular script, which in my view is an absolutely massive leap forward while still remaining backwards compatible.
