Re: [Cppcms-users] Multiple class of render()
Brought to you by:
artyom-beilis
From: Christian G. <chr...@gm...> - 2012-06-21 06:31:10
|
> >> >> Is the usage of multiple render class the best solution? >> > > Im not sure what youre trying to accomplish, but cant you solve that with > template inheritance instead of multiple render function? Did you look at > returning JSON instead of HTML? I mean, it kind of makes ajax useless if > you are returning HTML with AJAX as the whole point of AJAX is to diminish > network traffic. > The main problem for my application is the response time if a page change should be done. So in order to improve this situation I only want/need to replace a div DOM object with the loaded content. In general an easy task, but this only works if the whole page gets loaded once. This saves loading of the big main js and css files every time (including parsing etc). A quite good tutorial about pjax can be found here: http://blog.ntotten.com/2012/04/09/building-super-fast-web-apps-with-pjax/ > > Im not sure about the static qualifier of the content object though. > Artyom might have to answer this but i didnt think cppcms::base_content is > thread safe. So you should make sure you arent modifying it anywhere. > Maybe there is an other way of doing it.. may Artyom has an idea. -- Christian Gmeiner, MSc |