librelist archives

« back to archive

Converse library to connect with mobile apps

Converse library to connect with mobile apps

From:
Jatin
Date:
2015-06-02 @ 14:15
Hi,

I really like the work that's been done with ConverseJS.
I had a question - is there a way I can use converse to connect to ejabberd
server and then have converse connect to mobile apps for mobile apps chat
messaging vs. browser chat?

Thanks,
Jatin

Re: [conversejs] Converse library to connect with mobile apps

From:
Elkom
Date:
2015-06-02 @ 17:37
On 2015-06-02 16:15, Jatin wrote:
> Hi,
> 
> I really like the work that's been done with ConverseJS.
> I had a question - is there a way I can use converse to connect to ejabberd
> server and then have converse connect to mobile apps for mobile apps chat
> messaging vs. browser chat?

Sure, I have exactly the same application. My ejabberd is on
rasberry-pi. OTR works flawlessly on my setup.

www with https -> raspberry-pi ejabberd with https -> xmpp client of
your chice.

But if you want to make it more secure I advice you to setup www on
raspberry-pi or use any Tomato compatible router for https www and
raspberry-pi for ejabberd/bosh.

Problem running without AMD/require.js

From:
Yang, Debbie
Date:
2015-06-03 @ 17:56
I'm trying to run converse.js without using the minified version and thus 
require.js.  The documentation says this is possible.

I pulled all of the references needed and have a components/ folder as per
the documentation here: 
https://conversejs.org/docs/html/development.html#without-amd-and-require-js


I looked at the non-amd.html example 
(https://github.com/jcbrand/converse.js/blob/master/non_amd.html) and 
basically copied that html to test with.

I am getting an error when I run though that says "uncaught reference 
error: converse not defined" and there is no chat box. The error is 
referring to this bit of code from the non-amd.html where 'converse' is 
undefined:

<script>
    converse.initialize({
        bosh_service_url: 'https://conversejs.org/http-bind/', // Please 
use this connection manager only for testing purposes
        i18n: locales.en, // Refer to ./locale/locales.js to see which 
locales are supported
        prebind: false,
        show_controlbox_by_default: true,
        debug: true,
        roster_groups: true
    });
</script>



Does this non-amd.html file not work?  Is this not how converse is to be 
initialized when you are not using require? 

Previously with require you had to have the line "require(['converse']" like this:

require(['converse'], function (converse) {
    converse.initialize({
        bosh_service_url: 'https://bind.conversejs.org', // Please use 
this connection manager only for testing purposes
        i18n: locales.en, // Refer to ./locale/locales.js to see which 
locales are supported
        show_controlbox_by_default: true,
        roster_groups: true
    });
});


But removing that and just having converse.initialize() is not working.

What am I doing missing? I thought this non-amd.html is how the app should
be if not using amd/require.


Thanks,
     Debbie

Re: [conversejs] Problem running without AMD/require.js

From:
Jc Brand
Date:
2015-06-04 @ 21:59
On Wed, Jun 03, 2015 at 05:56:26PM +0000, Yang, Debbie wrote:
> I'm trying to run converse.js without using the minified version and 
thus require.js.  The documentation says this is possible.
> 
> I pulled all of the references needed and have a components/ folder as 
per the documentation here: 
https://conversejs.org/docs/html/development.html#without-amd-and-require-js
> 
> 
> I looked at the non-amd.html example 
(https://github.com/jcbrand/converse.js/blob/master/non_amd.html) and 
basically copied that html to test with.

<snip>

> Does this non-amd.html file not work?  Is this not how converse is to be
initialized when you are not using require? 

My guess is that you didn't set up the development environment.

Run "make dev" and then "make serve" and then go to 
http://localhost:8000/non_amd.html"

Re: [conversejs] Problem running without AMD/require.js

From:
Yang, Debbie
Date:
2015-06-04 @ 23:05
Thanks for the reply.

I'm on a windows environment. Is Running : make dev; make serve

the same as running: make -f Makefile.win dev   ?

Running 'make dev' gives me errors but 'make -f Makefile.win dev' ran and 
I had a components folder created.

Do I still need to run 'make serv'? That doesn't work on windows, and 
neither does 'make -f Makefile.win serve'.


Thanks,
     Debbie


Debbie Yang
Senior Software Engineer
Overwatch Systems, Ltd

Textron Systems
Advanced Information Solutions
5301 Southwest Parkway
Austin, TX 78735
dyang@textronsystems.com
+1 512-358-3637
www.textronsystems.com



-----Original Message-----
From: conversejs@librelist.com [mailto:conversejs@librelist.com] On Behalf
Of JC Brand
Sent: Thursday, June 04, 2015 4:59 PM
To: conversejs@librelist.com
Subject: Re: [conversejs] Problem running without AMD/require.js

On Wed, Jun 03, 2015 at 05:56:26PM +0000, Yang, Debbie wrote:
> I'm trying to run converse.js without using the minified version and 
thus require.js.  The documentation says this is possible.
> 
> I pulled all of the references needed and have a components/ folder as 
per the documentation here: 
https://conversejs.org/docs/html/development.html#without-amd-and-require-js
> 
> 
> I looked at the non-amd.html example 
(https://github.com/jcbrand/converse.js/blob/master/non_amd.html) and 
basically copied that html to test with.

<snip>

> Does this non-amd.html file not work?  Is this not how converse is to be
initialized when you are not using require? 

My guess is that you didn't set up the development environment.

Run "make dev" and then "make serve" and then go to 
http://localhost:8000/non_amd.html"

Re: [conversejs] Problem running without AMD/require.js

From:
Jc Brand
Date:
2015-06-05 @ 05:43

On 05 Junie 2015 1:05:32 vm. GMT+02:00, "Yang, Debbie" 
<dyang@textronsystems.com> wrote:
>Thanks for the reply.
>
>I'm on a windows environment. Is Running : make dev; make serve
>
>the same as running: make -f Makefile.win dev   ?
>
>Running 'make dev' gives me errors but 'make -f Makefile.win dev' ran
>and I had a components folder created.
>
>Do I still need to run 'make serv'? That doesn't work on windows, and
>neither does 'make -f Makefile.win serve'.

"make serve" just starts a web server which isn't so important. 

Does the non_amd.html example work now after you ran 'make -f Makefile.win dev'? 

JC 

>-----Original Message-----
>From: conversejs@librelist.com [mailto:conversejs@librelist.com] On
>Behalf Of JC Brand
>Sent: Thursday, June 04, 2015 4:59 PM
>To: conversejs@librelist.com
>Subject: Re: [conversejs] Problem running without AMD/require.js
>
>On Wed, Jun 03, 2015 at 05:56:26PM +0000, Yang, Debbie wrote:
>> I'm trying to run converse.js without using the minified version and
>thus require.js.  The documentation says this is possible.
>> 
>> I pulled all of the references needed and have a components/ folder
>as per the documentation here:
>https://conversejs.org/docs/html/development.html#without-amd-and-require-js
>> 
>> 
>> I looked at the non-amd.html example
>(https://github.com/jcbrand/converse.js/blob/master/non_amd.html) and
>basically copied that html to test with.
>
><snip>
>
>> Does this non-amd.html file not work?  Is this not how converse is to
>be initialized when you are not using require? 
>
>My guess is that you didn't set up the development environment.
>
>Run "make dev" and then "make serve" and then go to
>http://localhost:8000/non_amd.html"

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: [conversejs] Converse library to connect with mobile apps

From:
Jatin
Date:
2015-06-02 @ 18:11
So:
1 - I install and user converse library on a nodejs server
2 - how does nodejs/conversejs talk to ejabberd server? which npm library I
would use to make this connection between 2 servers?
3 - the mobile app would connect to both servers independently or only one
nodejs/converesejs? in either case what libraries would I use and protocol?
also would it be a shared database for user registration, etc.?

Thanks,
Jatin

On Tue, Jun 2, 2015 at 1:37 PM, ELKOM <info@elkom.com.tw> wrote:

> On 2015-06-02 16:15, Jatin wrote:
> > Hi,
> >
> > I really like the work that's been done with ConverseJS.
> > I had a question - is there a way I can use converse to connect to
> ejabberd
> > server and then have converse connect to mobile apps for mobile apps chat
> > messaging vs. browser chat?
>
> Sure, I have exactly the same application. My ejabberd is on
> rasberry-pi. OTR works flawlessly on my setup.
>
> www with https -> raspberry-pi ejabberd with https -> xmpp client of
> your chice.
>
> But if you want to make it more secure I advice you to setup www on
> raspberry-pi or use any Tomato compatible router for https www and
> raspberry-pi for ejabberd/bosh.
>
>