Project

General

Profile

tigase.xmpp.StanzaType not in tigase-utils?

Gabriel Rossetti
Added over 4 years ago

Hello,

why is tigase.xmpp.StanzaType in the server package distribution and not in tigase-utils like tigase.xmpp.JID? This means that clients wanting to use it for writing parsers needs to include the server jar... (I ended up re-writing it).

Also, why did the tigase client API end up re-writing things like BareJID, element, etc? Why not refactor it a bit and share the code?

Cheers,

Gabriel


Replies (2)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

Gabriel Rossetti wrote:

Hello,

why is tigase.xmpp.StanzaType in the server package distribution and not in tigase-utils like tigase.xmpp.JID? This means that clients wanting to use it for writing parsers needs to include the server jar... (I ended up re-writing it).

What kind of parsers? And why do you need StanzaType for parser? StanzaType is used in Package class and all the server code which use Package objects. So this is specifically server package/project data type.

Also, why did the tigase client API end up re-writing things like BareJID, element, etc? Why not refactor it a bit and share the code?

These are different and separate projects, the client and the server. Code is generally not shareable as there are different goals behind each of the code development:

  1. Server - most efficient and high performance, using the best Java API available, performance is the top priority

  2. Client - compatibility with Java used in GWT and Android - so not all Java API is available and actually performance is not such a concern as for the server code

Added by Gabriel Rossetti over 4 years ago

Ok, thanks for the info. I asked here:

https://projects.tigase.org/boards/4/topics/3114?r=3127

concerning how things are parsed in Tigase, I had a look at Command.java for an example.

    (1-2/2)