You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bill Holloway <bi...@gmail.com> on 2007/07/30 01:14:09 UTC

T5: Javascript abstraction musing

It seems tapestry.js works this way, so I'm sure someone has thought of
this...

I wonder if a prototype "interface" in javascript could be a path to
plugging in whatever javascript library you want, at least at some level of
functionality.  Such as:

var Tapestry = {

     xhrSend: function (/* some arguments */) {
          // your library's code for this...
     },


     coolVisualEffect: function (/* some arguments */) {
          // again, your library's code for this.
     }
};

In your app, you would provide the implementation of this "interface" via an
IoC contribution along with a contribution of the Asset containing your
particular plugin library itself.  Could not all the "ajax" tapestry
functionality be built on this?

Naively,
Bill

Re: T5: Javascript abstraction musing

Posted by Kristian Marinkovic <kr...@porsche.co.at>.
hi bill,

i posted a related comment on 
https://issues.apache.org/jira/browse/TAPESTRY-1650
maybe you can take a look on it.... 

g,
kris




"Bill Holloway" <bi...@gmail.com> 
30.07.2007 01:14
Bitte antworten an
"Tapestry users" <us...@tapestry.apache.org>


An
"Tapestry users" <us...@tapestry.apache.org>
Kopie

Thema
T5: Javascript abstraction musing






It seems tapestry.js works this way, so I'm sure someone has thought of
this...

I wonder if a prototype "interface" in javascript could be a path to
plugging in whatever javascript library you want, at least at some level 
of
functionality.  Such as:

var Tapestry = {

     xhrSend: function (/* some arguments */) {
          // your library's code for this...
     },


     coolVisualEffect: function (/* some arguments */) {
          // again, your library's code for this.
     }
};

In your app, you would provide the implementation of this "interface" via 
an
IoC contribution along with a contribution of the Asset containing your
particular plugin library itself.  Could not all the "ajax" tapestry
functionality be built on this?

Naively,
Bill