Hi,
One of the IT futur, is Container (docker like and kubernetes like) and Single Page Application...
On the other language the tendancy is to simplify the start time and single start of the application (only one process start the application runc) and simplify configuration; and simplify logging (all on the stdout/err of the container) to work better in this type of infrastructure.
On java side for exemple the tendency is bootstraping the servelet engine (of tomcat or jetty) in standalone process... no complex configuration...
With PHP you must use apache+mod_php, or nginx + php-fpm in the same container.... they are very comlex to configure (you must configure php, apache/nginx, some time +htaccess)... to package...
The ideal way is to embed the http server in php to be abel to start directly the php from php cli (php -S localhost:8000) ...
The actual http server implementation are minimal... and not very performante (lake of event/thread/process manager, and lake of http2 support)...
Swoole is perfect exemple of this tendency... but need some addition to permit standard php application like wordpress to work directly on the type of packaging....
And also abscence of concurrency (coroutine or thread, native simple multi process pool like process manager in swoole) are a real obstacle to the progression of php...
Swoole add this with the event model (not real threading, user mode thread)... but real thread while be a must...
Unit project from nginx are good exemple of that and good exemple of these tendency...
Mathieu
Daniel Martín Spiridione , 16/09/2019 20:56:
The lack of concurrent PHP features in 2019 is, in my opinion, sufficient
reason not to use it for CLI projects.
Some companies do not welcome installing extensions like Swoole, the
language should have native concurrent features.
Daniel
El dom., 15 sept. 2019 a las 0:33, Mike Schinkel (mikeschinkel@gmail.com)
escribió:
On Sep 14, 2019, at 5:18 PM, Olumide Samson oludonsexy@gmail.com
wrote:https://jaxenter.com/php-tiobe-sept-2019-162096.html
I think this is one of those things we get from voting no...I might be wrong anyways :-?
If those specific rankings are legitimately a cause for concern then it
would make sense to do some objective analysis to determine why the
languages that are growing marketshare are growing.From the list it seems Python stands out as having the most growth as a
percentage.Googling for "why has python become so popular" I get these articles.
I have copied their top level points but also included the text for the
one point they all seem to have in common, that Python is simple, easy to
use and easy to learn for new users (emphasis mine in all cases):https://medium.com/@trungluongquang/why-python-is-popular-despite-being-super-slow-83a8320412a9
<
https://medium.com/@trungluongquang/why-python-is-popular-despite-being-super-slow-83a8320412a9
- End-users just don’t care (about slower performance)
- More Productive
"First and foremost reason why Python is much popular because it is highly
productive as compared to other programming languages like C++ and Java. It
is much more concise and expressive language and requires less time,
effort, and lines of code to perform the same operations. The Python
features like one-liners and dynamic type system allow developers to write
very fewer lines of code for tasks that require more lines of code in other
languages. This makes Python very easy-to-learn programming language even
for beginners and newbies. For instance, Python programs are slower than
Java, but they also take very less time to develop, as Python codes are 3
to 5 times shorter than Java codes. Python is also very famous for its
simple programming syntax, code readability and English-like commands that
make coding in Python lot easier and efficient."- Execution Speed does not matter as much as Business Speed
https://www.kdnuggets.com/2017/07/6-reasons-python-suddenly-super-popular.html
<
https://www.kdnuggets.com/2017/07/6-reasons-python-suddenly-super-popular.html
- Python Has a Healthy, Active and Supportive Community
- Python Has Some Great Corporate Sponsors
- Python Has Big Data
- Python Has Amazing Libraries
- Python Is Reliable and Efficient
- Python Is Accessible
"For newcomers and beginners, Python is incredibly easy to learn and use.
In fact, it’s one of the most accessible programming languages available.
Part of the reason is the simplified syntax with an emphasis on natural
language. But it’s also because you can write Python code and execute it
much faster."https://www.techrepublic.com/article/why-python-is-so-popular-with-developers-3-reasons-the-language-has-exploded/
<
https://www.techrepublic.com/article/why-python-is-so-popular-with-developers-3-reasons-the-language-has-exploded/
- Ease of learning
"Python is the closest language to what I call 'an instant gratification
language,' meaning with very little code, it can accomplish so much, even
if you are a novice programmer," said Karen Panetta, an IEEE Fellow and
Dean of Graduate Engineering at Tufts University. "This is because Python
reads like English, which makes it more conducive for a broad level of user
audiences to learn. Many of the 'nerdy' low-level details we used to worry
about in other languages, such as declaring types of variables or
arguments, are handled by Python, so it makes programming very flexible and
easier to use than other languages."- The explosion of AI, machine learning, and data science in the
enterprise- A large developer community
https://www.skillsoft.com/blog/2018/06/top-5-reasons-why-python-is-so-popular/
<
https://www.skillsoft.com/blog/2018/06/top-5-reasons-why-python-is-so-popular/
- Python is efficient
- Python has an active community
- Python is simple
"With a shorter learning curve than other languages, say Java or C++, and
understandable and readable syntax, you don’t need to be a programmer to
start applying Python to everyday tasks. Python automatically takes care of
things like garbage collection and even closes files, opened via the ‘with’
statement, for you. People starting out may also find the use of
indentation to signify the start and end of loops, functions, classes and
code blocks easier than tracking down the traditional opening and closing
curly braces."- Python is in academia
- Python is on trend
https://eplexity.com/6-reasons-the-python-programming-language-is-so-popular/
<
https://eplexity.com/6-reasons-the-python-programming-language-is-so-popular/
- Ease of use
"Since its creation in the late 1980s by Guido van Rossum, Python has been
specifically designed to be a general-purpose language. The simplicity of
Python, and its easily human-readable syntax are two reasons why the
language is so popular among seasoned coding professionals and Computer
Science 101 students alike. Python is also an interpreted language, which
means that you can quickly experiment with changes to the code base."- Supportive community
- Corporate sponsors
- Libraries and frameworks
- Use in big data and machine learning
- Efficiency
Notice in none of these articles is there any mention of static typing or
strictness or correctness as an attribute that the authors think
contributes to why Python is gaining success.So my takeaway would be that if we wanted to see PHP start gaining
marketshare again we should focus on features that make it easier to use
and spend less time on trying to raise the bar for the skill level it will
take to program in PHP8.#jmtcw
-Mike
P.S. Other ways to grow market share could be to:
Strive to support data science in a major way
Run on Single Board Computers like Raspberry Pi
Run a CLI via a single executable (i.e. package PHP runtime and PHAR
files together so PHP scripts could be distributed without requiring a
correctly installed version of PHP)Empower developers to create cross-platform desktop, also contained
with a single executableEmpower developers to create cross-platform mobile apps
Pursue corporate sponsors (too bad the Facebook ship already sailed.)
Find ways to get PHP taught in academia
Put more effort into driving adoption for PSRs like 6,7, 11, 14, 15,
16, 18 and in identifying and releasing more.Strive to make PHP the best solution for AWS Lamba and other serverless
solutionsEmbrace all of userland PHP by giving them a voice in the direction of
PHP, instead of limiting that voice to only those currently with a vote via
phpinternals.Of course just because I included it in the list above does not mean the
PHP team needs to pursue (any of) them. I am just pointing out areas where
I think PHP could see some growth if PHP pursued it.Also, any of the above would require the PHP internals community to join
together for the common-good rather than taking no-comprised positions that
each seek one person's view of PHP perfection while blocking everything
else.IMO anyway.