sunsetsystems wrote on Thursday, December 13, 2007:
On Wednesday 12 December 2007 21:52, you wrote:
> 1. Do we want to compress the Jquery library?(I’m voting no for now, since it’s
> just 44kb to 20bk, and it’s just another possible source of errors)
I would say to leave this as an install-time decision, and have both
options available.
> 2. Do we still want to include version in jquery source file(jquery121.js)?
> (I’m thinking this may be a good idea, since jquery is updated frequently and
> functions seem to be frequently discontinued)
I think that’s a good idea.
> 3. Where do we want to put the library? (/openemr/library/js?)
Works for me.
> 4. How should we organize newly created ajax functions/objects?
> As an example, for the acl administration function I’m working on(check my previous
> message to download the most updated source if you want). Again, I’m just learning
> this stuff and now have/plan these files:
>
> adminacl.php
> -client side, planning to only put client stuff here(CSS, jquery, ajax calls)
> -Goal is to have no php in this file, and change to adminacl.js before
> committing
Any special reason to start it as a .php file at all? It’s good to
put any large amounts of JavaScript into .js files, because then the
browser can cache it.
> adminacl_ajax.php
> -Server stuff(also where acl checks are done to ensure security)
> -Passes info to client via ajax(via xml, because jquery has excellent processing
> of xml)
> -I’m basically putting all the ajax functions regarding administration of phpgacl
> acl in this file.
>
> user_functions_ajax.php
> -This is not made yet, but planning to put a openemr username collect function
> here.
Fine with me, especially for reusable classes or functions. But try
not to break things up into multiple files needlessly, as that makes
it harder for others to follow.
> So, am wondering if it would be best to put the *_ajax.php files in a specific
> directory, such as pibrary, to allow use by other pages(for example maybe all
> the admin stuff will be on one ajax page in the future or if another page wants
> to use the username collect function)
I guess we’ll have to figure it out as we go along. Apply common sense,
and strive for simplicity.
Rod
www.sunsetsystems.com