Skip navigation.

Technolosity

Random rant about technical things.

Posts tagged with "javascript"

Chat updated, again...

, , , ...

I'm too lazy to take a screenshot. Look here if you want to see.

New features that I remember:
  • A bit more enhanced look
  • Interface uses jQuery (I know I said I'd use Prototype, but jQuery was easier to implement)
  • Auto-create URLs
  • Text format adds: CSS3 text-shadow
  • YouTube video popup window thingamajig whatchamacallit
  • Sent message history (up and down arrows)
  • Remote server connection (some clichés with images though, too lazy)

Still lacking:
  • Database
  • File-sharing
  • More

Interesting thing here is remote server connection. Just putting the following in a page header you'll be able to connect and see my chat. I can't be less arsed to test it though.
<link rel=stylesheet href="http://joonasr.com/webchat/default.css" type="text/css" title="style" id="stylesheet" />
<script type="text/javascript" src="http://joonasr.com/webchat/javascript/chat-remote.js"></script>
<script type="text/javascript">
var localServer = false;
var debug = 1; // very optional
</script>

The Javascript files are not minified, so I guess everyone are free to study them. There's also tiny feedback form in the chat if someone wants to send me some crappy comments. That's it. One of my shortest posts.

http://joonasr.com/webchat/

Webchat updates

, ,

So, it's been quiet for a while (though no one ever visits, so nevermind). I have made some updates to my webchat. I'll be quick. New enhancements of the chat as I can remember:

  • New look
  • Server sends the data to the client in JSON form
  • Text formatting (not sure how it is called, but you can use *bold*, _underline_ and /italic/)
  • Auto-resize the input field for screen size (togglable)
  • Settings "window" (small movable popup-thingamajig) for font and stuff

And btw, I left debugging on, so you can see all the data sent (POST) and received (JSON).

JSON
JSON part here is the biggest thing under the hood, I guess. It is basically a data format like XML, but suits better for Ajax applications since it's minimalistic.

JSON packet example received from the server:
{"messages":
  [
    {"type":"rooms","roomlist":
      [
        {"name":"<roomName>","passRequired":"0"},
        {"name":"<roomName>","passRequired":"1"},
      ]
    },
    {"type":"system","text":"<text>","color":"<color>"},
    {"type":"msg","user":"<nick>","text":"<text>","time":"<time>"},
    {"type":"users":"userlist":
      [
        {"user":"<nick>","color":"<color"},
        {"user":"<nick>","color":"<color>"},
      ]
    },
  ]
}


Upcoming
Something I expect to do in the future:
  • Implement Prototype framework
  • Make the interface class-based, so maintaining is easier
  • Have more developers (?)
  • Database version (!)
  • Support for external domain usage (actually, it is already theoretically possible)
  • File-share
  • Registration, user-levels etc

So, lately I have been studying Prototype Javascript framework. In the near (or not-so-near) future I plan to add it more in use. I already have a test build which uses it for certain stuff. Maybe some reader has some other recommendations...

Though, right now I should design the database for this all. So, hmmm...

One interesting concept would be external domain usage of this chat and custom user interfaces. As the interface mostly consists of Javascript and CSS, it shouldn't be too hard to implement it. Maybe I should first make some chat "framework" first. Hmm... The endless possibilities...

Teh future
In the future the purpose of this chat is probably be open-source, customizable, feature-rich and easily deployable webchat. You could choose from two options: hosting the whole system in your website OR implementing only an interface to use centralized system.

Anyone interested is welcome to come and pinch me (not too hard), developers and users equally.

Ta ta, for now.

Javacsript web browser...

...ridiculous, really. "Ajax" is there because I copied the page from my previous thing.
Download Opera, the fastest and most secure browser
December 2009
M T W T F S S
November 2009January 2010
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31