You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Paul McMahan <pa...@gmail.com> on 2006/08/11 23:17:42 UTC

AJAX and Geronimo

Dojo is a popular open source AJAX library that's available under the
BSD and Academic Free licenses.  The DayTrader folks use it in the web
UI they recently announced on the Geronimo dev list and Chris used it
in the nice LDAP UI he did for GERONIMO-1823.  I would also like to
start introducing some use of it into the Geronimo admin console when
its appropriate to do so.

The way that developers usually incorporate an AJAX library into their
applications is by making a copy of its static files (javascript, css,
gifs, etc) in their webapp and referencing them from their servlets
and JSPs.  The obvious downside is that each application has a
separate copy of the AJAX library, increasing the server's overall
disk footprint (Dojo is ~3mb) and preventing the browser from using a
single copy of the library files from its cache.  Another downside is
that the AJAX library can't be upgraded independently from the web
application.

I think it would be great if Geronimo could provide a more AJAX
friendly development environment by helping solve these problems.  One
idea is that Geronimo could include the Dojo library as a native,
standalone webapp with its AJAX library files laid out so that other
applications can point at from their HTML.  Referencing it in
geronimo-web.xml would cause Geronimo to start it up and make its
files available at some predetermined context root, say /dojo.
Referencing it with a versionless moduleId would make sure the most
recent version is always used.  So AJAX enabling your application in
Geronimo would be a simple as "add this line to your
geronimo-web.xml".

Does this sound like a good idea?  Any suggestions or concerns?
Perhaps this could be done as a plugin instead of a native module?

Best wishes,
Paul

Re: AJAX and Geronimo

Posted by Paul McMahan <pa...@gmail.com>.
Matt,  yes there will certainly be frequent new versions of Dojo to
fix bugs, broaden browser compatibility, improve performance and
security, etc.  I think if Dojo maintains a decent reputation for
maintaining backwards compatibility that developers will want their
webapp to use the "server provided version" (which they may need to
upgrade using Geronimo's standard deployment mechanisms).  However,
when a developer has hacked their Dojo library or just needs an extra
boost of certainty about their runtime env they can certainly still
include a private copy in their webapp instead of referencing the
server copy.

To me the question of which approach a developer would want to take
(private vs shared version) is analogous to deciding whether or not a
deployment plan should include a version number in its gbean
references (and none of the Geronimo configurations or assemblies do,
AFAIK).

Best wishes,
Paul


On 8/12/06, Matt Hogstrom <ma...@hogstrom.org> wrote:
> How about versioning of the Dojo libraries over time?  I haven't played with the AJAX stuff really
> but I assume we'll be seeing new versions, etc. over time where different applications would be
> looking for different levels of the dojo libraries.  So the goal would be use our "server provided
> version" and override it in your app if you need a newer one?
>
> Paul McMahan wrote:
> > Dojo is a popular open source AJAX library that's available under the
> > BSD and Academic Free licenses.  The DayTrader folks use it in the web
> > UI they recently announced on the Geronimo dev list and Chris used it
> > in the nice LDAP UI he did for GERONIMO-1823.  I would also like to
> > start introducing some use of it into the Geronimo admin console when
> > its appropriate to do so.
> >
> > The way that developers usually incorporate an AJAX library into their
> > applications is by making a copy of its static files (javascript, css,
> > gifs, etc) in their webapp and referencing them from their servlets
> > and JSPs.  The obvious downside is that each application has a
> > separate copy of the AJAX library, increasing the server's overall
> > disk footprint (Dojo is ~3mb) and preventing the browser from using a
> > single copy of the library files from its cache.  Another downside is
> > that the AJAX library can't be upgraded independently from the web
> > application.
> >
> > I think it would be great if Geronimo could provide a more AJAX
> > friendly development environment by helping solve these problems.  One
> > idea is that Geronimo could include the Dojo library as a native,
> > standalone webapp with its AJAX library files laid out so that other
> > applications can point at from their HTML.  Referencing it in
> > geronimo-web.xml would cause Geronimo to start it up and make its
> > files available at some predetermined context root, say /dojo.
> > Referencing it with a versionless moduleId would make sure the most
> > recent version is always used.  So AJAX enabling your application in
> > Geronimo would be a simple as "add this line to your
> > geronimo-web.xml".
> >
> > Does this sound like a good idea?  Any suggestions or concerns?
> > Perhaps this could be done as a plugin instead of a native module?
> >
> > Best wishes,
> > Paul
> >
> >
> >
>

Re: AJAX and Geronimo

Posted by Matt Hogstrom <ma...@hogstrom.org>.
How about versioning of the Dojo libraries over time?  I haven't played with the AJAX stuff really 
but I assume we'll be seeing new versions, etc. over time where different applications would be 
looking for different levels of the dojo libraries.  So the goal would be use our "server provided 
version" and override it in your app if you need a newer one?

Paul McMahan wrote:
> Dojo is a popular open source AJAX library that's available under the
> BSD and Academic Free licenses.  The DayTrader folks use it in the web
> UI they recently announced on the Geronimo dev list and Chris used it
> in the nice LDAP UI he did for GERONIMO-1823.  I would also like to
> start introducing some use of it into the Geronimo admin console when
> its appropriate to do so.
> 
> The way that developers usually incorporate an AJAX library into their
> applications is by making a copy of its static files (javascript, css,
> gifs, etc) in their webapp and referencing them from their servlets
> and JSPs.  The obvious downside is that each application has a
> separate copy of the AJAX library, increasing the server's overall
> disk footprint (Dojo is ~3mb) and preventing the browser from using a
> single copy of the library files from its cache.  Another downside is
> that the AJAX library can't be upgraded independently from the web
> application.
> 
> I think it would be great if Geronimo could provide a more AJAX
> friendly development environment by helping solve these problems.  One
> idea is that Geronimo could include the Dojo library as a native,
> standalone webapp with its AJAX library files laid out so that other
> applications can point at from their HTML.  Referencing it in
> geronimo-web.xml would cause Geronimo to start it up and make its
> files available at some predetermined context root, say /dojo.
> Referencing it with a versionless moduleId would make sure the most
> recent version is always used.  So AJAX enabling your application in
> Geronimo would be a simple as "add this line to your
> geronimo-web.xml".
> 
> Does this sound like a good idea?  Any suggestions or concerns?
> Perhaps this could be done as a plugin instead of a native module?
> 
> Best wishes,
> Paul
> 
> 
> 

Re: AJAX and Geronimo

Posted by Paul McMahan <pa...@gmail.com>.
I definitely agree that browser compatibility is a key issue.  Dojo
claims compatibility with the following browsers:

    * IE 5.5+ (limited supported for 5.5, full support for 6.0)
    * Firefox 1.0+
    * Latest Safari (2.0.x today).
    * Latest Opera (8.5 today, 9.0 soon)
    * Latest Konqueror (3.5 today)

Fortunately, I think our team uses a pretty diversified development
env and can help keep us honest (like we recently saw happen on the
dev list).

Paul

On 8/11/06, Jason Dillon <ja...@planet57.com> wrote:
> If it all works in Safari and Firefox I'm all for it :-)
>
> --jason
>
>
> On Aug 11, 2006, at 2:17 PM, Paul McMahan wrote:
>
> > Dojo is a popular open source AJAX library that's available under the
> > BSD and Academic Free licenses.  The DayTrader folks use it in the web
> > UI they recently announced on the Geronimo dev list and Chris used it
> > in the nice LDAP UI he did for GERONIMO-1823.  I would also like to
> > start introducing some use of it into the Geronimo admin console when
> > its appropriate to do so.
> >
> > The way that developers usually incorporate an AJAX library into their
> > applications is by making a copy of its static files (javascript, css,
> > gifs, etc) in their webapp and referencing them from their servlets
> > and JSPs.  The obvious downside is that each application has a
> > separate copy of the AJAX library, increasing the server's overall
> > disk footprint (Dojo is ~3mb) and preventing the browser from using a
> > single copy of the library files from its cache.  Another downside is
> > that the AJAX library can't be upgraded independently from the web
> > application.
> >
> > I think it would be great if Geronimo could provide a more AJAX
> > friendly development environment by helping solve these problems.  One
> > idea is that Geronimo could include the Dojo library as a native,
> > standalone webapp with its AJAX library files laid out so that other
> > applications can point at from their HTML.  Referencing it in
> > geronimo-web.xml would cause Geronimo to start it up and make its
> > files available at some predetermined context root, say /dojo.
> > Referencing it with a versionless moduleId would make sure the most
> > recent version is always used.  So AJAX enabling your application in
> > Geronimo would be a simple as "add this line to your
> > geronimo-web.xml".
> >
> > Does this sound like a good idea?  Any suggestions or concerns?
> > Perhaps this could be done as a plugin instead of a native module?
> >
> > Best wishes,
> > Paul
>
>

Re: AJAX and Geronimo

Posted by Jason Dillon <ja...@planet57.com>.
If it all works in Safari and Firefox I'm all for it :-)

--jason


On Aug 11, 2006, at 2:17 PM, Paul McMahan wrote:

> Dojo is a popular open source AJAX library that's available under the
> BSD and Academic Free licenses.  The DayTrader folks use it in the web
> UI they recently announced on the Geronimo dev list and Chris used it
> in the nice LDAP UI he did for GERONIMO-1823.  I would also like to
> start introducing some use of it into the Geronimo admin console when
> its appropriate to do so.
>
> The way that developers usually incorporate an AJAX library into their
> applications is by making a copy of its static files (javascript, css,
> gifs, etc) in their webapp and referencing them from their servlets
> and JSPs.  The obvious downside is that each application has a
> separate copy of the AJAX library, increasing the server's overall
> disk footprint (Dojo is ~3mb) and preventing the browser from using a
> single copy of the library files from its cache.  Another downside is
> that the AJAX library can't be upgraded independently from the web
> application.
>
> I think it would be great if Geronimo could provide a more AJAX
> friendly development environment by helping solve these problems.  One
> idea is that Geronimo could include the Dojo library as a native,
> standalone webapp with its AJAX library files laid out so that other
> applications can point at from their HTML.  Referencing it in
> geronimo-web.xml would cause Geronimo to start it up and make its
> files available at some predetermined context root, say /dojo.
> Referencing it with a versionless moduleId would make sure the most
> recent version is always used.  So AJAX enabling your application in
> Geronimo would be a simple as "add this line to your
> geronimo-web.xml".
>
> Does this sound like a good idea?  Any suggestions or concerns?
> Perhaps this could be done as a plugin instead of a native module?
>
> Best wishes,
> Paul


Re: AJAX and Geronimo

Posted by Paul McMahan <pa...@gmail.com>.
Yep you nailed it.  Dojo contains some optional stuff for server
communication that I haven't played with much but its not directly
tied to its core value, which is to make things wiggle. Chris's LDAP
viewer (GERONIMO-1823) is a perfect example where Dojo is used for the
UI and DWR is used for the server comm.

Best wishes,
Paul


On 8/14/06, Aaron Mulder <am...@alumni.princeton.edu> wrote:
> OK, so if I understand this right DWR provides the ability to invoke
> server-side Java APIs and translate arguments and return types between
> JavaScript and Java.  Whereas Dojo provided more graphical bells and
> whistles like the ability to manipulate the page DOM, but only on the
> client side.  So you might use an app-specific DWR transport to call
> something on the server, and then hand off the response to the shared
> Dojo scripts to create some new content on the screen and make it
> wiggle or something.  Is that about right?
>
> Thanks,
>      Aaron
>
> On 8/14/06, Paul McMahan <pa...@gmail.com> wrote:
> > Aaron,  You're correct that this approach wouldn't work for DWR (at
> > least not in a straightforward way) since DWR uses server side classes
> > that need classloader access to the webapp.  But Dojo is different in
> > that it is really just a collection of static resources (javascript,
> > css, images, etc) and does not require any server side communication
> > or even java for that matter.  Developers typically just extract all
> > the Dojo resources into their webapp and load them into the browser
> > via references in their HTML.
> >
> > As a matter of fact Dojo and DWR are quite complimentary to each other
> > since Dojo provides UI controls and DWR provides server communication.
> >  As you know, Geronimo already provides DWR as a jar in the repository
> > that can be shared between webapps and versioned separately from the
> > applications that use it.  Providing this same type of functionality
> > for Dojo is a little more unnatural since its composed of static
> > resources instead of java class files.  But I'm thinking that making
> > the Dojo resources available in a native webapp at a predetermined
> > context provides equivalent functionality except for one limitation:
> > multiple versions of the webapp can not run simultaneously when they
> > use the same context root.  IMHO that limitation is acceptable since a
> > large number of use cases are still supported.
> >
> > Best wishes,
> > Paul
> >
> >
> >
> > On 8/11/06, Aaron Mulder <am...@alumni.princeton.edu> wrote:
> > > I'm not sure what you're planning to do with AJAX, but wouldn't Dojo
> > > need access to classes in the web app?  At least, when we use DWR, we
> > > point it to server-side classes and APIs and it automagically
> > > generates JavaScript wrappers for those.  If so, I'm not sure it would
> > > work to have Dojo deployed at a static location like /dojo in a
> > > standalone web app, because I'm not sure how it would see the
> > > user-specific classes.  Maybe some ThreadContextClassLoader magic?
> > >
> > > Thanks,
> > >      Aaron
> > >
> > > On 8/11/06, Paul McMahan <pa...@gmail.com> wrote:
> > > > Dojo is a popular open source AJAX library that's available under the
> > > > BSD and Academic Free licenses.  The DayTrader folks use it in the web
> > > > UI they recently announced on the Geronimo dev list and Chris used it
> > > > in the nice LDAP UI he did for GERONIMO-1823.  I would also like to
> > > > start introducing some use of it into the Geronimo admin console when
> > > > its appropriate to do so.
> > > >
> > > > The way that developers usually incorporate an AJAX library into their
> > > > applications is by making a copy of its static files (javascript, css,
> > > > gifs, etc) in their webapp and referencing them from their servlets
> > > > and JSPs.  The obvious downside is that each application has a
> > > > separate copy of the AJAX library, increasing the server's overall
> > > > disk footprint (Dojo is ~3mb) and preventing the browser from using a
> > > > single copy of the library files from its cache.  Another downside is
> > > > that the AJAX library can't be upgraded independently from the web
> > > > application.
> > > >
> > > > I think it would be great if Geronimo could provide a more AJAX
> > > > friendly development environment by helping solve these problems.  One
> > > > idea is that Geronimo could include the Dojo library as a native,
> > > > standalone webapp with its AJAX library files laid out so that other
> > > > applications can point at from their HTML.  Referencing it in
> > > > geronimo-web.xml would cause Geronimo to start it up and make its
> > > > files available at some predetermined context root, say /dojo.
> > > > Referencing it with a versionless moduleId would make sure the most
> > > > recent version is always used.  So AJAX enabling your application in
> > > > Geronimo would be a simple as "add this line to your
> > > > geronimo-web.xml".
> > > >
> > > > Does this sound like a good idea?  Any suggestions or concerns?
> > > > Perhaps this could be done as a plugin instead of a native module?
> > > >
> > > > Best wishes,
> > > > Paul
> > > >
> > >
> >
>

Re: AJAX and Geronimo

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
OK, so if I understand this right DWR provides the ability to invoke
server-side Java APIs and translate arguments and return types between
JavaScript and Java.  Whereas Dojo provided more graphical bells and
whistles like the ability to manipulate the page DOM, but only on the
client side.  So you might use an app-specific DWR transport to call
something on the server, and then hand off the response to the shared
Dojo scripts to create some new content on the screen and make it
wiggle or something.  Is that about right?

Thanks,
     Aaron

On 8/14/06, Paul McMahan <pa...@gmail.com> wrote:
> Aaron,  You're correct that this approach wouldn't work for DWR (at
> least not in a straightforward way) since DWR uses server side classes
> that need classloader access to the webapp.  But Dojo is different in
> that it is really just a collection of static resources (javascript,
> css, images, etc) and does not require any server side communication
> or even java for that matter.  Developers typically just extract all
> the Dojo resources into their webapp and load them into the browser
> via references in their HTML.
>
> As a matter of fact Dojo and DWR are quite complimentary to each other
> since Dojo provides UI controls and DWR provides server communication.
>  As you know, Geronimo already provides DWR as a jar in the repository
> that can be shared between webapps and versioned separately from the
> applications that use it.  Providing this same type of functionality
> for Dojo is a little more unnatural since its composed of static
> resources instead of java class files.  But I'm thinking that making
> the Dojo resources available in a native webapp at a predetermined
> context provides equivalent functionality except for one limitation:
> multiple versions of the webapp can not run simultaneously when they
> use the same context root.  IMHO that limitation is acceptable since a
> large number of use cases are still supported.
>
> Best wishes,
> Paul
>
>
>
> On 8/11/06, Aaron Mulder <am...@alumni.princeton.edu> wrote:
> > I'm not sure what you're planning to do with AJAX, but wouldn't Dojo
> > need access to classes in the web app?  At least, when we use DWR, we
> > point it to server-side classes and APIs and it automagically
> > generates JavaScript wrappers for those.  If so, I'm not sure it would
> > work to have Dojo deployed at a static location like /dojo in a
> > standalone web app, because I'm not sure how it would see the
> > user-specific classes.  Maybe some ThreadContextClassLoader magic?
> >
> > Thanks,
> >      Aaron
> >
> > On 8/11/06, Paul McMahan <pa...@gmail.com> wrote:
> > > Dojo is a popular open source AJAX library that's available under the
> > > BSD and Academic Free licenses.  The DayTrader folks use it in the web
> > > UI they recently announced on the Geronimo dev list and Chris used it
> > > in the nice LDAP UI he did for GERONIMO-1823.  I would also like to
> > > start introducing some use of it into the Geronimo admin console when
> > > its appropriate to do so.
> > >
> > > The way that developers usually incorporate an AJAX library into their
> > > applications is by making a copy of its static files (javascript, css,
> > > gifs, etc) in their webapp and referencing them from their servlets
> > > and JSPs.  The obvious downside is that each application has a
> > > separate copy of the AJAX library, increasing the server's overall
> > > disk footprint (Dojo is ~3mb) and preventing the browser from using a
> > > single copy of the library files from its cache.  Another downside is
> > > that the AJAX library can't be upgraded independently from the web
> > > application.
> > >
> > > I think it would be great if Geronimo could provide a more AJAX
> > > friendly development environment by helping solve these problems.  One
> > > idea is that Geronimo could include the Dojo library as a native,
> > > standalone webapp with its AJAX library files laid out so that other
> > > applications can point at from their HTML.  Referencing it in
> > > geronimo-web.xml would cause Geronimo to start it up and make its
> > > files available at some predetermined context root, say /dojo.
> > > Referencing it with a versionless moduleId would make sure the most
> > > recent version is always used.  So AJAX enabling your application in
> > > Geronimo would be a simple as "add this line to your
> > > geronimo-web.xml".
> > >
> > > Does this sound like a good idea?  Any suggestions or concerns?
> > > Perhaps this could be done as a plugin instead of a native module?
> > >
> > > Best wishes,
> > > Paul
> > >
> >
>

Re: AJAX and Geronimo

Posted by Paul McMahan <pa...@gmail.com>.
Aaron,  You're correct that this approach wouldn't work for DWR (at
least not in a straightforward way) since DWR uses server side classes
that need classloader access to the webapp.  But Dojo is different in
that it is really just a collection of static resources (javascript,
css, images, etc) and does not require any server side communication
or even java for that matter.  Developers typically just extract all
the Dojo resources into their webapp and load them into the browser
via references in their HTML.

As a matter of fact Dojo and DWR are quite complimentary to each other
since Dojo provides UI controls and DWR provides server communication.
 As you know, Geronimo already provides DWR as a jar in the repository
that can be shared between webapps and versioned separately from the
applications that use it.  Providing this same type of functionality
for Dojo is a little more unnatural since its composed of static
resources instead of java class files.  But I'm thinking that making
the Dojo resources available in a native webapp at a predetermined
context provides equivalent functionality except for one limitation:
multiple versions of the webapp can not run simultaneously when they
use the same context root.  IMHO that limitation is acceptable since a
large number of use cases are still supported.

Best wishes,
Paul



On 8/11/06, Aaron Mulder <am...@alumni.princeton.edu> wrote:
> I'm not sure what you're planning to do with AJAX, but wouldn't Dojo
> need access to classes in the web app?  At least, when we use DWR, we
> point it to server-side classes and APIs and it automagically
> generates JavaScript wrappers for those.  If so, I'm not sure it would
> work to have Dojo deployed at a static location like /dojo in a
> standalone web app, because I'm not sure how it would see the
> user-specific classes.  Maybe some ThreadContextClassLoader magic?
>
> Thanks,
>      Aaron
>
> On 8/11/06, Paul McMahan <pa...@gmail.com> wrote:
> > Dojo is a popular open source AJAX library that's available under the
> > BSD and Academic Free licenses.  The DayTrader folks use it in the web
> > UI they recently announced on the Geronimo dev list and Chris used it
> > in the nice LDAP UI he did for GERONIMO-1823.  I would also like to
> > start introducing some use of it into the Geronimo admin console when
> > its appropriate to do so.
> >
> > The way that developers usually incorporate an AJAX library into their
> > applications is by making a copy of its static files (javascript, css,
> > gifs, etc) in their webapp and referencing them from their servlets
> > and JSPs.  The obvious downside is that each application has a
> > separate copy of the AJAX library, increasing the server's overall
> > disk footprint (Dojo is ~3mb) and preventing the browser from using a
> > single copy of the library files from its cache.  Another downside is
> > that the AJAX library can't be upgraded independently from the web
> > application.
> >
> > I think it would be great if Geronimo could provide a more AJAX
> > friendly development environment by helping solve these problems.  One
> > idea is that Geronimo could include the Dojo library as a native,
> > standalone webapp with its AJAX library files laid out so that other
> > applications can point at from their HTML.  Referencing it in
> > geronimo-web.xml would cause Geronimo to start it up and make its
> > files available at some predetermined context root, say /dojo.
> > Referencing it with a versionless moduleId would make sure the most
> > recent version is always used.  So AJAX enabling your application in
> > Geronimo would be a simple as "add this line to your
> > geronimo-web.xml".
> >
> > Does this sound like a good idea?  Any suggestions or concerns?
> > Perhaps this could be done as a plugin instead of a native module?
> >
> > Best wishes,
> > Paul
> >
>

Re: AJAX and Geronimo

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
I'm not sure what you're planning to do with AJAX, but wouldn't Dojo
need access to classes in the web app?  At least, when we use DWR, we
point it to server-side classes and APIs and it automagically
generates JavaScript wrappers for those.  If so, I'm not sure it would
work to have Dojo deployed at a static location like /dojo in a
standalone web app, because I'm not sure how it would see the
user-specific classes.  Maybe some ThreadContextClassLoader magic?

Thanks,
     Aaron

On 8/11/06, Paul McMahan <pa...@gmail.com> wrote:
> Dojo is a popular open source AJAX library that's available under the
> BSD and Academic Free licenses.  The DayTrader folks use it in the web
> UI they recently announced on the Geronimo dev list and Chris used it
> in the nice LDAP UI he did for GERONIMO-1823.  I would also like to
> start introducing some use of it into the Geronimo admin console when
> its appropriate to do so.
>
> The way that developers usually incorporate an AJAX library into their
> applications is by making a copy of its static files (javascript, css,
> gifs, etc) in their webapp and referencing them from their servlets
> and JSPs.  The obvious downside is that each application has a
> separate copy of the AJAX library, increasing the server's overall
> disk footprint (Dojo is ~3mb) and preventing the browser from using a
> single copy of the library files from its cache.  Another downside is
> that the AJAX library can't be upgraded independently from the web
> application.
>
> I think it would be great if Geronimo could provide a more AJAX
> friendly development environment by helping solve these problems.  One
> idea is that Geronimo could include the Dojo library as a native,
> standalone webapp with its AJAX library files laid out so that other
> applications can point at from their HTML.  Referencing it in
> geronimo-web.xml would cause Geronimo to start it up and make its
> files available at some predetermined context root, say /dojo.
> Referencing it with a versionless moduleId would make sure the most
> recent version is always used.  So AJAX enabling your application in
> Geronimo would be a simple as "add this line to your
> geronimo-web.xml".
>
> Does this sound like a good idea?  Any suggestions or concerns?
> Perhaps this could be done as a plugin instead of a native module?
>
> Best wishes,
> Paul
>

Re: AJAX and Geronimo

Posted by Paul McMahan <pa...@gmail.com>.
Thanks Jeff.  One goal is definitely to make the admin console more
interactive and user friendly.  I'm also hoping we can go one step
further in making Geronimo more AJAX friendly as a platform.  My
suggestion is that we could take a step in that direction by
separating the Dojo resources into a native web application where they
can be shared by many applications and so AJAX enabled applications
can take advantage of Geronimo's gbean capabilities (versioning,
deployment, lifecycle controls, etc).  These are the basic kinds of
luxuries that developers often take for granted with JAR files, and I
think AJAX developers would like to take advantage of just as well.

Best wishes,
Paul

On 8/11/06, Jeff Genender <jg...@apache.org> wrote:
> Paul,
>
> Yes...this idea has my full support.  The more user friendly and better
> experience of the console only puts us ahead of the game.  The few AJAX
> components we have already (thermometers) has garnered a lot of positive
> feedback, so the more, the merrier ;-)
>
> Jeff
>
>
> Paul McMahan wrote:
> > Dojo is a popular open source AJAX library that's available under the
> > BSD and Academic Free licenses.  The DayTrader folks use it in the web
> > UI they recently announced on the Geronimo dev list and Chris used it
> > in the nice LDAP UI he did for GERONIMO-1823.  I would also like to
> > start introducing some use of it into the Geronimo admin console when
> > its appropriate to do so.
> >
> > The way that developers usually incorporate an AJAX library into their
> > applications is by making a copy of its static files (javascript, css,
> > gifs, etc) in their webapp and referencing them from their servlets
> > and JSPs.  The obvious downside is that each application has a
> > separate copy of the AJAX library, increasing the server's overall
> > disk footprint (Dojo is ~3mb) and preventing the browser from using a
> > single copy of the library files from its cache.  Another downside is
> > that the AJAX library can't be upgraded independently from the web
> > application.
> >
> > I think it would be great if Geronimo could provide a more AJAX
> > friendly development environment by helping solve these problems.  One
> > idea is that Geronimo could include the Dojo library as a native,
> > standalone webapp with its AJAX library files laid out so that other
> > applications can point at from their HTML.  Referencing it in
> > geronimo-web.xml would cause Geronimo to start it up and make its
> > files available at some predetermined context root, say /dojo.
> > Referencing it with a versionless moduleId would make sure the most
> > recent version is always used.  So AJAX enabling your application in
> > Geronimo would be a simple as "add this line to your
> > geronimo-web.xml".
> >
> > Does this sound like a good idea?  Any suggestions or concerns?
> > Perhaps this could be done as a plugin instead of a native module?
> >
> > Best wishes,
> > Paul
>

Re: AJAX and Geronimo

Posted by Jeff Genender <jg...@apache.org>.
Paul,

Yes...this idea has my full support.  The more user friendly and better
experience of the console only puts us ahead of the game.  The few AJAX
components we have already (thermometers) has garnered a lot of positive
feedback, so the more, the merrier ;-)

Jeff


Paul McMahan wrote:
> Dojo is a popular open source AJAX library that's available under the
> BSD and Academic Free licenses.  The DayTrader folks use it in the web
> UI they recently announced on the Geronimo dev list and Chris used it
> in the nice LDAP UI he did for GERONIMO-1823.  I would also like to
> start introducing some use of it into the Geronimo admin console when
> its appropriate to do so.
> 
> The way that developers usually incorporate an AJAX library into their
> applications is by making a copy of its static files (javascript, css,
> gifs, etc) in their webapp and referencing them from their servlets
> and JSPs.  The obvious downside is that each application has a
> separate copy of the AJAX library, increasing the server's overall
> disk footprint (Dojo is ~3mb) and preventing the browser from using a
> single copy of the library files from its cache.  Another downside is
> that the AJAX library can't be upgraded independently from the web
> application.
> 
> I think it would be great if Geronimo could provide a more AJAX
> friendly development environment by helping solve these problems.  One
> idea is that Geronimo could include the Dojo library as a native,
> standalone webapp with its AJAX library files laid out so that other
> applications can point at from their HTML.  Referencing it in
> geronimo-web.xml would cause Geronimo to start it up and make its
> files available at some predetermined context root, say /dojo.
> Referencing it with a versionless moduleId would make sure the most
> recent version is always used.  So AJAX enabling your application in
> Geronimo would be a simple as "add this line to your
> geronimo-web.xml".
> 
> Does this sound like a good idea?  Any suggestions or concerns?
> Perhaps this could be done as a plugin instead of a native module?
> 
> Best wishes,
> Paul

Re: AJAX and Geronimo

Posted by Paul McMahan <pa...@gmail.com>.
Hi Jay, from what I understand cross domain javascript security only
comes into play when the javascript and the html that references it
come from different domains (i.e. different hostnames and/or subnets).
 Unless I'm mistaken I don't think what's been proposed in this thread
would be affected by cross domain security since the webapps and the
Dojo files would be hosted on the same server, albeit under different
contexts.

Thanks for offering to help test this out.  I'll send you a WAR file
containing the Dojo files in a separate email.  You should be able to
deploy the WAR into Geronimo, remove Dojo from your webapp, and then
point your webapp's html at "/dojo/dojo.js".

Best wishes,
Paul

On 8/14/06, Jay D. McHugh <ja...@joyfulnoisewebdesign.com> wrote:
> Hello all,
>
> The application that I am currently developing under Geronimo is using
> Dojo (mostly for it's asynchronous HTTP support).
>
> Because it is a javascript library, there are limitations that come up
> if you ever try to cross domains in your URLs.
>
> Those limitations are basically that you cannot use javascript to access
> a different domain that the one the javascript was called from (at least
> that is how I currently understand it).  They did that to prevent
> cross-site scripting abuse.
>
> But, I do have everything that I need working right now.  So I would be
> more that happy to do testing for pulling the Dojo library out of my war
> files and referencing a single shared library (as long as you use
> version 0.3.1 or higher - the current version).
>
> Jay
>

Re: AJAX and Geronimo

Posted by "Jay D. McHugh" <ja...@joyfulnoisewebdesign.com>.
Hello all,

The application that I am currently developing under Geronimo is using 
Dojo (mostly for it's asynchronous HTTP support).

Because it is a javascript library, there are limitations that come up 
if you ever try to cross domains in your URLs.

Those limitations are basically that you cannot use javascript to access 
a different domain that the one the javascript was called from (at least 
that is how I currently understand it).  They did that to prevent 
cross-site scripting abuse.

But, I do have everything that I need working right now.  So I would be 
more that happy to do testing for pulling the Dojo library out of my war 
files and referencing a single shared library (as long as you use 
version 0.3.1 or higher - the current version).

Jay

Re: AJAX and Geronimo

Posted by Chris Cardona <ja...@yahoo.com>.
Paul,

I tried your suggestion by creating 2 webapps, 1 for
dojo toolkit and another that includes the toolkit and
it worked. I’m just wondering if there is disparity
between 2 webapps where 1 uses the shared dojo toolkit
and another using its own. Right now I couldn’t tell.
Thanks for the suggestion.

chris


--- Paul McMahan <pa...@gmail.com> wrote:

> Chris,  Thanks for offering to help. Since you've
> already got a
> working Geronimo webapp that uses Dojo in
> GERONIMO-1823 I would love
> to see how this idea holds up. How about moving the
> Dojo library from
> your webapp into separate webapp available at the
> context root "/dojo"
> and then adjusting your webapp to point at it? 
> Depending on how you
> referenced Dojo in your scripts and html you may
> have to include a
> line like:
>                 dojo.setModulePrefix("dojo",
> "/dojo");
> after you load dojo.js.  I also figured out a way to
> dynamically load
> dojo.js from a javascript file (instead of html) if
> you that would
> help.
> 
> To start the Dojo webapp and make its resources
> available you would
> also need to add a line to your webapps
> geronimo-web.xml like
>     <dependencies>
>       <dependency>
>         <groupId>dojo</groupId>
>         <artifactId>dojo-toolkit</artifactId>
>         <type>war</type>
>       </dependency>
> 
> Does that sound reasonable? Feel free to take this
> idea and run with
> it, get creative, etc :-)
> 
> Best wishes,
> Paul
> 
> On 8/14/06, Chris Cardona <ja...@yahoo.com>
> wrote:
> > This is a good idea Paul. I'm not exactly sure how
> you
> > would implement it but let me know if I can help
> with
> > anything (testing, dev, docs, etc.). This will
> > definitely help those who wanted to develop Ajax
> > enabled apps in G. Also nice to have is if we can
> find
> > a way to do the same thing for DWR if it's
> possible.
> >
> > Cheers,
> > chris
> >
> >
> > --- Paul McMahan <pa...@gmail.com> wrote:
> >
> > > Dojo is a popular open source AJAX library
> that's
> > > available under the
> > > BSD and Academic Free licenses.  The DayTrader
> folks
> > > use it in the web
> > > UI they recently announced on the Geronimo dev
> list
> > > and Chris used it
> > > in the nice LDAP UI he did for GERONIMO-1823.  I
> > > would also like to
> > > start introducing some use of it into the
> Geronimo
> > > admin console when
> > > its appropriate to do so.
> > >
> > > The way that developers usually incorporate an
> AJAX
> > > library into their
> > > applications is by making a copy of its static
> files
> > > (javascript, css,
> > > gifs, etc) in their webapp and referencing them
> from
> > > their servlets
> > > and JSPs.  The obvious downside is that each
> > > application has a
> > > separate copy of the AJAX library, increasing
> the
> > > server's overall
> > > disk footprint (Dojo is ~3mb) and preventing the
> > > browser from using a
> > > single copy of the library files from its cache.
> > > Another downside is
> > > that the AJAX library can't be upgraded
> > > independently from the web
> > > application.
> > >
> > > I think it would be great if Geronimo could
> provide
> > > a more AJAX
> > > friendly development environment by helping
> solve
> > > these problems.  One
> > > idea is that Geronimo could include the Dojo
> library
> > > as a native,
> > > standalone webapp with its AJAX library files
> laid
> > > out so that other
> > > applications can point at from their HTML.
> > > Referencing it in
> > > geronimo-web.xml would cause Geronimo to start
> it up
> > > and make its
> > > files available at some predetermined context
> root,
> > > say /dojo.
> > > Referencing it with a versionless moduleId would
> > > make sure the most
> > > recent version is always used.  So AJAX enabling
> > > your application in
> > > Geronimo would be a simple as "add this line to
> your
> > > geronimo-web.xml".
> > >
> > > Does this sound like a good idea?  Any
> suggestions
> > > or concerns?
> > > Perhaps this could be done as a plugin instead
> of a
> > > native module?
> > >
> > > Best wishes,
> > > Paul
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: AJAX and Geronimo

Posted by Paul McMahan <pa...@gmail.com>.
Chris,  Thanks for offering to help. Since you've already got a
working Geronimo webapp that uses Dojo in GERONIMO-1823 I would love
to see how this idea holds up. How about moving the Dojo library from
your webapp into separate webapp available at the context root "/dojo"
and then adjusting your webapp to point at it?  Depending on how you
referenced Dojo in your scripts and html you may have to include a
line like:
                dojo.setModulePrefix("dojo", "/dojo");
after you load dojo.js.  I also figured out a way to dynamically load
dojo.js from a javascript file (instead of html) if you that would
help.

To start the Dojo webapp and make its resources available you would
also need to add a line to your webapps geronimo-web.xml like
    <dependencies>
      <dependency>
        <groupId>dojo</groupId>
        <artifactId>dojo-toolkit</artifactId>
        <type>war</type>
      </dependency>

Does that sound reasonable? Feel free to take this idea and run with
it, get creative, etc :-)

Best wishes,
Paul

On 8/14/06, Chris Cardona <ja...@yahoo.com> wrote:
> This is a good idea Paul. I'm not exactly sure how you
> would implement it but let me know if I can help with
> anything (testing, dev, docs, etc.). This will
> definitely help those who wanted to develop Ajax
> enabled apps in G. Also nice to have is if we can find
> a way to do the same thing for DWR if it's possible.
>
> Cheers,
> chris
>
>
> --- Paul McMahan <pa...@gmail.com> wrote:
>
> > Dojo is a popular open source AJAX library that's
> > available under the
> > BSD and Academic Free licenses.  The DayTrader folks
> > use it in the web
> > UI they recently announced on the Geronimo dev list
> > and Chris used it
> > in the nice LDAP UI he did for GERONIMO-1823.  I
> > would also like to
> > start introducing some use of it into the Geronimo
> > admin console when
> > its appropriate to do so.
> >
> > The way that developers usually incorporate an AJAX
> > library into their
> > applications is by making a copy of its static files
> > (javascript, css,
> > gifs, etc) in their webapp and referencing them from
> > their servlets
> > and JSPs.  The obvious downside is that each
> > application has a
> > separate copy of the AJAX library, increasing the
> > server's overall
> > disk footprint (Dojo is ~3mb) and preventing the
> > browser from using a
> > single copy of the library files from its cache.
> > Another downside is
> > that the AJAX library can't be upgraded
> > independently from the web
> > application.
> >
> > I think it would be great if Geronimo could provide
> > a more AJAX
> > friendly development environment by helping solve
> > these problems.  One
> > idea is that Geronimo could include the Dojo library
> > as a native,
> > standalone webapp with its AJAX library files laid
> > out so that other
> > applications can point at from their HTML.
> > Referencing it in
> > geronimo-web.xml would cause Geronimo to start it up
> > and make its
> > files available at some predetermined context root,
> > say /dojo.
> > Referencing it with a versionless moduleId would
> > make sure the most
> > recent version is always used.  So AJAX enabling
> > your application in
> > Geronimo would be a simple as "add this line to your
> > geronimo-web.xml".
> >
> > Does this sound like a good idea?  Any suggestions
> > or concerns?
> > Perhaps this could be done as a plugin instead of a
> > native module?
> >
> > Best wishes,
> > Paul
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>

Re: AJAX and Geronimo

Posted by Chris Cardona <ja...@yahoo.com>.
This is a good idea Paul. I’m not exactly sure how you
would implement it but let me know if I can help with
anything (testing, dev, docs, etc.). This will
definitely help those who wanted to develop Ajax
enabled apps in G. Also nice to have is if we can find
a way to do the same thing for DWR if it’s possible.

Cheers,
chris


--- Paul McMahan <pa...@gmail.com> wrote:

> Dojo is a popular open source AJAX library that's
> available under the
> BSD and Academic Free licenses.  The DayTrader folks
> use it in the web
> UI they recently announced on the Geronimo dev list
> and Chris used it
> in the nice LDAP UI he did for GERONIMO-1823.  I
> would also like to
> start introducing some use of it into the Geronimo
> admin console when
> its appropriate to do so.
> 
> The way that developers usually incorporate an AJAX
> library into their
> applications is by making a copy of its static files
> (javascript, css,
> gifs, etc) in their webapp and referencing them from
> their servlets
> and JSPs.  The obvious downside is that each
> application has a
> separate copy of the AJAX library, increasing the
> server's overall
> disk footprint (Dojo is ~3mb) and preventing the
> browser from using a
> single copy of the library files from its cache. 
> Another downside is
> that the AJAX library can't be upgraded
> independently from the web
> application.
> 
> I think it would be great if Geronimo could provide
> a more AJAX
> friendly development environment by helping solve
> these problems.  One
> idea is that Geronimo could include the Dojo library
> as a native,
> standalone webapp with its AJAX library files laid
> out so that other
> applications can point at from their HTML. 
> Referencing it in
> geronimo-web.xml would cause Geronimo to start it up
> and make its
> files available at some predetermined context root,
> say /dojo.
> Referencing it with a versionless moduleId would
> make sure the most
> recent version is always used.  So AJAX enabling
> your application in
> Geronimo would be a simple as "add this line to your
> geronimo-web.xml".
> 
> Does this sound like a good idea?  Any suggestions
> or concerns?
> Perhaps this could be done as a plugin instead of a
> native module?
> 
> Best wishes,
> Paul
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com