Yes i like the idea of abstraction and it makes sense that way but I
was thinking more along the following lines:
weblocks.js:
   function applyEffect(type, targetEl) {}

weblocks-jquery.js:
   window.applyEffect = function(type,targetEL){....} /* jquery impl
*/

weblocks-prototype.js
    window.applyEffect = function(type,targetEL){....} /* prototype/
scriptaculous impl */

That way the lisp code will only add the required implementation
rather then all of them and hence make the js code smaller. Also it
would probably make debugging easy.

What do you think?

Mackram
On Jul 1, 9:27 pm, "Leslie P. Polzer" <[email protected]>
wrote:
> Mackram wrote:
> > basically i am asking why not port shortcut (I can understand datagrid
> > would be called by its respective widget and hence does not explicitly
> > get called in applicaiton).
>
> Shortcut isn't tied to a particular backend, it's self-sufficient.
>
> And a small note: we (or initially you, whichever you prefer)
> need to define an abstract API for the js backend that needs
> to be implemented by each one.
>
> Example:
>
> /* abstract as used by Weblocks files */
> function applyEffect(type, targetEl) {}
>
> /* prototype/scriptaculous impl */
> function applyEffect(type, targetEl) {
>   switch (type) {
>     case 'fade':
>       Effect.fade(target);
>     break
>
>   // ...
>
> }
>
> /* jquery impl */
> [...]
>
> That should also resolve your question about datagrid.js
> and dialog.js: they may remain in the standard application
> dependencies and need to be converted to use the abstract
> API.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to