On 04/11/2014 12:06 PM, Sumana Harihareswara wrote:
> So, just to clarify, this is NOT a discussion of overhauling the
> outward-facing MediaWiki web API -- that's taking place in
> https://www.mediawiki.org/wiki/Requests_for_comment/API_roadmap .

The discussion is not about replacing the existing PHP API. We do however
plan to complement it with an outward-facing REST content API as sketched in
https://www.mediawiki.org/wiki/Requests_for_comment/Content_API.

> So the future might look like: the heart of MediaWiki core is PHP code
> that talks to the database 

No, ideally the only code that directly talks to the database would live in
a storage service, which exposes a REST API.

REST is very much about the definition of narrow interfaces, idempotence and
statelessness. Its division of vocabulary into URL-addressed resources and
orthogonal verbs also avoids the need to perform data access through
specialized RPC-style objects [1]. It enforces the use of simple value
objects, which in turn helps to keep interfaces narrow. Those values can --
but don't need to be -- embellished with wrapper objects or service classes
for the consuming code's convenience.

Gabriel

[1]:
https://www.mediawiki.org/wiki/Requests_for_comment/PHP_Virtual_REST_Service

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to