[TYPO3-project-4-3] Speeding up AJAX calls

Ries van Twisk typo3 at rvt.dds.nl
Mon Nov 16 00:55:37 CET 2009


On Nov 15, 2009, at 4:26 PM, Steffen Kamper wrote:

> Hi,
>
> Steffen Ritter made a good suggestion which we should think of:
> If you use AJAX with page-type, you can now use an empty  
> pageRenderer class to speed up the calls. All you need is  
> initialized, but no time is needed for init and render via  
> pageRenderer.
>
> So, should we provide an additional pageRenderer class for:
> AJAX (with type json/text/xml) ?
> which would be selected via TS, like
>
> page = PAGE
> page.typeNum = 123456
> page.renderer = ajax
> page.renderer.format = json
> ?
>
> vg Steffen



Steffen,

I currently do it like this:

ajax_page = PAGE
ajax_page.typeNum = 200
ajax_page {
         config.disableAllHeaderCode = 1
         config.no_cache = 1

         # Now handle the request by the management system
         # we remove the TV object and add the file_management_ajax  
object
        10 < plugin.tx_rvtcouponfeeds_pi1
        10.defaultDisplay=PROMOTIONS_LIST
        10.listPromotions.numRecords=6
}

Going back to your sample,
renderer=ajax doesn't make sense IMHO, Ajax is more like a name and  
use on the Webbrowers site then it's is a renderer.
renderer.format might make sense, but this also means that 'some' code
need to return the data in 'some' format using 'some' API.

Can you explain what renderer=ajax does to speed up the call?


In my sample given I simply set my own header (in this case XML) and  
return it to the web-browser,
then on that page a Javascript is running that fetches the data and  
does something.
Can't be more simple then that :)

What would be nice is that
I could give in the renderer a list of extensions to load,
for example:

page = PAGE
page.typeNum = 123456
page.typeNum.extensionList.1= rvt_myextension
page.typeNum.extensionList.2= rvt_myother_extension

That way, TYPO3 will only load the extensions needed for this 'page'  
call instead of all extensions listed in localconf.php, does that make  
sense?


Ries



			regards, Ries van Twisk

-------------------------------------------------------------------------------------------------
tags: Freelance TYPO3 Glassfish JasperReports JasperETL Flex Blaze-DS  
WebORB PostgreSQL DB-Architect
email: ries at vantwisk.nl        web:   http://www.rvantwisk.nl/     
skype: callto://r.vantwisk
Phone: +1-810-476-4196    Cell: +593 9901 7694                   SIP:  
+1-747-690-5133









More information about the TYPO3-project-4-3 mailing list