On Thu, Aug 21, 2008 at 2:52 PM, Jim R. Wilson wilson.jim.r@gmail.com wrote:
Jay said:
So the obvious followup question is: is there a plan to migrate the front end to *use the API* to talk to the backend (which is the preferred approach to such things anyway)?
There are times when utilizing the API programatically could make extension development much easier. The last time I looked at the API certain things were hard coded (such as bot limits - yuck) which made it tough/impossible to use in certain extension scenarios. I believe these have been corrected though, so it's probably a good resource for certain classes of extensions.
Someone familiar with the core could always construct a proper $dbr->select() querys, but it would be easier (read: less code) in some cases to let the API classes handle it.
-- Jim R. Wilson (jimbojw)
On Wed, Aug 20, 2008 at 3:20 PM, Roan Kattouw roan.kattouw@home.nl wrote:
Aryeh Gregor schreef:
On Wed, Aug 20, 2008 at 3:24 PM, Jay R. Ashworth jra@baylink.com wrote:
So the obvious followup question is: is there a plan to migrate the front end to *use the API* to talk to the backend (which is the preferred approach to such things anyway)?
One practical issue with this at present is that nobody who does much of anything with core does much of anything with the API. I've barely looked at it at all.
True. Actually, there's a pattern of isolation here. While pretty much all developers are familiar with the 'core' classes (Title, Article, Revision, etc.), very few are familiar with isolated ones such as the parser, the API, the image handling code, the Database abstraction layer (except for select() and similar functions)
As a more philosophical thing, there's no reason for the human UI to call the API. We should have a back-end, and then two interfaces to that: one designed for external robots, and one designed for HTML-viewing humans. Both of the interfaces should use the internal PHP interface to speak to the back-end. The API operates in a format that's suitable for robots to use, not suitable for internal code to use.
Simetrical is right here: the UI and the API call the same functions, and display the results in different ways. That's exactly why there's no sense in migrating the front end to the API (and that's just forgetting about the HTTP overhead involved).
Roan Kattouw (Catrope)
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
PrefixSearch does it (around line 130).
-Chad