Forums / General / ajax in EZ

ajax in EZ

Author Message

kevin wei

Thursday 12 January 2006 6:43:33 pm

i think it is very useful to integret ajax in ez, such as the button "track changes" in forum, when click it , just the the time of refreash.

and in reply ,use a ajax to do quick reply?

good suggestion or not possible in ez?

Kristof Coomans

Thursday 12 January 2006 10:59:44 pm

We've done this for the "Track changes" button on one of our portals. It uses a module which integrates the xajax library (http://www.xajaxproject.org/) backend with eZ. The backend is extensible, you can register your own functions for use with xajax in an INI file. On the same portal, we've also used xajax to set user preferences.

I'll check with my 'mentor' if I can release this extension to the community.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

kevin wei

Friday 13 January 2006 1:27:30 am

yes, expect your extension very much.

to speed EZ in any aspect is my first issue.

Kristof Coomans

Friday 13 January 2006 6:49:49 am

I've imported my xajax extension into pubsvn: http://pubsvn.ez.no/community/trunk/extension/xajax

A readme is still missing, so you'll have to wait or dig in the code to see how it works. The xajax notification handling functions first need a rewrite because they included site-specific code.

As soon as the readme and the notification handling functions are ready, I will add it to the contributions at ez.no.

Feature requests, bug reports and fan mail are welcome ;-)

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Xavier Dutoit

Friday 13 January 2006 7:59:56 am

Kristof rules !

Does it sounds fan mail enough ? ;)

Unfortunately, the long requested feature on ez forums (contact other members by email) is still on pending on the wishlist, but otherwise you'd be flooded !

Thanks for sharing.

X+

http://www.sydesy.com

Kristof Coomans

Saturday 14 January 2006 1:39:24 am

A related article in my blog:
http://blog.coomanskristof.be/2006/01/14/xajax-extension-enters-pubsvn/

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Bruce Morrison

Monday 16 January 2006 7:02:33 pm

Thanks Kristof

The xajax library looks awesome - good to see it integrated into eZ!

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Paul Forsyth

Tuesday 17 January 2006 1:47:29 am

This looks lovely.

Would it be a good idea for eZ to become involved with extensions of this importance, to refine its design and implementation? I'd like to create dependencies on this extension from my own but my fear is that eZ will create a different and incompatible AJAX toolkit/extension.

Paul

Paul Borgermans

Tuesday 17 January 2006 2:05:53 am

Hi Paul,

What would be the problem if ez systems creates their own ajax toolkit?

This one is not going to be obsolete in the near future anyway, as it makes things very simple due to the abstraction provided by xajax (which is LGPL by the way). Suggestions for refining are welcome too. What did you have in mind in terms of features/functionality?

Best regards

--paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Kristof Coomans

Tuesday 17 January 2006 2:11:48 am

Some new stuff:
- an INI setting to put on the xajax debug switch
- functions to add/remove subtree notifications
- a basic readme with 2 examples (preferences and notifications)

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Xavier Dutoit

Tuesday 17 January 2006 2:57:36 am

Hi,

I might be wrong, but I never saw ez integrating an external library (even LGPL or BSD one) into the ez core.

I would be surprised if ez doesn't add some ajax features somewhere, so I think too this framework and the one ez is giong to publish are going to compete. IMO, this isn't a big problem, as it already happens with several "enhanced" attributes (enhancedselection, enhancedobjectrelation...). That's probably not the optimal situation, as it implies duplicate works, but that's the joy of the opensource ;)

As for the features, there are already a few ajaxed contributions (a new browse, the content menu, gabriel's enhanced forum...). Most are "display only" features (click on something, retrieve some html content from the server, displays it) and I was wondering if/how such features could be based on this extension.

I have to admit I haven't diged the code yet, but would it be possible to call (from javascript) a method on the server with a few parameters, like the template and some others and get the html code ? Like the {include} but remote ?

X+

http://www.sydesy.com

Paul Forsyth

Tuesday 17 January 2006 3:12:43 am

Hi Paul,

I've no problem with eZ making their own toolkit. I would like their involvment so that if they do release their own for v3 or 4 any code changes will be simple and understandable.

I think that with such an important piece of code they naturally should be involved. I dont think any of us can see eZ 4 without major AJAX plumbing.

Paul

Bruce Morrison

Tuesday 17 January 2006 3:39:21 am

Hi Kristof

I've had a play with it today and having written raw ajax code (without the use of a library) this makes things much easier.

- an INI setting to put on the xajax debug switch

Great - was going to implement this myself.

- functions to add/remove subtree notifications

Are these for example only?

The way you have coded the extension it's possible to include settings & code in a second extension. It seems (to me anyway) a good idea to keep the xajax extension itself clean of any eZ or other code and just have it purely exposure the xajax lib.

That way the xajax extension doesn't include things that people may not want. I can see an eZ Admin ajax extension coming....

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Kristof Coomans

Tuesday 17 January 2006 5:06:13 am

I think the functions for adding/removing subtree notifications can be generally used. They only display a JavaScript alert box when the user isn't logged in or when he doesn't have access to the specified node.

Maybe even these commands to show alert boxes can be left away, and instead an optional piece of JavaScript can be executed (see the example code for adding/removing notifications in the readme).

With the functions currently registered by default, xajax is actually used to do some kind of Remote Procedure Call instead of doing fancy stuff with DHTML. What happens in the user interface is up to the JavaScript code in the template. Maybe this is not real Ajax in it's full meaning, but it's the only way to keep the registered functions reusable for other sites.

I agree that functions which can not be generally used by any eZ site, should be in other extensions.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Paul Borgermans

Tuesday 17 January 2006 5:44:11 am

Yes,

An ideally some template functions would be even more 'closing' the Ajax circle for general use features (both preferences and notifications really are for general use). For now, we may add a few templates to include which degrade nicely in case javascript is disabled.

Regards

--paul

 

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Bruce Morrison

Tuesday 17 January 2006 4:27:52 pm

Hi Kristof

With the functions currently registered by default,...

The issue I have with including and exposing these functions by default in the core xajax library is exactly that - these services are exposed by default. If functions are added and they are enabled by default in the extension they have the possibily of clashing names with services from other extensions etc... Perhaps a compromise is not to enable the included functions by default?

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Kristof Coomans

Tuesday 17 January 2006 11:09:05 pm

Hi Bruce (and others of course)

I understand your concerns and finally I think you're right. I will move the functions for preferences and notifications to a seperate extension, this is the best solution.

The examples included in the readme should be updated, because they currently don't fall back to normal behaviour if JavaScript is not available or xajax doesn't support the user agent.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Fraser Hore

Thursday 02 February 2006 10:05:07 am

What about using xajax to speed up adding and editing content? Like adding items to a list?

Ta Da List is a good example. It's very fast. http://www.tadalist.com/

I would love to be able to make ez do this!

Is it in the realm of possibility?

Kristof Coomans

Monday 27 March 2006 1:02:59 am

I released the xajax extension here in the contributions section ( http://ez.no/community/contribs/applications/xajax ).

The notification and preferences xajax functions were removed and will be released later in seperate extensions.

Thanks to Bruce for upgrading the xajax library to version 0.2.3.

Have fun!

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

André R.

Thursday 06 April 2006 3:29:49 pm

Kevin: If you want to speed up eZ take a look at this: http://ez.no/community/forum/developer/template_speed_enhancements_discussion
it's some simple use of Json.

Kristof Coomans: xajax is a great idea for ez, but I hope ez includes a base ajax, effects (moo.fx ??) and xlts javascripts soon. Cause plain html seems more and more boring..

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom