Hans Zaunere wrote:
Ajax solves this problem neatly by letting you move all state [1] into
the browser. This makes sense from an architectural viewpoint because
we are putting this context information close to where it is needed,
the UI.
I'm not sure what you mean, though, by keeping state in the browser.
For example, when a table maintenance form loads up (aka CRUD form),
with simulated tabs, one for browse, one for detail editing. There is a
global object that looks something like this:
x4global.tabs=new Object();
x4global.tabs[x0] = new Object();
x4global.tabs[x0].tabType = 'browse';
x4global.tabs[x0].table_id = 'contacts';
x4global.tabs[x0].columns = 'ssn,first_name,last_name,phone'
x4global.tabs[x0].widgets = new Object();
x4global.tabs[x0].widgets[ssn] = 'x4w_ssn'
x4global.tabs[x0].widgets[ssn] = 'x4w_ssn'
x4global.tabs[x0].widgets[ssn] = 'x4w_ssn'
...
... and so on
This allows the browser to keep a small library of JS code that receives
JSON back from the browser, then it looks at the response to see what it
should do, and uses the x4global object to figure out where to put things.
--
Kenneth Downs
Secure Data Software, Inc.
www.secdat.com www.andromeda-project.org
631-689-7200 Fax: 631-689-0527
cell: 631-379-0010
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php