override Tapestry.ZoneManager#processReply to work with Prototype 1.7 #23

Merged
merged 1 commit into from Apr 4, 2011

Conversation

Projects
None yet
2 participants
@jochenberger
Collaborator

jochenberger commented Mar 31, 2011

No description provided.

@hlship

This comment has been minimized.

Show comment Hide comment
@hlship

hlship Apr 1, 2011

Owner

I'm afraid its trickier than that ... what you have will, I believe, add the core JavaScript stack to every page, regardless of whether it needs it or not. Some people really like to have at least the initial page free of JS to speed loading.

Owner

hlship commented Apr 1, 2011

I'm afraid its trickier than that ... what you have will, I believe, add the core JavaScript stack to every page, regardless of whether it needs it or not. Some people really like to have at least the initial page free of JS to speed loading.

@jochenberger

This comment has been minimized.

Show comment Hide comment
@jochenberger

jochenberger Apr 4, 2011

Collaborator

Oh right, I didn't think of that. Do you already have specific plans on how to solve the compatibility issues? Maybe replace tapestry.js completely and override SymbolConstants.DEFAULT_JAVASCRIPT?
Or replace the ClientInfrastructure implementation to include an additional file in the CORE_JAVASCRIPT?
Besides, you mentioned problems with the Prototype 1.7 and the Palette's JS. Could you please give an insight on what these are?

Collaborator

jochenberger commented Apr 4, 2011

Oh right, I didn't think of that. Do you already have specific plans on how to solve the compatibility issues? Maybe replace tapestry.js completely and override SymbolConstants.DEFAULT_JAVASCRIPT?
Or replace the ClientInfrastructure implementation to include an additional file in the CORE_JAVASCRIPT?
Besides, you mentioned problems with the Prototype 1.7 and the Palette's JS. Could you please give an insight on what these are?

@hlship hlship reopened this Apr 4, 2011

@hlship

This comment has been minimized.

Show comment Hide comment
@hlship

hlship Apr 4, 2011

Owner

I've thought about it and with tapx-prototype as a temporary patch, this unwanted behavior (forces JS onto all pages) is acceptable.

Owner

hlship commented Apr 4, 2011

I've thought about it and with tapx-prototype as a temporary patch, this unwanted behavior (forces JS onto all pages) is acceptable.

@hlship hlship merged commit 64fa5c1 into hlship:master Apr 4, 2011

@jochenberger

This comment has been minimized.

Show comment Hide comment
@jochenberger

jochenberger Apr 7, 2011

Collaborator

Another issue here is that the palette.js and tapestry-js-fixes.js files might be added too late. I'm about to commit another approach (overriding the core JS stack).

Collaborator

jochenberger commented Apr 7, 2011

Another issue here is that the palette.js and tapestry-js-fixes.js files might be added too late. I'm about to commit another approach (overriding the core JS stack).

@hlship

This comment has been minimized.

Show comment Hide comment
@hlship

hlship Apr 7, 2011

Owner

Remember that all JS libraries load before anything much executes;
what we have should work fine, and does in the Ajax-intensive app I've
been building.

On Thu, Apr 7, 2011 at 7:55 AM, jochenberger
reply@reply.github.com
wrote:

Another issue here is that the palette.js and tapestry-js-fixes.js files might be added too late. I'm about to commit another approach (overriding the core JS stack).

Reply to this email directly or view it on GitHub:
#23 (comment)

Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Owner

hlship commented Apr 7, 2011

Remember that all JS libraries load before anything much executes;
what we have should work fine, and does in the Ajax-intensive app I've
been building.

On Thu, Apr 7, 2011 at 7:55 AM, jochenberger
reply@reply.github.com
wrote:

Another issue here is that the palette.js and tapestry-js-fixes.js files might be added too late. I'm about to commit another approach (overriding the core JS stack).

Reply to this email directly or view it on GitHub:
#23 (comment)

Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

@jochenberger

This comment has been minimized.

Show comment Hide comment
@jochenberger

jochenberger Apr 8, 2011

Collaborator

Sure, but won't they be loaded/executed in the way they appear in the page? If a file that's loaded between tapestry.js and tapestry-fixes.js already executes ZoneManager#processReply, it will fail, won't it?

Collaborator

jochenberger commented Apr 8, 2011

Sure, but won't they be loaded/executed in the way they appear in the page? If a file that's loaded between tapestry.js and tapestry-fixes.js already executes ZoneManager#processReply, it will fail, won't it?

@hlship

This comment has been minimized.

Show comment Hide comment
@hlship

hlship Apr 8, 2011

Owner

There's no difference in effect between the two solutions, except that
the additional files will be included together in the aggregated core
JS stack.

JavaScript is late bound. Even if some code created an instance of
Tapestry.ZoneManager on the client side as its script was loaded
(which is bad form, since the DOM will likely be at best partially
loaded), by the time it invoke the processReply() function, it will be
invoking the patched version, since that overwrites its "slot" in the
ZoneManager prototype.

On Thu, Apr 7, 2011 at 11:15 PM, jochenberger
reply@reply.github.com
wrote:

Sure, but won't they be loaded/executed in the way they appear in the page? If a file that's loaded between tapestry.js and tapestry-fixes.js already executes ZoneManager#processReply, it will fail, won't it?

Reply to this email directly or view it on GitHub:
#23 (comment)

Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Owner

hlship commented Apr 8, 2011

There's no difference in effect between the two solutions, except that
the additional files will be included together in the aggregated core
JS stack.

JavaScript is late bound. Even if some code created an instance of
Tapestry.ZoneManager on the client side as its script was loaded
(which is bad form, since the DOM will likely be at best partially
loaded), by the time it invoke the processReply() function, it will be
invoking the patched version, since that overwrites its "slot" in the
ZoneManager prototype.

On Thu, Apr 7, 2011 at 11:15 PM, jochenberger
reply@reply.github.com
wrote:

Sure, but won't they be loaded/executed in the way they appear in the page? If a file that's loaded between tapestry.js and tapestry-fixes.js already executes ZoneManager#processReply, it will fail, won't it?

Reply to this email directly or view it on GitHub:
#23 (comment)

Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment