Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 4th, 2011, 09:03 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 2
Thanks: 2
Thanked 0 Times in 0 Posts
Default MVC based Live Chat

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 ?

I appreciate your help . Thank you really much in advance!!!
Reply With Quote
  #2 (permalink)  
Old December 4th, 2011, 09:26 AM
Authorized User
Points: 105, Level: 2
Points: 105, Level: 2 Points: 105, Level: 2 Points: 105, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Location: Wolfeboro, New Hampshire / Boston
Posts: 25
Thanks: 1
Thanked 4 Times in 4 Posts
Default More info needed

Could you be more specific about the technical part of what your trying to do? I couldn't get the precise problem. And yes, it would be helpful if you posted the code.

BTW. Your boss is an idiot. MVC is a great pattern for lots of things, but not everything. You need to apply the right tool for the problem at hand. I'd suggest you tell him to go cut down a tree, but with his hands tied behind his back and with a screwdriver instead of an axe and see how he feels

Last edited by BozHogan; December 4th, 2011 at 09:28 AM.
Reply With Quote
The Following User Says Thank You to BozHogan For This Useful Post:
narek (December 4th, 2011)
  #3 (permalink)  
Old December 4th, 2011, 09:39 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 2
Thanks: 2
Thanked 0 Times in 0 Posts
Default

BozHogan thank you . Is there an option in the forum to upload files or I have to paste all of it here . Since there are about 10 files .But however I can squeeze them and paste them here using some php code tags .
Reply With Quote
  #4 (permalink)  
Old December 4th, 2011, 11:18 AM
Authorized User
Points: 105, Level: 2
Points: 105, Level: 2 Points: 105, Level: 2 Points: 105, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Location: Wolfeboro, New Hampshire / Boston
Posts: 25
Thanks: 1
Thanked 4 Times in 4 Posts
Default

It' been a while, but I don't think you can upload. In the past, people have used the [code tags. And It's pretty easy to copy/paste it into our own files. Don't forget to indicate filenames if appropriate.
Reply With Quote
The Following User Says Thank You to BozHogan For This Useful Post:
narek (December 4th, 2011)
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make Live Voice Chat through ASP.NET ? savan_thakkar ASP.NET 1.0 and 1.1 Professional 3 January 22nd, 2013 11:30 AM
Asp.net , mvc or c# project based book firtinalim All Other Wrox Books 1 August 10th, 2011 06:54 AM
Live Chat Software ramuis78 ASP.NET 1.0 and 1.1 Basics 4 May 22nd, 2007 01:30 PM
String format help ---Live chat janani ASP.NET 1.0 and 1.1 Basics 0 April 20th, 2006 11:36 AM
Live Support Chat code surendran Classic ASP Basics 0 August 26th, 2005 11:57 PM



All times are GMT -4. The time now is 03:02 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.