in reply to Better names for SCRIPT_NAME/PATH_INFO in a web framework?
Hi,
I applaud you for trying to think through this stuff, it is kind of difficult to just jump into stuff like this
Now I feel like like these SCRIPT_NAME and PATH_INFO dating back into past century are awkward. My proposal is to rename this stuff completely:
Don't rename, add new names?
Have you seen https://metacpan.org/pod/Plack::Request#path_info/script_name,
script_name seems like route_name, path_info might be route_raw ... but does a user need these? Does a user only need https://metacpan.org/pod/Mojolicious::Controller#url_for?
get + post is cute, but looks like it should be get_post -- but you probably heard about that already :)
What is causing surprise and awkwardness here?
Separation of concerns (everything, difficult to just jump in)?
For example ->suffix makes no sense
While ->route_suffix sounds like a better name, the purpose of knowing a suffix is a mystery -- why would a new user of your module need that?
Does route return a route object? Something like Routes::Tiny::Match?
I think you're too close to your code, and I'm too far far far away :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Better names for SCRIPT_NAME/PATH_INFO in a web framework?
by Dallaylaen (Chaplain) on Dec 03, 2017 at 00:47 UTC |