Talk:Requests for comment/Entry point routing and 404 handling

Jump to navigation Jump to search

Inclined in favor[edit]

I'm inclined in favor, though this can be a bit funky to set up in case of overlapping paths (which are evil, but people often want). A good URL router in general is nice -- we used one in StatusNet and it's fairly pleasant except for some specific oddities -- and using a central entry point is much easier to deal with.

Part of the reason we may have made some of those separate entry points though was to make sure they were lightweight; img_auth.php and load.php for instance may be used quite a bit and shouldn't force loading of lots of extra code.

But, index.php shouldn't be too evil either these days, as long as the code in general is well factored and we're only loading modules we need. --brion 01:17, 9 December 2011 (UTC)[reply]

Yeah, in the change /index.php would end up becoming more of a lightweight entrypoint and just about everything that used to be at index.php would be moved to a different spot. Just list the rest of the entrypoint code.
Basically all of our entrypoints start with that WebRequest bit. And one or two of them with a version test. That's about enough to start things up and ask WebRequest what entry point to route to.
;) As a bonus we'll have php version checks in all of our entry points instead of just the ones we remembered to add them to. And the api code can use wfGetLBFactory()->shutdown(); without having to worry about whether php4 can parse it or not. Daniel Friesen (Dantman) 02:03, 9 December 2011 (UTC)[reply]
+1 sounding good :) --brion 12:53, 9 December 2011 (UTC)[reply]
Also in favor. --Frug (talk) 16:48, 20 May 2012 (UTC)[reply]