jUA

Warning: Fairly technical UA/Java post ahead. 🙂

I’ve started writing a client for UA, written in Java and unimaginatively entitled jUA. Although qUAck works fine most of the time, I know some people prefer to have a graphical interface, but uaHTTP is really slow sometimes and you generally have to wait for it to refresh before seeing new messages/announcements. It’s also not that good if you want to have a conversation with someone via a series of pages, because it pops up a window which is easy to miss and blocked by Firefox anyway unless you remember to add ua2.org to your allowed sites list.

At the moment I’ve managed to get a connection up and established, and I’ve got some basic classes for generating EDF strings – although I haven’t written a parser yet so jUA doesn’t understand responses from the server. I’ve got some code that should theorectically let me login as a user, but there must be something wrong with me sending the data to the server because the login doesn’t actually work – although if I output the EDF to the console I can copy/paste that into a telnet session and it produces the right result. I think there must be something wrong with the way I’m sending data to the server rather than what I’m sending, so I’m continuing to try different things until I can get it to work.

Eventually I also want to make jUA highlight relevant parts of announcements, for example if you saw “message 156 has been posted in Chat by pwaring”, you’d be able to click on ‘156’ to jump straight to that message, on ‘Chat’ to go to that folder and on ‘pwaring’ to view my profile. Other ideas include a proper page history instead of the last two messages which qUAck gives you, the ability to automatically switch your pager off after X minutes of idling and an option to completely ignore a user if they’re annoying you (by this I mean all their pages will be dropped, you won’t see status messages from them etc).

The main reason I’m writing this is to get some experience in creating network-aware Java clients, particularly ones for applications where I don’t have a detailed copy of the protocol (there’s about two pages on the way EDF works on the UA website, plus some sample code in C++, the rest I have to figure out by sniffing the connection between my local qUAck client and the UA server). In particular I want to be able to write a general client that will let companies do as much of their business online as possible, e.g. being able to change information stored at Companies House (this is particularly of interest to me as the electronic filing fees are usually significantly cheaper than their paper-based equivalent, not to mention being faster and not having to rely on the postal service).

Posted in Uncategorised

4 thoughts on “jUA

  1. Too much.

    I mean you’re thinking of too many bells and whistles; these may never go in. Start with the core functionality and write an EDF library with really simple little scripts that only do a login/out. Then one that does that and only lists the folders. And so on.

    Once you have the library then worry about the interface. If you don’t get to a proper interface you still have the network code experience and can throw the code up on the download page for other people to build on.

    Just my $0.02.

  2. Start with the core functionality and write an EDF library with really simple little scripts that only do a login/out.

    That’s actually what I’m doing. 😉 As I said, I’ve already got the login/logout code written, although for some reason it doesn’t seem to work. The interface won’t come for a while—apart from anything else I need to brush up on my Swing knowledge first.

    I only mentioned the bells and whistles as they’re a bit more interesting than socket handling, but they’re not likely to be added for some time, hence “Eventually I also want to make jUA […]”.

    As for code downloads, everything is in SVN so at some point I’ll enable anonymous access to the repository.

  3. I have some cosmetic (though possibly more difficult) things that would improve UA Http.

    There is a top and bottom bar in the topic messages section (read/unread messages/Info). Can All these buttons be placed on both bars, or make the bars remain static, to saving scrolling around big topics.

    Have a separate window showing private conversation (possibly like the messengers) with the current conversation separate from the public messages.

    Have a Catch up at button for all the folder at once.

  4. I’m afraid that I can’t improve uaHTTP as I don’t have the source code (sirhC does I think but I’m not sure if he would let me tinker with it). It would be fairly trivial to make the bars static though.

    As for catching up on all the folder at once, there is already a feature that will do that at the bottom of the folder message listing – it’s labelled “catch up all”.

    Private messages will be in a separate window or frame, probably tabulated with the names of the users paging you, and I did think of implementing it in a similar way to how instant messaging services work.

Comments are closed.