Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 4th, 2011, 10:03 AM
Registered User
 
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!!!
 
Old December 4th, 2011, 10:26 AM
Authorized User
 
Join Date: Jan 2010
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 10:28 AM..
The Following User Says Thank You to BozHogan For This Useful Post:
narek (December 4th, 2011)
 
Old December 4th, 2011, 10:39 AM
Registered User
 
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 .
 
Old December 4th, 2011, 12:18 PM
Authorized User
 
Join Date: Jan 2010
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.
The Following User Says Thank You to BozHogan For This Useful Post:
narek (December 4th, 2011)





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 2 January 22nd, 2013 12:30 PM
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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.