On Dec 14, 2011, at 3:43 PM, Thiago H. de Paula Figueiredo wrote:
Isn't it true though that if you are relying on Prototype in your
Tapestry app, you aren't really relying on the public API?
I've never seen anywhere that Prototype is the public API for
Tapestry.
Nor me. :) Prototype isn't part of the Tapestry API but Tapestry
provides it. One way of dealing with the backward compatibility
issue here is to provide a package that provides Prototype in such a
way thet the $() function is the Prototype one, not the jQuery one.
Something like this was suggested for deprecated APIs, such as the
old URL rewriting API, which is heavily used in the projects I work
currently.
I'd prefer this, or maybe even emulate much of Prototype in jQuery.
Since Tapestry came with Prototype, I use it extensively in my app,
although mostly for $('yourId') and $$('css rule'), array iteration
and AJAX calls. I don't really use much of Prototype other than that,
although I do have a Modalbox module. I'm sure there is one of those
for jQuery.
It's rather easy to use both:
$j = jQuery.noConflict()
This way you can use $j in place of $ without having to type
jQuery(...) everywhere.
Norman Franke
Answering Service for Directors, Inc.
www.myasd.com