User Identifiers on the server and client

[J2SE client stuff - and I haven’t really read the documentation as thoroughly as I should have]

I wondered if there was a reason when identifying a user on the server I get a nice wrapped UserID object but on the client I get a byte[] array?

It’d seem nicer in my head to get a typed object back that I can use as a hash keys easily etc.

Kev

The decision was twofold, but related.

(1) We wanted the server to be free to chnage the actual binary representation without requiring changing or even recompiling the client.

(2) We wanted to be sure to support non-Java clinets reasonably. We support C++ already. Right now we are discussing as potentially weird client side APIs as Flash.

So in general it was a combination of foward compatabaility and client agnosticism.

Makes sense, but couldn’t the J2SE client just wrap the byte array in an object. I found I had to do this everywhere anyway.

Kev

It could. It would be a different obejct then the serve side obecjt so we shoudl gvie it a different name.

Myself, I created a BYTEARRAY obejct that I use for manipulating and comparing arrays of bytes. I foudn it a mreo generally useful construct shrug

Hmm. I HAD copied it into chattest code space so the chattest code stood alone and you had the source but apparrently some thing funny happened in the SVN and chattest seems ti have regressed. I need to look into that…

jk

Yeah, I saw the BYTEARRAY class in the source somewhere - works fine. I ended up with an class called UserID client side but you’re right, it should be called something else.

Kev