Forums / Discussions / AJAX (jQuery) + eZ Publish: Demystified!

Monday 06 June 2011 2:00:16 pm - 2 replies

Introduction

This is a short tutorial about using the powerful combination of AJAX (jQuery) and eZ Publish. Please note this was also originally released before the REST API was developed for the current community release of eZ Publish.

» Read full blog post

Author Message

Ivo Lukac

Friday 10 June 2011 12:17:17 pm

Hi Brandon,

Very nice job and thanks for the reminder about the eZ Find tutorial :)

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Gaetano Giunta

Monday 13 June 2011 12:56:44 am

Good introduction!

A couple of devious alternatives, that might be worth exploring:

  • xml or json, to be consumed by ajax calls, can be produced by templates too. Using an url similar to /layout/set/json/content/view/json/57, and providing the corresponding templates, you can make ajax calls that fetch the data by using a "proxy" node as service provider. Benefit: you get the caching opportunities of the template system. Downsides: templates are slower to execute than pure php code, at least on 1st run; this can only be used by default to view data, not to manipulate it (unless you produce json/xml templates for other views than content/view). An extension that provides xml and json templates to get you started quickly on this path: ggxmlview
  • the ezwebservicesapi extension (which can use either ezjscore or ggwebservices for the transport layer) allows developers to access all existing template fetch functions (including custom ones) without having to write a single line of code. It can be a great timesaver for the ajax developer. Ps: it even allows to execute existing modules/views using ajax calls, but the results can be quite surprising, depending on the module.

Principal Consultant International Business
Member of the Community Project Board

You must be logged in to post messages in this topic!