[TYPO3-mvc] Libraries in Extbase

Jochen Rau jochen.rau at typoplanet.de
Fri Dec 11 09:30:17 CET 2009


Hi.

schrieb Christian Lerrahn (Cerebrum):
> I'm thinking of splitting our extension eu_sugarcrm into a library
> backend and one or more frontends. However, to not have do redo
> everything again for TYPO3 5, I'd like to use extbase already.
> Effectively the library will be a SOAP/REST wrapper that talks to the
> SugarCRM SOAP (or possibly later REST) interface on behalf of the
> frontend. In essence it is just an abstraction layer. So, maybe from
> what you suggested, that would be a service then?

I suggest to write a Tx_Extbase_Peristence_Storage_SoapStorageBackend 
then. The existing storage backend translates the query coming from a 
Query object into SQL. The SOAP backend does the same for a SOAP call.

By now, it is not possible to replace the storage backend easily. But 
this will be supported in future (did somebody say "Dependency 
Injection"?). Meanwhile you can implement your code inside a

class Tx_MyExt_Persistence_SoapRepository extends 
Tx_Extbase_Persistence_Repository

and then

class Tx_MyExt_Domain_Repository_MyFooModelRepository extends 
Tx_MyExt_Persistence_SoapRepository

If your implementation works nicely we will copy and paste it into 
Extbase ;-)

Regards
Jochen
-- 
Every nit picked is a bug fixed



More information about the TYPO3-project-typo3v4mvc mailing list