Hello List, I know MW a little bit but not so well to avoid asking for hints here.
For research purposes, I am surveying code repositories of the top 10 web applications using a modified version of StatSVN.
Basically, I need to track source changes, over releases, in terms of "Lines of Code (LOC) matching a certain regexp".
The functions/lines I am interested in are those somehow involved in handling HTTP request/session/response parameters. Of course, I allow a certain roughness in the analysis.
I am trying to build a list of such functions/lines. What would you suggest to include? What would you grep for if you want to estimate the functions that are, even indirectly, related to processing of HTTP requests/sessions/responses?
Any input is greatly appreciated. Thanks in advance. Cheers,
-- Federico
Maggi Federico wrote:
Hello List, I know MW a little bit but not so well to avoid asking for hints here.
For research purposes, I am surveying code repositories of the top 10 web applications using a modified version of StatSVN.
Basically, I need to track source changes, over releases, in terms of "Lines of Code (LOC) matching a certain regexp".
The functions/lines I am interested in are those somehow involved in handling HTTP request/session/response parameters. Of course, I allow a certain roughness in the analysis.
I am trying to build a list of such functions/lines. What would you suggest to include? What would you grep for if you want to estimate the functions that are, even indirectly, related to processing of HTTP requests/sessions/responses?
Any input is greatly appreciated. Thanks in advance. Cheers,
-- Federico
$_POST/$_GET/$_SESSION/$_REQUEST ? However, MediaWiki encapsulates them, mainly with WebRequest.php
Hello, thanks for your quick contribution. By the way, I was browsing around the repository and, beside its hugeness, I couldn't really find the classic /branches /trunk /tags structure.
Am I pointing my client to the wrong repo?
On Mar 16, 2009, at 3:53 PM, Platonides wrote:
However, MediaWiki encapsulates them, mainly with WebRequest.php
I was looking for exactly this information. Any hint along the line of custom/recurrent/included functions used for HTTP data manipulation is greatly appreciated.
Thanks in advance. Best regards,
-- Federico
Maggi Federico wrote:
Hello, thanks for your quick contribution. By the way, I was browsing around the repository and, beside its hugeness, I couldn't really find the classic /branches /trunk /tags structure.
Have you read http://www.mediawiki.org/wiki/Manual:Download_from_SVN ?
Also, you can browse the source code at http://svn.wikimedia.org/viewvc/mediawiki/ . Note that the core code is found under the somewhat confusingly named trunk/phase3 directory (or tags/REL_x_yy/phase3 for tagged releases). Direct link: http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/
Maggi Federico schreef:
Hello, thanks for your quick contribution. By the way, I was browsing around the repository and, beside its hugeness, I couldn't really find the classic /branches /trunk /tags structure.
Am I pointing my client to the wrong repo?
The /branches, /trunk and /tags structure are at [1] (ViewVC) and [2] (SVN).
Roan Kattouw (Catrope)
[1] http://svn.wikimedia.org/viewvc/mediawiki/ [2] http://svn.wikimedia.org/svnroot/mediawiki/
Maggi Federico wrote:
The functions/lines I am interested in are those somehow involved in handling HTTP request/session/response parameters. Of course, I allow a certain roughness in the analysis.
I am trying to build a list of such functions/lines. What would you suggest to include? What would you grep for if you want to estimate the functions that are, even indirectly, related to processing of HTTP requests/sessions/responses?
Does "HTTP responses" include content generation? I'm going to assume not, since otherwise something most of the codebase will qualify.
The WebRequest instance describing the current request is kept in the global variable $wgRequest -- you may want to grep for that, or for methods specific to the WebRequest class. You'll find that a lot of code uses that class to access things like URL parameters, though.
There's also a WebResponse class (available via $wgRequest->response()), but it doesn't really do much (just duplicates the PHP header() function and provides a wrapper around setcookie() which seems to be called from exactly one place in the code). Anyway, you should catch any uses of it by grepping for $wgRequest, but you should also grep for the standard PHP header() and setcookie() functions.
The WebRequest class also provides functions for accessing session data, but they don't actually seem to be used -- everything just accesses the PHP superglobal $_SESSION array directly.
Also, note that all this is true for the main UI code. The API code (found in api.php and under includes/api) and the AJAX code (includes/Ajax*.php) may do things somewhat differently.
Ilmari Karonen schreef:
Also, note that all this is true for the main UI code. The API code (found in api.php and under includes/api) and the AJAX code (includes/Ajax*.php) may do things somewhat differently.
The API just uses $wgRequest through a wrapper (ApiMain::getRequestParams()).
Hello, I just want to thank everybody who has contributed to my question. Your help is very valuable and straight-to-the-point ;)
Thanks. Best,
-- Federico
On Mar 17, 2009, at 8:44 AM, Roan Kattouw wrote:
Ilmari Karonen schreef:
Also, note that all this is true for the main UI code. The API code (found in api.php and under includes/api) and the AJAX code (includes/Ajax*.php) may do things somewhat differently.
The API just uses $wgRequest through a wrapper (ApiMain::getRequestParams()).
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org