Saturday 27 May 2017

PHP with socket.io or recreate everything in node.js and socket.io?

I'm currently planning on coding a private project, to be more specific a virtual chat room, where avatars can walk around chat.

Now I'm literally a little confused, which language should be used to code it in. For now I've used PHP for the backend things, such as authentification and HTML for the frontend.

But i know i will need to use Javascript, to draw the chatroom assets to a canvas element. And i will need to use socket.io (node.js) for the chat and the packets.

Now my question, can I even use PHP in the backend and use socket.io for the communication between the server and the client and the chat itself?

For now the process is the following:

  1. User logs into a account, the background check is done in php
  2. User gets redirected to a Dashboard
  3. User selects the menu point world
  4. User selects a chat world and gets redirected to another site which contains a canvas and a chatbox

Screenshot of step 3: Select world

Screenshot of step 4: Canvas with chatbox

How could I create a socket after building the canvas to use socket io to communicate with the server and to create the chat application?

Would it be easier to code the whole site without PHP and just using node.js and socket.io (Also for the user autentification etc) ?

I appreciate any kind of suggestions and help



via d4neZworldQuestions

No comments:

Post a Comment