Requests for comment/Service split along presentation vs data manipulation line

This RFC calls for a split of backend services between presentation on one side, and data storage and manipulation on the other.

Background
There has been much talk in 2014-2015 about moving toward a service-oriented architecture. One aspect of that strategy should be defining where we want the fissures in our architecture to be, and then defining a strategy for creating a cleaner separation of code along that fissure.

Problem
Currently, we have a lot of code that entangles database manipulation with presentation of the data. This makes it difficult to create different user interfaces that present the same data. For example, the task of creating a mobile application that does the same thing that our desktop code does is hampered by the fact that the desktop code often manipulates the data directly rather than operating through an API that can also be available to the mobile application.

Proposal
Split our backend code that deals with presentation (e.g. HTML generation, such as our skin system) from the code that deals with storage and manipulation of data. This desire may (and should) seem obvious, and is more-or-less stated in more specific proposals (e.g. Redo skin framework and services and narrow interfaces). What this proposal calls for is for us to generally agree on the direction, and then make explicit the desire and urgency to propose and implement solutions in this area.

Comments

 * Yes please. There are numerous advantages to this, from making it easier for first time MediaWiki hackers to write patches by separating presentation from function, making code more modular and reusable and therefore increasing velocity, and increasing the ease with which functions can be exposed via the API. A task of this size is likely going to take quite some time and there will be numerous edge cases, but any progress made would be a massive step forwards. Straw man proposal for first milestone: refactor special pages so that there is no place in MediaWiki where the API has to instantiate a special page in order to function. --Dan Garry, Wikimedia Foundation (talk) 04:11, 16 February 2015 (UTC)