activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arjan van den Berg (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQ-1377) amq.js should not have a dependency on prototype.js
Date Tue, 19 Jan 2010 17:07:43 GMT

    [ https://issues.apache.org/activemq/browse/AMQ-1377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56998#action_56998
] 

Arjan van den Berg commented on AMQ-1377:
-----------------------------------------

Hi,

I must say that I only tested this on Firefox 3.5 with firebug, and Dojo 1.4.0 (the latest
release).
I have the following in my HTML file to include the necessary javascript:

{noformat}
<script type="text/javascript" src="js/dojo.js"></script>
<script type="text/javascript" src="js/amq_dojo_adapter.js"></script>
<script type="text/javascript" src="js/amq.js"></script>
{noformat}

and the following to initialize amq:


{noformat}
<script type="text/javascript">
<!--
amq = org.activemq.Amq;

function receiveMessage(message)
{
    // do something with the message here
}
function amqInit()
{
    amq.init({ uri: 'amq', logging: true});
    amq.addListener('trigger','topic://some.topic.name',receiveMessage);
}

dojo.addOnLoad(amqInit);
-->
</script>
{noformat}

> amq.js should not have a dependency on prototype.js
> ---------------------------------------------------
>
>                 Key: AMQ-1377
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1377
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.0.0
>            Reporter: Jim Cook
>             Fix For: 5.4.0
>
>         Attachments: amq.js, amq.js, amq.js, amq_dojo_adapter.js, amq_js.zip
>
>
> amq.js uses a script loading technique to include behavior.js, prototype.js and _amq.js.
The Behavior library is included only for the purposes of the chat client and is only GUI
in nature, so that should go. Also, Prototype is included for its AJAX functionality, however
everyone has their favorite javascript library and although I cut my teeth on prototype, I
use jQuery now. I certainly don't want amq.js to include prototype when I have a perfectly
good AJAX library already included in jQuery.
> IMHO, amq.js should include only the functionality of client-side javascript-enabled
JMS. The page author should include her AJAX library of choice (prototype, dojo, jquery, mootools,
etc.) and an adapter class that allows amq.js to use the particular ajax library.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message