I answered an FAQ question tonight on the HTML_AJAX wiki, im posting the answer here as well since I know most people don’t check the wiki for changes every day.
Outside of this answer I’d like to hear from what other libraries people would like too see integrated with HTML_AJAX and the reasons for this.
Question:
Will HTML_AJAX integrate with other Javascript AJAX libraries such as scriptaculous? How would this integration look like?
HTML_AJAX doesn’t have specific plans to integrate with other JavaScript libraries. Part of this is because external dependencies make for a more complicated installation process. It might make sense to offer some optional dependencies on a library like scriptaculous automatically using its visual effects for the loading box or something, but there isn’t a lot to gain from making default visuals like that flashier since they are designed to be easily replaceable.
Most integration would take place in higher level components. Its unclear weather higher level components like that should be part of HTML_AJAX delivered through PEAR or if they should just be supported by HTML_AJAX and made available from http://htmlajax.org or some other site. If your interested in building widgets or components based on HTML_AJAX please let me know.
HTML_AJAX does however offer the ability to use its library loading mechanism with any JavaScript library. I use scriptaculous in conjunction with HTML_AJAX and I load both libraries through the server.
To do this you just need to register the library with your server and load add its flag to your include line.
PHP code
<?php
$this->server->registerJSLibrary(’scriptaculous’,
array(‘prototype.js’,’scriptaculous.js’,‘builder.js’,‘effects.js’,‘dragdrop.js’,‘controls.js’,’slider.js’),‘/pathto/scriptaculous/’);
?>
HTML
<script type="text/javascrpt" src="server.php?client=scriptaculous"></script>