Flask framework or PHP?

Hello Everyone,

I have an issue with chosing the right programming language, I’m so confused on which one to choose, I tried both of them and I really like flask(python) and the way its written and php is a little bit confusing in the code but I like the simplicity of it , it’s ready out of the box, I also read a lot of bad comments about php and it’s not recommended at all but I’m not sure if it’s true of not since a lot of people still like and use php. I have the basic knowledge of both but which one should I stick too and fight the learning difficulties for it??

I really need to start developing some websites with a backend, and I’m tired of switching back and forth between the two.


I personally think flask is a nice and simple framework, so I have no problem recommending it. But I’m by far a pro and have only used it for a simple server page for stats at home, but there it worked really great. If there is any avantages to go with a php based framework I don’t know…

So flash is a simple lightweight modular framework would be the best way to describe it. It is nice to make small projects or something you want to hack together in a day. But if you want to do full on web dev, with python I would recommend django. The framework is robust and has a lot of features that you don’t need to implement or make sure of when you code. With flask, you really need to pay attention to making sure your code is safe and secure. If you don’t know much about web security I would go with django and follow their guidelines.

If you end up with php then I would also recommend laravel. It is another popular and robust framework.

Whichever language you pick as long as you take the time to understand it, it is really not a big deal which you pick. My personal preference is python but I’ve known a lot of devs using php with laravel.

Hope that helps

1 Like

There ain’t one :wink:

There are bad comments about everything. Linux, Windows, C, C++, Python, Playstation, Xbox, Information Systems, Computer Science, Play-Doh, Silly Puddy, etc.

If you do any sort of freelance work, PHP is still the dominant environment (in my limited experience).

Looks like you made your choice :smiley:

Seriously though, if you like Python, and it interests you, go for it. Master it. You can always learn PHP later, or NodeJS, or C, or Assembly, or C#. Dig deep and learn the concepts of development and engineering. Learning a language is the easy part :slight_smile:



Good point, learn sed and awk while you’re at it :smile:

django gives you templating and a SQL orm in addition to an http server.

flask gives you an http server, and you can use SQL alchemy as a lightweight orm, and jinja2 for templates (if you need those things, maybe you just need templates and rpc, maybe just database and templates and don’t need flask), maybe you don’t need templates if all you’re doing is REST.

PHP is the lazy mans language, i mean anything you can think of there is someone who made a method/API which solves your problem.
But if you’re making a enterprise level project stay away, the compiler it works and all, but do not trust it to stay alive several days/weeks in a while loop.
My use case for php is scripting, anything else i use “insert language of own choice”.
My development nightmare was taking over a enterprise “piece” developed by a 15 years of experience embeded software engineer, developed through 6+ months(ofc written in php), and gawd molly i have never seen a more unstable piece of “software”, it was BAD i mean i couldn’t even make outside scripts reading .log/txt files without it just going nuts.
PHP is not a enterprise language, even if they slapped on a namespace tag, and then pretend it is so. but for a 150 lines script, you wont find better, especially in coorperation with bash.

If PHP I would recommend Bolt.

1 Like

I, too.

1 Like

@foppe This thread has long since past. If you would like to start up a new thread, please do so. Thread locked due to necro with low-effort post.