If you like DNray Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

From PHP to Python, Ruby, or Node.js - Is it Feasible?

Started by Uplannoky, Aug 09, 2023, 06:07 AM

Previous topic - Next topic

UplannokyTopic starter

I am new to web programming and have chosen back-end development as my main focus. I have some basic knowledge in Pascal (Delphi) and C/C++ from university courses. Currently, I am working on a PHP course paper and taking classes on it at my university this semester. Although PHP was not my first choice, I find it relatively simple to work with, especially given the tasks I have been given. However, coming from a background in C++, I do not find the code in PHP as aesthetically pleasing. As a beginner, my code is a mix of HTML tags and PHP constructs. While this bothers me to some extent, I can manage since most of the code is still intuitive due to its small size.

In addition to these challenges, I have noticed that whenever I read discussions or articles comparing programming languages for back-end development, there is often a lot of criticism towards PHP, both from developers in Python and Ruby, as well as from PHP developers themselves. This constant negativity can be discouraging. Consequently, I have also started exploring Python (with a potential transition to Django) and Ruby on Rails. I have come across many positive reviews from PHP programmers who switched to these languages, although there were also instances of dissatisfaction expressed towards them.

While I haven't personally studied Python or Ruby yet, I am aware of some of their advantages. Python is praised for its execution speed (which is comparable to PHP 5.6, but PHP 8 promises to be much faster), as well as its development and structuring capabilities. On the other hand, Ruby's syntax is highly praised, allowing code to be read like English text. Nonetheless, both PHP and Python have slower speeds, and PHP seems to be losing popularity lately (at least in certain regions).

Despite this, PHP has been developing rapidly, with an abundance of job opportunities (although there are also a fair share of poor-quality developers and a focus on maintaining and improving existing CMS systems). There are also impressive frameworks available like Symfony, Zend, and Yii (although I cannot personally vouch for their quality).

To summarize my questions:
1. Is PHP dying or already dead? If so, why is it still progressing faster than some other languages?
2. If the answer to the first question is that PHP was poorly designed from the start, do PHP developers have a chance to catch up in terms of language improvements?

In short, my main question is whether it is worthwhile to invest time in learning PHP, considering its future prospects beyond CMS-related work.
  •  


yestyle

Here are some thoughts on your concerns:

1. Is PHP dying or already dead? If so, why is it still progressing faster than some other languages?
PHP is not dying or dead. While it might not be as trendy as some other languages like Python or Ruby, it remains widely used and actively maintained. PHP has a large codebase and an extensive ecosystem, including popular frameworks like Laravel and Symfony. It is constantly evolving, with regular updates and improvements being made to the language. PHP's continued popularity can be attributed to several factors, such as its historical dominance in web development, the extensive support for existing CMS systems, and the vast number of PHP developers worldwide.

2. If the answer to the first question is that PHP was poorly designed from the start, do PHP developers have a chance to catch up in terms of language improvements?
While PHP had its share of criticisms in the past, it has undergone significant improvements over the years. PHP 7 introduced performance enhancements, increased type safety, and better error handling. PHP 8 further builds upon these improvements and introduces new features and optimizations. The PHP community actively works on enhancing the language, addressing past limitations, and adopting modern programming practices. Tools and frameworks like Composer, PHPUnit, and PHPStan have also contributed to improving the development experience with PHP.

PHP developers have a chance to catch up with language improvements by staying up-to-date with the latest versions, best practices, and adopting modern PHP coding standards. Continuing education, exploring new frameworks, and engaging with the PHP community can help developers enhance their skills and keep pace with the evolving landscape.

In terms of whether it's worthwhile to invest time in learning PHP, the answer depends on your specific goals and interests. PHP still offers numerous job opportunities, particularly in web development and maintaining existing systems. Acquiring proficiency in PHP, along with popular frameworks like Laravel, can provide a solid foundation for a career in back-end web development. However, it's also beneficial to explore other languages and frameworks to broaden your skillset and stay adaptable in the rapidly evolving tech industry.

points to consider:

1. PHP's Dominance in Web Development: PHP has long been the go-to language for web development, and it powers a significant portion of the web. Many popular content management systems (CMS) like WordPress, Drupal, and Joomla are built on PHP. This means that there is a consistent demand for PHP developers to maintain and develop websites and applications built on these platforms.

2. PHP's Ease of Use: PHP was designed to be easy to learn and use, especially for beginners. Its syntax is often considered more forgiving than other languages, making it accessible to those new to programming. Additionally, PHP has extensive documentation and a large community, making it easier to find resources and get support when needed.

3. Language Improvements: As mentioned earlier, PHP has seen substantial improvements and continues to evolve. The introduction of newer versions like PHP 7 and PHP 8 brings performance enhancements, better type safety, and new features. While PHP may have had some design flaws in its early days, it has made significant progress in recent years.

4. Frameworks and Tools: PHP has a rich ecosystem of frameworks, libraries, and tools that make web development faster and more efficient. Frameworks like Laravel, Symfony, and CodeIgniter offer robust solutions for building complex web applications. These frameworks follow modern development practices and help improve the overall quality of PHP projects.

5. Job Opportunities: Despite the criticisms, there is still a strong demand for PHP developers in the job market. Many companies have existing PHP codebases and require skilled developers to maintain and expand them. By learning PHP, you can tap into a wide range of job opportunities.

6. Integration and Compatibility: PHP integrates well with various databases, web servers, and operating systems. It also provides seamless integration with front-end technologies like HTML, CSS, and JavaScript. This interoperability makes PHP a versatile choice for building web applications.

Remember, each programming language has its strengths and weaknesses, and the decision to learn PHP (or any other language) depends on your specific goals, interests, and market demand in your region. It's essential to consider factors like project requirements, job prospects, community support, and personal preferences when choosing a programming language to specialize in. Keep exploring, learning, and adapting to stay relevant in the ever-evolving field of web development.
  •  

surekhabhardwaj

I have no positive emotions about the C++ code; the code is different. The PHP code, for the most part, also does not evoke positive emotions in me, but it is possible to write in it normally.

Under the phrase "PHP is dying," he understands his work model. After each request, it dies, meaning the worker is cleaned and launched essentially every month. This simplifies the work and scaling, although it significantly affects performance. Fortunately, with PHP 5.3, writing daemons in PHP is not as daunting as before.

Looking at the market and the dynamics of community development, PHP is the most vibrant language.

PHP is not such a strange language. I don't consider "non-consistent function names" to be a major factor in choosing a language. From my perspective, Ruby is an attempt to make an object-oriented pearl but comes off as an ugly burp (this is my personal opinion, and I apologize if it offends anyone). However, the Ruby developer community appreciates and understands business goals, respects testing, and so on. In other words, the PHP community is still growing in these areas, but progress is visible.

While the language has its flaws, they are slowly being addressed and problems are being eliminated.

No, it's highly unlikely to learn another programming language and framework from scratch at a proficient level, and it doesn't make sense to do so.

Based on your question, it seems like you've already made up your mind. Further discussion may not be necessary; please figure it out on your own. However, if we consider shared hosting, PHP is probably the most suitable option today (excluding the fact that shared hosting itself may not be the best choice).

It all depends on you. Good developers earn roughly the same, regardless of the programming language they work with. They are simply good developers, and they are always in demand.

As you wish.

A programming language is merely a tool for problem-solving. Frameworks are also tools for solving problems. What matters is the ability to effectively solve problems and understand that making questionable decisions increases business risks.

Learning a programming language is only a small part of what you need to master. With the right experience, you will be able to find common concepts, transfer knowledge from one platform to another, abstract from specific implementations in different frameworks, and so on.

For example, Ruby is chosen by businesses, particularly startups, not because it's a great language, but because the Ruby community is generally better at effectively solving business problems. Just consider their emphasis on testing from the very beginning.

Don't learn a programming language; learn development using that language. Everything will become much easier then.
  •  

sduggal

I see that you have asked numerous questions and have provided answers to them as well. You use phrases like "..yes, it is understandable ...". So, if everything is clear, don't waste time and start writing applications.

To put it briefly, I will quote a hundred or five good tips for the hundredth time: "...study what you like...". When it comes to everything else, you cannot focus on just one thing. If you want to work on backend development, there's no problem, but you can't ignore modern technologies and the "stack" of these technologies. You cannot rely on just one framework or technology.

The notion of PHP dying out is certainly nonsense.

Regarding Python and Django, I am proficient in both (PHP) and I can code in both. However, from my subjective perspective, I find it more enjoyable to write in Python. I simply prefer it. And here, the main advice I mentioned earlier applies, "write in what you like," if the task allows and you have the option to choose. But, let's say you receive an order to use PHP, would you decline the opportunity and wait until a wizard arrives with an order for Python + Django?

As for the speed of the language, I believe it's too early for you to worry about the speed of a particular language, unless you're building something on the scale of Facebook at this moment. By the way, Instagram, for instance, is written in Python and doesn't seem to struggle with performance. It functions quite well, as do other platforms that effectively accomplish their goals.

Regarding the speed of work, Django is even marketed as a framework "for perfectionists with deadlines," which is stated on the framework's homepage, highlighting its ability for quick development. The same can be said for Laravel. If you want something more advanced, Symfony is usually the choice. However, it often doesn't make sense to use Symphony for small websites, not because it's inferior, but because there are faster alternatives. In commercial development, the speed of development is often considered the primary criterion for clients.

For larger projects, deadlines are still set, though they tend to be more generous, and Symphony is commonly used in such cases. Nevertheless, Django is suitable for both small and large projects. For API development, different tools are usually employed in PHP and Python, including various backend microframeworks.

To summarize, a couple of key points can be observed:
1. It depends on the specific tasks you are dealing with or the requirements set by the client (company management).
2. If you have the opportunity to choose and it will lead you to the desired outcome, go with what you prefer. Python may not suit everyone, just like PHP.

In closing, I wanted to end on a positive note =), so I'll say this: despite all that has been mentioned, most of these individuals share one common aspect - "in one way or another, they all use JavaScript."
  •  


If you like DNray forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...