phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] Adding ajax (prajax) and a test for it - p


From: Dave Hall
Subject: Re: [Phpgroupware-developers] Adding ajax (prajax) and a test for it - patch #5311
Date: Wed, 16 Aug 2006 13:44:54 +1000

On Tue, 2006-08-15 at 20:51 +0200, Sigurd Nes wrote:
> http://savannah.gnu.org/patch/index.php?func=detailitem&item_id=5311
> 
> I have added a patch (#5311) that ports PRAjax - PHP Reflected Ajax to
> phpgroupware (HEAD) and a demonstration of usage.
> 
> http://prajax.sourceforge.net/
> 
> Check out a fresh copy of 'phpgwapi' and 'hrm' before applying the patch
> with 'patch -p0 < prajax.diff'.
> 
> Install 'hrm' - and go to:
> /~phpgroupware/index.php?menuaction=hrm.ajax_test.index
> 
> The ajax library resides in phpgwapi/inc/prajax
> 
> It is very easy to use - but to compare with 'SARISSA' or 'YUI' - it
> would be nice if someone could write a similar test for them as well.
> 

Sarissa is just a very simple cross browser XHR/XML wrapper so you can
use the same methods on all browsers which support them.  It isn't
really possible to write a test for it.

I am open to suggestions about best we can integrate YUI into phpgw.  I
have spent some time looking at various "ajax toolkits" and found yui to
be the nicest. see http://developer.yahoo.com/yui for more info.  I
haven't looked at how we can make this easier to integrate for
developers (at this stage).

> (The reason for using 'hrm' for testing is just to minimize my effort to
> make this work)
> 
> Any comments ?

Here are my initial comments, without running the demo.  I have only
scanned over the patch.

* Services_JSON is already in the api - class.Services_JSON.inc.php
* prototype is pretty ugly, even tho it can do some nice things
* $phpgw_info['flags']['java_script'] will be deprecated in 18,
  - use the js class instead
* We could look at using ?phpgw_return_as=json (see attached)
  - make sure you are using the latest version of phpgw/index.php

I think PRAJAX is ok, but it hasn't grabbed me as an optimal solution.
A toolkit independent implementation of ajax across phpgw would be the
best solution imho.  You should also notice that there is phpGWlink() in
js now (enabled by default in idots others to follow), so GET based
sessions are fully supported.

We should look at developing some basic "AJAX widgets" that devs can
easily drop in their apps to make easier.

Cheers

Dave
-- 
Dave Hall (aka skwashd)
API Coordinator
phpGroupWare
+-------------------------------------+-------------------------------+
| e address@hidden          | w phpgroupware.org            |
| j address@hidden                 | aim skwashd                   |
| icq 278064022                       | msn address@hidden       |
| sip address@hidden       | y! skwashd                    |
+-------------------------------------+-------------------------------+

Attachment: json_idea.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]