Forums / Cotonti / Core Labs / Archive / Core AJAX support

Selectable AJAX/normal behavior implementation

Trustmaster
#1278 2008-10-23 00:44
The modern Web 2.0 tendencies require that more and more actions on site can be performed without reloading the page: navigating between pages, sending forms and viewing results.

On the other hand, most of websites must be easy to crawl for a search engine. And some users have JavaScript switched off for security. So it is also a must to have a normal, synchronous requests available for them.

Combining both, CMS architects have come up to the idea of duality in CMS behavior, so that there are 2 methods to get the same page: in a traditional full-HTML way and in AJAX contents-only. Of course, it requires much more changes on a client side and the changes are not so dramatic in the core.

Implementing this feature in Seditio-N contains 3 parts:
[list=1]
  • Adding the appropriate logical switches and layout control, depending on presence of AJAX flag in script parameters, in the core PHP scripts.
  • Providing strong core JavaScript API for this AJAX feature (using jQuery).
  • Making skins with support of this feature, utilizing the API.

  • As Seditio layout templates are not XML-based and all the generated output is (X)HTML, such formats as XML or JSON would require massive changes of all the existing code to support AJAX. That is why I think the output format should stay the same (XHTML), what's different is that the core invokes and returns only those parts of the page which are expected to change.

    I would call this feature experimental and I'm going to implement it on a live site first during November and then merge a working version of it into the core.

    And now let the brainstorm begin.
    May the Source be with you!