Re: how to connect gloox to..
From: Vincent Thomasset <vincent.thomasset@xxxxxxxxx>
Date: Wed, 31 Oct 2007 13:05:30 +0100 (CET)
Le Wed, 31 Oct 2007 12:11:49 +0100,
"Radim Roska" <radim.roska@xxxxxxxxx> a écrit :

> *Hi,

Hi,

> i know this question is not exactly gloox specific. But on the other
> hand you will surely know...
> im not experienced programmer :).
> 
> I want to implement my jabber client modulary, but im thinking how to
> implement controler. There will be object ( gloox ) that will be
> connected to jabber server and will recieve / send msgs etc. On the
> other hand there will be object ( somehow working with ncurses lib )
> that will get user input and display jabber "output"...and finally
> ofcourse object that will read,modify configuration ( in xml file ).
> 
> Im asking how to implement that controler. Please tell me the best
> way..i want to learn a lot from this project and at the same way i
> want it most simple ( because simple is beatiful ;))

This is totally not gloox specific. :-) Also, i'm not sure this would
be useful when using gloox as gloox already has event and handlers
notions. I tried that solution some time ago while at school and
quickly reverted back to another (simpler) design since the controller
was actually only adding another layer while not adding much
flexibility (i guess this is due to gloox being rather flexible
already). It simply made everything more complex.

> i see 2 ways...
> 1. using threads...every object will be one thread (except xml i
> guess) and they will somehow cooperate :)...not know how right
> now...i know about threads just a little (that will change ;)
> 2. controler will contain cycle that will call recv and operate with
> user inputs every cycle...
> 
> btw i want to make it in ncurses..i found out that there is c++
> wrapper for ncurses..but there's NOWHERE any documentation...do you
> know any project with ncurses++  or some material?

Would this be an open-source project ? If so, you may want to
contribute to an existing project first (using gloox of course ;-)
instead of going solo. This way you'll learn a lot more in a shorter
time.

You'd also have practical examples of common issues which need
to be taken care of for such software, hence giving you a better
understanding than by trying to tackle each problem separately when
you encounter them.

The risk of screwing up is much less important this way too. :-)

Alternatively, you can checkout the examples/ directory in the source
distribution for a start, but that's not really gonna help design your
application.

Cheers,
Vincent