MVC based Live Chat

Discussion in 'PHP' started by narekm, Dec 3, 2011.

  1. narekm

    narekm New Member

    Joined:
    Mar 23, 2011
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    Hello all of you .
    I'll try to explain what I want as clear as possible and if there will be some type of things that yo are unclear with please let me know . I built a live chat using PHP and MySQL (It's a chat programme where when you enter your name and hit submit you immediately are taken to the page where other members are chatting. So saying live chat I mean a type of programme when you enter a message and hit "send" all other members will see it almost instantly ..Like skype's text chat ...I think you already got the idea ). So as I already told you I build it AND applied Db class for the MySQL CRUD . It was a bit procedural . So now I am going to adjust it to be fully OO and most importantly apply MVC . In the project to be honest I kinda applied applied MVC but it didnt satisfy the person who has given me this task . So I am given to do this task in this way . Whatever happens to the page (I mean a person just enters my website OR sends a message OR has entered a username to enter the chat OR I am retreiving the new messages via setTimeout()(Please I know that there are some bandwith related problems but its ok I am supposed to go with this function and please I dont need you to suggest a better way of solving the problem related to new messages output) ) via GET method I will come to the index.php page (where I have Front_Controller.php instantiated) I will choose which controller to choose: for retreiving new messages , for inserting new message ,for inserting the username and outputing the messagesfrom the database . One of many resaons that still make me feel that I am undone with that project because I still have some doubts about javascript beeing as VIEW in MVC . Please you would do me a favour suggesting me to post the code for the livechat that I have done and taking a look at that bloody JavaScript part . So that was the way I handled it.
    So my problem is that I am given to do that this way. So I need from index.php file get 2 values $_GET["controller"] and $_GET["action"] (action=view) . So please could you suggest any method that I can accomplish this just getting two values in the index.php file ? I dont need you write the whole code just need you to put me on the right path .
    And please could you explain to me how basically squeeze that bloody JavaScript in your views ? :nonod::confused:

    I appreciate your help . Thank you really much in advance!!!
     
  2. narekm

    narekm New Member

    Joined:
    Mar 23, 2011
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    I have been waiting for one day and no response this fourm is already not what it used to be . I guess I need to go with others .
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice