Minichan

Topic: I want to create a simple chat room. Need some advice.

Handel !khEOdtKF56 started this discussion 3 weeks ago #16,635

I was hoping to build the sever in Java and the client in flash.
I've attempted various tutorials on the web but keep hitting walls with each of them.
I also looked at using HTML 5 or PHP instead but with no success.

Basically I'm asking has anyone ever attempted this here or do they know a tutorial or even an easier way of going about making it.

Anonymous B joined in and replied with this 3 weeks ago, 24 minutes later[^] [v] #284,886

just use mibbit

r04r !GETFUCKED joined in and replied with this 3 weeks ago, 7 minutes later, 31 minutes after the original post[^] [v] #284,887

Are you sure you want to create it yourself? Making the server in java means you need a dedicated place to host it, which can be inconvenient. You might just want to look into registering a room on any popular IRC server, and if it has to be private put a password on it.

A bit of context would be good to help decide what would be the most fitting solution.

Handel !khEOdtKF56 (OP) replied with this 3 weeks ago, 1 hour later, 1 hour after the original post[^] [v] #284,901

@previous

> Are you sure you want to create it yourself?

Once it's created I want to modify the GUI, it's for my FYP.

> Making the server in java means you need a dedicated place to host it, which can be inconvenient.

It doesn't have to run online, if I can host it locally and test it locally that is fine for me.

- I needs to have drop-down lists, the list will display players currently in the chat room.
- I need to set permissions for users. (I.e. You may be able to see one person chat but they may not be able to see yours).
- I need to be able to set a limit on how many people can access the chat room at once time.
- Another thing that would be great is that I can run several chat rooms at one time.

The final GUI should look and run similar to the chat room GUI used on this site.
http://www.epicmafia.com/home

r04r !GETFUCKED replied with this 3 weeks ago, 6 minutes later, 1 hour after the original post[^] [v] #284,903

@previous
I'm not sure what an FYP is, nor do I really know what you mean with
> You may be able to see one person chat but they may not be able to see yours

Besides that, IRC has most of the things you're looking for and Mibbit is a decent interface for that but you won't be able to customize the GUI.

How many users do you think there'll be there at most? If isn't tremendously much you could just adapt a simple PHP/JavaScript polling chat script.

If there's more, and you're looking for performance then:
Do you have any prior experience in flash? If not, I recommend abandoning flash for javascript websockets, and then either writing the server in Java using this library for handling the websocket communication on the java side.

If you don't mind not using Java, node.js is very sexy and there are a lot of realtime examples for it suck as socket.io.

Anonymous D joined in and replied with this 3 weeks ago, 5 minutes later, 1 hour after the original post[^] [v] #284,904

@previous
> I'm not sure what an FYP is
Final year project.

Handel !khEOdtKF56 (OP) replied with this 3 weeks ago, 34 minutes later, 2 hours after the original post[^] [v] #284,908

@284,903

FYP = Final Year Project for college

> How many users do you think there'll be there at most?

Ideally 24, but I'd be happy with twelve.

> Do you have any prior experience in flash? If not, I recommend abandoning flash for javascript websockets,

I have experience in flash and that's exactly the way I was going to go about it but I could only find one decent tutorial online and that failed to work.

I'll have a look at what you posted, the picture is an example of what I'd want the chat too look like in the final version:

- On the left is a list of the players currently in the chat room.
- On the right is another list of the players, but this list displays who each player has voted (Players are allowed to vote for a person currently in the chat room all they have to do is click the arrow button beside "pick someone" and a drop down list will appear with the names of the players).

r04r !GETFUCKED replied with this 3 weeks ago, 6 minutes later, 2 hours after the original post[^] [v] #284,909

@previous
Ah, I see. Definitely a custom tailored solution, then. If you want to learn/do something that isn't going to be obsolete in several years I strongly suggest staying the fuck away from flash. It's bad, and it needs to die.

For that number of users you can easily make it work with XHR polling (Javascript AJAX requests that query a given URL which provides the latest information), and the server could be in PHP making it completely portable.

A more efficient, and fun, solution would be using WebSockets (In JavaScript) with whatever server-side implementation you want, both Node.JS and Java are good for that. For browsers that don't yet support websockets you can embed a bit of flash that emulates websocket support, and is only activated for browsers that need it.


Is this seriously enough for a Final Year Project?

(Edited 1 minute later.)

Handel !khEOdtKF56 (OP) replied with this 3 weeks ago, 17 minutes later, 2 hours after the original post[^] [v] #284,910

@previous

> If you want to learn/do something that isn't going to be obsolete in several years I strongly suggest staying the fuck away from flash.

My lectures bitching and whining about this but I've been learning Java and Flash for nearly fours years now, I would love to do using HTML5 and PHP (because I would get bonus marks) but my knowledge on them would be limited.

> Is this seriously enough for a Final Year Project?

The project is graded 50% design and 50% programming. If I can get this working and show that I understand it I should get the vast majority of my programming marks. I also intend to have a register and login feature using JSP (Which was basically don'e for my by my lecture) and a basic 3D image viewing gallery.

I'm falling down on design marks at the moment, they're trying to make out I don't have enough design incorporated into the project which is a load of cock. I was think of having video or voice chat but then I'd be running into other problems like bandwidth, opening a whole new kettle of fish.

The project is double weighed (It's counts as two modules so it's marked out of 200%) and I have four other modules (Mobile Application Development, Human Cognition and Communication, Enterprise Programming and Project Management).

r04r !GETFUCKED replied with this 3 weeks ago, 3 minutes later, 2 hours after the original post[^] [v] #284,911

@previous
Ah, alright. Well if you need any help with Java, JavaScript, HTML5 or PHP feel free to ask. I'll have to say again that the java websocket library I linked is a pleasure to work with. I've used it before myself, and it works well.
:
Or use an imgur URL: [upload]

You are required to fill in a captcha for your first 3 posts. That's only 3 more! We apologize, but this helps stop spam.

Please familiarise yourself with the rules and markup syntax before posting, also keep in mind you can minify URLs using MiniURL and generate image macros using MiniMacro.