[TYPO3-v4] REST API to CORE Functions
Francois Suter
fsu-lists at cobweb.ch
Sat Mar 13 17:48:16 CET 2010
Hi,
> Sounds good. Having a REST API to connect from 3rd party systems to
> TYPO3 is definitely a good thing.
>
> Also supporting SOAP to connect from TYPO3 to 3rd party systems will be
> useful.
In general I think it would be a good idea to have a mechanism whereby
the TYPO3 BE can receive remote calls.
I actually started doing that in an extension called "remote_server"
(which is in TER). However it's not entirely satisfying. It mimicks what
is done by the AJAX BE call, with some dispatcher script receiving the
call and then calling typo3/init.php to perform all initializations.
That's where things get sticky. init.php is called from a variety of
contexts, with flags acting as bypasses for some operations (like
browser compatibility check, for example). This makes it nearly
impossible to use init.php as is and I had to create a modified version
of it for my extension. The drawback - of course - is that my extension
doesn't automatically benefit from improvements to init.php. So the
situation is far from ideal. It's more a kind of workaround.
What I've been wanting to do for a long time (and that I'm actually
planning to start at the dev days) is to refactor init.php. The idea
would be to split it into small functional parts, that could be included
as needed by various initialization scripts.
This should help in building interfaces for handling remote calls.
I must add to this that handling REST calls or SOAP calls is pretty
different. SOAP calls ideally need to emit a WSDL file describing the
services, while REST is just a question of receiving a request and
sending it back.
There's also the question of requests being one-shots or allowing more
lasting connections (with a login request and an exchange of tokens or
some such afterwards).
Which is why I would rather have a refactored initialization in the Core
that allow people to develop various kinds of extensions for handling
different types of remote calls, rather than having built-in support for
one specific remote request type.
Cheers
--
Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
More information about the TYPO3-project-v4
mailing list