Hi Malcom

If my understanding of your proposal is correct,  a new funcionality of
dependency management  and maintenance of previous prototype components
would involve only 2 things:

1) the inclusion of a properties file (into one of the two packages you
have mentioned, I vote for the package root) that it's much better than
change the page templates.

2) the moving  into an own package all previous Prototype components that
will make necessary to modify the package imports toward keep the
compatibility

I think those "relatively important changes" would be most than justified
if final result is the possibility of using both libraries (or even new JS
libraries) in a easy and generic way, even giving the option to include new
JQuery components  and Prototype components into future versions. This
change will also be favorable to Click because it's giving a little
maintenance in order to be friendly with those new technologies

The compatibility of JQuery with other libraries, as you have mentioned,
it's easily handle following the steps in:
http://docs.jquery.com/Using_jQuery_with_Other_Libraries

Best Regards

EMERSON

On Mon, Jun 4, 2012 at 11:10 PM, Malcolm Edgar <[email protected]> wrote:

> Hi All,
>
> I am looking at integrating some JQuery components into Click. Some things
> we have used at my workplace JQuery DesktopMenu by Bob and probably some
> form of datepicker (http://jqueryui.com/demos/datepicker/).
>
> Probably in the package: org.apache.click.extras.jquery
>
> There are a couple of things I would like to discuss, and get some
> opinions on:
>
> #1 Dependency Management
>
> These controls will have various JQuery JS dependencies and assets which
> we can package in the distribution, or let people declare explicitly in
> their HTML page template. Traditionally we have packages up all the JS
> dependencies with Click as we want to make it easy for people to use.
> However now with peoples extensive use of these libraries extensively in
> their applications, so we will have potential issues with different
> versions.  My thought on this is to include a properties file which
> declares the various controls dependencies. People can then potentially
> edit this properties file and override the default values:
>
> jquery.core.js=
> http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
>
> # Desktop Menu components
> jquery.desktopmenu.css=/click/jquery/desktopmenu/desktopmenu.css
> jquery.desktopmenu.js=/click/jquery/desktopmenu/jquery.menu.js
>
> jquery.desktopmenu.template=/click/jquery/desktopmenu/desktopmenu.template.js
>
> The main problem I have with this, is that the properties file would be
> buried deep in the package structure:
> /org/apache/click/extras/jquery/jquery-control.properties.  Alternatively
> we could have this in the package root and call it something like:
>  click-jquery-control.properties
>
> #2 Prototype and JQuery
>
> Traditionally these libraries are not compatible, as prototype modifies
> the DOM.  In Click Extras we have a number of prototype controls, where
> were popular before JQuery came to dominate (showing our age here).  Not
> sure if this is fixed now, I have read about a JQuery.noConflict() function.
>
> We have quite a few prototype controls, which I think should be moved into
> their own package so its clear they have a prototype dependency.  This
> change would require people to change their package imports, but other than
> that it would be a pretty painless change.
>
>
> Keen to hear peoples thoughts on this.
>
> regards
>
>

Reply via email to