1308445348|%A, %e %B %Y, %H:%M
Continuing on from what I knew just three weeks ago, I'd like to show you what I've achieved since then. This was an assignment that I handed up several days ago.
It is a whiteboard application… without the whiteboard ;-) It's designed exactly according to the assignment specification, so I want to modify it later (now that it's been handed up) to work with an actual drawing board.
Description
Connecting to the server
java Client [host] [post] [username]
To start the client, I need to provide a host (e.g. localhost or 216.239.51.99) and a port number (anything above 1024, as ports below that number are reserved by the system).
Assuming that the server is already running on that host and port number, the client will connect, and the server will send back a message beginning with "WELCOME".
Sending draw messages
DRAW [x1] [y1] [x2] [y2] [colour]
The idea with the DRAW command is that you provide a series of coordinates that can be used by a whiteboard application to draw a rectangle on the screen of each client (top-left corner at (x1, y1) and bottom-right corner at (x2, y2)).
Once this command has been sent to the server, the server checks that it is valid (coordinates within range, colour is a valid colour) and then sends back a DRAWMSG command to all connected and logged in clients.
Essentially, one client attempts to draw on the screen. If the attempt to draw is accepted by the server, then all clients (including the one that sent the message) will see a rectangle appear on the screen at those coordinates.



Oh I get it. So it's a backend framework for a whiteboard application — it doesn't draw rectangles, but provides the correct information to an imaginary function that would draw on a whiteboard.
λ James Kanjo
Blog | Wikidot Expert | λ and Proud
Web Developer | HTML | CSS | JavaScript
Exactly! :)
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
Do they teach you how to do this sort of thing at your Uni?
λ James Kanjo
Blog | Wikidot Expert | λ and Proud
Web Developer | HTML | CSS | JavaScript
Well, for this particular course the lecturer was useless - had to teach myself most of it. But yes, that's the second assignment - so that's what we were working towards for this semester.
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
Nice to hear your voice Shane; I loved the bit where you typed a Client command to MACOS and the audience was on the edge of their seats wondering if you'd realise in time :-D
It strikes me that, as you said at the end, what you have implemented so far is the same as Skype and other IM system plus some parsing and error-checking. So if you took the other half of the application — the actual whiteboard bit — and replaced the back-end with a Skype/XMMP/whatever client, you would have a collaborative whiteboard that was usable with Skype/etc.
Copyright waived on Wikidot official and community sites — see profile for details.
Website: www.soronlin.org.uk
Diaspora*: ku.em.ecatstam.dop|nilnoros#ku.em.ecatstam.dop|nilnoros
"… on the edge of their seats"? I think you exaggerate! ;-)
And yes, theoretically it would be possible to take an existing standard like Skype and add a whiteboard front-end to it.
Skype's protocols are closed-source as far as a I know - and Microsoft taking over the company probably means that it will stay that way. But I think there have been a couple of open-source efforts to replicate the Skype protocol, some of which have seen some success. I remember reading something about it a few weeks ago on Engadget.
What I've created here is probably a lot more similar to IRC. You specify a server to connect to, can log in using whatever name you want (as long as it isn't already taken), and can then send text-based messages to other clients that are also connected to that server.
Maybe I should try writing an IRC client sometime, with a whiteboard tacked-on for those that want to use it. It's probably already been done before, but I'm guessing that it'd be very similar to this.
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
The protocols for Skype are proprietary, but I understand there is an API available, not that I have ever seen or used it.
As for others, yes there are a few open-source protocols, for example XMMP that Google-Talk uses. See http://www.jitsi.org
Copyright waived on Wikidot official and community sites — see profile for details.
Website: www.soronlin.org.uk
Diaspora*: ku.em.ecatstam.dop|nilnoros#ku.em.ecatstam.dop|nilnoros
Shame about the South Australian accent though… XD
λ James Kanjo
Blog | Wikidot Expert | λ and Proud
Web Developer | HTML | CSS | JavaScript
It's weird. People say that I have a British accent. Yet as far back as I'm aware, we're all "pure-bred" Aussies.
Edit: Not that being British or having a British accent would be a bad thing… not at all! ;-)
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
I'll have a look at that XMMP protocol soon then.
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
Yes, I agree, it sometimes sounds british. Well, when the South Australian ladies speak anyways. Blokes seem to have a different accent altogether XD
But one thing's for certain, you don't have that superior Melbournian accent. </taunt>
λ James Kanjo
Blog | Wikidot Expert | λ and Proud
Web Developer | HTML | CSS | JavaScript
Haha - is that all you have that is superior? ;-)
I seem to remember Victoria stealing our upstream water supply during the drought, your lack of a decent beer (VB), and the fact that you lost several defence contracts to builders in SA :)
< harmless taunting >
To be honest, my accent is nothing like other South Aussies, so don't judge us after only hearing my voice or you'll be very surprised if you ever visit our state.
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
We also have a superior AFL team: the Collingwood Magpies!
What's your excuse? Port Power and the Crows? Pft.
λ James Kanjo
Blog | Wikidot Expert | λ and Proud
Web Developer | HTML | CSS | JavaScript
Wait… out of 16 clubs in the Australian Football League, Victoria has 10 of those. And you consider that having one superior football team is an achievement? ;-)
Though I admit, Power and Crows are performing very, very badly this season. And last season. And the season before that! :S
:D
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
Oh there are plenty more excellent Victorian AFL clubs, it's just that nothing compares with Collingwood XD
We also have the tallest residential building, the Eureka tower, in the country (in the world?). Muahahahahaha.
That's right, size matters :D
λ James Kanjo
Blog | Wikidot Expert | λ and Proud
Web Developer | HTML | CSS | JavaScript
Of course it does!
I had to check the number of users Wikidot has at the moment as part of an assignment (I've been using Wikidot in some way for almost every assignment this semester!) … and we're up to 850,000 now!
850,769 as of right this second.
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
Oh… have you considered using Twitter, James? It's extremely useful for sending quick messages (similar to an SMS). Every now and then I want to ask you something about STE on there, but can't! :)
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
Frankly, I don't know how to use Twitter. Like, why should I use Twitter over other communications?
λ James Kanjo
Blog | Wikidot Expert | λ and Proud
Web Developer | HTML | CSS | JavaScript
Sorry, that came across as rhetorical… it was supposed to be a genuine question.
λ James Kanjo
Blog | Wikidot Expert | λ and Proud
Web Developer | HTML | CSS | JavaScript
People use Twitter for many different reasons, so I can only speak for myself.
Primarily, I use it as a way of asking quick questions of one or more people, or quickly informing them of something. If they're online, they'll get a notification and sometimes I'll get a reply within 30 seconds of asking. In this way, it's very similar to how I use SMS - but it's free, and I can use it on my computer (which I'm on most of the day) rather than the phone (which sits by the window where the best reception is on our property!).
From time to time I also use it to speak directly to companies. For example, I had a short conversation recently with a Microsoft rep about Office for Mac. Much faster than waiting for an e-mail response or using a call centre. (Edit: Here's the conversation if you're interested, read bottom-to-top: image)
For the 'wdeditor' account, I usually post questions about STE & provide updates (how soon until the next release, asking questions from Bryce and Rob at the same time as I'm writing code, etc.)
I'd highly suggest trying the official "Twitter for Mac" application in the App Store, rather than using the website. It makes Twitter much easier to use (and can be launched automatically at startup, as with any other app).
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
Post preview:
Close preview