DEV Community

Discussion on: Chat Application using PHP

Collapse
 
xowap profile image
Rémy 🤖

That is definitely a state-of-the-art PHP implementation of a chat API, however you might want to turn to other languages which have more structured approaches.

By example, Python + Django is a fantastic way to learn web development, with neatly separated concerns and it makes it hard/unnatural to turn to bad practices (although I've seen them done too).

Collapse
 
rupeshmohanty profile image
Rupesh Chandra Mohanty

Yeah sure I will try that out too. Thank you for the suggestion 😇

Collapse
 
marcstdt profile image
Marc • Edited

I am unsure, if that is a state-of-the-art PHP implementation.

I guess such an implementation would more refer to an object oriented approach.

Using mysql_real_string_escape (there are also a lot of places, where those are missing.) is kind of outdated too. If you are writing raw querys, it is more common to use prepared statements these days.
The whole procedural programming approach, which was taken here, is in my eyes absolutely not state-of-the art.

There are quite modern PHP Frameworks like Symfony, wich could do the job well.
I don't know Django, but I guess the concepts are quite similar to frameworks like Symfony.
I would recommend staying with PHP for know. Just because it's more difficult to switch a language if someone is at the beginning of his programming carrier.
It's true that PHP is not that usable in some modern web-development scenarios (websockets, realtime-apps etc.), but it's relatively easy to use (like python) and still gets the job done in most classic web-dev scenarios.

I would also suggest Python as a good language to lern next, but maybe spend some more time to get to know modern programming concepts better, with a language you already know.

I would HIGHLY recommend to learn object oriented programming and concepts like Model-View-Controller.

Collapse
 
rupeshmohanty profile image
Rupesh Chandra Mohanty

Thank you for your suggestion😇. I will try this project again using Laravel or Symfony for sure.