WebServiceDesignPatterns

ThoughtStorms Wiki

Read with ThreeTierArchitecture

I think attempts to map ModelViewController onto http are a disaster.

Here are some patterns which seem to be working for organizing web-sites / web-services over http.

*Data And Template

:The classic "insert calls to a datamodel inside a template" which allows the re-use of visual design elements, common navigation elements and information windows etc.

*Representational State Transfer

:See WhatIsRest?

:The UnixPipes model is one which can connect distant web-services. What's needed is a common standard for data. RSS appears to be emerging as a standard candidate for any structured list of data. Raw text is also a candidate.

On the other hand. I can't see how MVC brings any useful insights or convenience to the activity of creating web-services. It mainly adds extra layers as we try to emulate the conditions that make MVC desirable, on top of http. And the only real justification would be if we were trying to make a system where http as a transport protocol needed to be hidden by an abstraction layer so it could later be unplugged and replaced by something else. That may suit Microsoft's attempts to embrace and extend the internet into something proprietory, but doesn't suit anyone else. And it's much easier to make your desktop application speak http than migrate the world to a new layer.

How to do 3-tier enterprise business architecture using the above patterns.

  • Web pages are still templates wrapped around $variableNames
  • but $variableName is a front for a pipe from middleware. Therefore can talk to a remote system. Abstraction standards at the call side are http get or post and at receive site are XML tokens (most likely RSS). When XML, the template can use an XSLT to knock them into suitable presentational form (actually what is needed is only the something to retrieve the XML data elements like XML::Xpath, XSLT is overkill for that –ZbigniewLukasiak).
  • Middleware talks to database back-end the same way. Very light web-server wrapped around DBMS. Data addressed through a URI containing SQL or XPath query.