[sync] First shot at php conversion.

Chuck Hagenbuch chuck at horde.org
Sat Nov 8 06:22:19 PST 2003


Quoting Anthony Mills <amills at gascard.net>:

> Here is the utilities file I use with WBXML.  How should I post these
> files?  I have not tested this yet, I wanted to make sure I am doing
> this correctly.  Feel free to make comments.

Especially at this stage, there is a lot less onus on the "right way" than you
seem to be perceiving. :) We need working code - we'll sort things out and
clean it up as we go.

But, since you asked, here are a few thoughts:

- take a read through horde/docs/CODING_STANDARDS for general style stuff.

- send files as text/plain attachments if possible - prevents email clients from
wrapping the lines.

- it'd be nice to have these functions wrapped up in a class, even a static
class.

- in WBXML_getCharsetInt(), it'd help readability to have constants defined for
the various character sets. Same for in _getDPIInt(), getCharsetString(), and
getDPIString().

- intToMBUInt32() should return the relevant data, instead of always writing to
a file - just a bit more flexible that way.

- no need to prefix the BitSet classname, I don't think. If there's a need to
make sure it doesn't overlap with something else, WBXML_BitSet would be better.


So, there you go. But, really, code is great. I can help sort this out once we
organize things in CVS. So don't worry too much about it. :)

-chuck

--
Charles Hagenbuch, <chuck at horde.org>
"I am not that interested in green food." - Average Joe


More information about the sync mailing list