[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [JDEV] Client Lib & Associated Thoughts (And Many Capital Letters)



> This one's gonna be long. Better make sure you have some Dew... :)

Ahh... the nectar of the gods!  :)

> By nature, XML is a heirarchial language. Basically, you can take any
> well-formed XML document and parse it into a N-ary tree (tree with n
> children per parent). This is a very powerful concept and I think we can
> put it into good use. 
> [rest of doc...]

Firstly, that's an excellent description of the terminology, wanna help
write developer docs?  *grin*

This is mostly my fault for lack-of-comments at this point, but what you
describe is almost exactly what the xpt structure is in the client lib.
The only big difference is that it uses jpairs(simple linked lists) for
the attributes and is C based with supporting functions instead of a C++
class.

Now, xpt isn't the most wonderful thing in the world(although it works
quite well for most simple things), so how do we improve it?  Well, thanks
to the fact that we're not the only ones trying to solve this very
problem, the W3C has blessed the DOM as the "standard" way to express
parsed XML via an API.  I'd love to start working on a simple C based DOM
and will do so if the need presents itself, but I'm hoping that someone
else out there on the net will beat me to it :)

> So, that's the first of my thoughts on the client-lib. I realize that
> the project is C. May I politely inquire as to the possiblities of
> using c++? 

I haven't done any c++, but everything I know about it makes me want to :)
I'm a very object-based thinker, so everything I've been doing in C is
just about object oriented as C gets.

The problem is that I really believe that the core code(server and libs)
should be entirely pure cross platform C.  I've seen all kinds of
arguments back and forth on this very subject(especially on the Apache
list, whew :), but in the end it still seems that to provide the most
options to developers and most XP compatability, servers and libs should
stick with C.

But, as I want to start working with C++ and because of the way Jabber is
designed, we should all be able to play happily.  I'd like to see the
common lib just consist of simple important C routines and structures, and
have it play nice with any C++ app utilizing it.  The same goes for
building the Jabber Transport, so that C++ modules can be written easily.

Most importantly, if your preference is C++, simply implement the protocol
and your set, no need to utilize anything else if you are capable of going
it your own.  There's probably lots better ways to do things in pure C++
and there's no reason we can't distribute that as an option :)

Jer