I have been looking all over at various turtorials, videos and blogs but i havent seem to find an answer to my question:
Say you have a web application in a traditional framework (such as cakephp
or other PHPframework
)
Normally these will be build using MVC (Model view controller)
Now say we have our helloWorld application.
The first encouter for the client to the applicatoin might be: www.helloWorld/Client/index
According to the tutorials the of socket IO and node js the client will at this point make a connection to the server (the client connects to the socket).
The script that connects to the socket might be put into a layout file making sure that no matter where the user is he is always connected to the server.
Here comes the part i do not understand. if the client changes page wont he reconnect to the server at every page change? or is the nodejs and socket IO smart enough to know that it is on the same server? if so how do you make an application where the client is connected to a socket for as long as he is on your website?