New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
CodeIgniter
nano / notepad++
Laravel + VSCODE
Drink two bottles of vodka in 5 minutes, sit in front of a computer, open the notepad++.
Half a day later, you will wake up on your bed and find your coding complete on the computer.
Dat's how ya code.
Brand doesn't matter? Absolut or any other?
Visual Studio Code during nights.
Brand matters not! It's vodka! The soul drink of Russians.
Not in the early morning or very late evening.
Not without the buildserver permission.
The buildserver is king.
Atom Editor 4 ever.
Vanilla rulez, using a framework is like having sex with a condom but expecting a child.
Vim
Vodka? Just take a bottle or two of Polmos Spirytus Rektyfikowany (96% ABV). Around 3 weeks later after you wake up you'll find that you've completed all of your incomplete development projects from the last four years!
Meh. Just drink самогон (almost like moonshine but not really). You'll never get sober again. You wake up the next day, drink a glass of water and voila! You're drunk again. All your php worries are done for.
Laravel for framework. PHPStorm + WSL for IDE.
Antidepressants.
Sorry, I use java and golang.
Notepad++
PhpStorm
simple framework like thing developed by my own with vscode. Here is the link to the project if anyone interested http://github.com/avanciro/skel ( PR's welcome, because my code is bad and I know it )
Vi, mostly but sometimes the 'legacy' cPanel file editor.
PHP is actually a framework of C, called Zend.
It was made for people who find it difficult to understand a compiled language like C, Rust or Go.
You are paying a high price in terms of performance, for the syntax sugar of PHP. Things such as spawning a thread per request introduces context switching and syscalls which makes PHP one of the worst performing languages for servers (1)
https://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=plaintext
Profanity.
foreach ($fucks as $fuck) {
if ( $fuck > $givemore ) {
$givemore = $fuck;
}
//TODO: Give as much of a fuck about this script as I fucking can. Nobody gonna see it except me.
}
escape colon ex
Seems that issue will largely get solved by the introduction of the JIT compiler https://medium.com/jp-tech/try-out-jit-compiler-with-php-8-0-a020e6aeb3e5
Notepad++ with SFTP plugin is the way to go. Of course vodka will help throughout your journey.
phpDesigner
I only use PHP for the one project. This project was started well before NodeJS and even before the popularity of most of the current PHP frameworks. These days if I was to redevelop it (unlikely to happen) I would do an API first design in NodeJS. For any serious new endevour I would do the same (I might still use PHP for a small hacked together project w/o serious need for API).
This one project uses it's own framework. The framework it uses was born from the projects I was developing at that time (including this one).
Today however I would definitely develop any PHP project in a modern open source framework. I have no particular preference (research would be required). I would certainly prioritize something minimal, component driven and obeying PSR standards with composer compatible autoloading.
@Jona4s PHP performs well enough for many peoples needs.
I've scaled my web cluster out to 2x web nodes (only for redundancy) and 3x backend nodes (PHP job queue). Memory has always been the bigger issue than raw performance - and on that front I've found PHP to do better than most NodeJS applications (primarily due to the consistency & predictability of the process based model) along with the entire clearing of (non shm) memory at end of process.
I'm looking forward to PHP 8.0 for the backend job queue but not the web side. Why? Because the web side is already fast enough. Some of the work we do on the backend nodes is heavy number processing which is not PHP's strong suit (VM overheads). I've played with PHP8.0 and preliminary results look good (~+30%).
As with everything, choose the right tool for the job.
Doing a high performance api or microservice?
Start by looking into Lua (openresty), Rust or NodeJS depending on your performance requirements and available resources.
Doing a simple stand alone website?
PHP or NodeJS are both good choices with different pros and cons.
Doing something with lots of backend work between requests or websockets?
NodeJS is very strong in this area.
Oh and never Ruby
@SplitIce I wouldn't use Node for anything that needs to do the heavy lifting, mainly due to the execution being single-threaded. You can of course use the new worker threads API but it's far from perfect with no memory sharing being available.
From my experience with building GameDash that mainly uses PHP in the backend to provide an API for the rest of the services to talk to, I would use Kotlin/Java.
@CConner
It might be different in your space but in the professional spaces I consult in most services (including NodeJS based) deployed are built to be horizontally scalable. Usually via multiple processes, sometimes via webworkers.
NodeJS is often more optimal for anything that needs to heavy lifting due to the relatively low costs of keeping a request open in a well tuned application. No entire thread / process and per request VM instance (with code, stack and globals) to keep in memory. Hell many applications can achieve 2-3 simultaneous requests at 100% speed per process just from the time spent querying data sources like SQL databases.
The biggest issues I have seen with NodeJS have been:
If you give a NodeJS a comparable number of processes to your PHP application (up to number of cpu cores +/- 1 depending on particular case) and use a decent load balancer I would be surprised if you did not achieve better performance (responsiveness, ttfb or req/s) with NodeJS over PHP.
But you should ask yourself if it matters. It's no more than $5 for a 1core/1GB virtual machine in the (non AWS) cloud these days. Kubernetes options are nearly as cheap too. As long as you can horizontally scale your application professionally it's an easy sell to spin up 32, 64 or even 128 of these instances. It's unlikely to even be a drop in the project budget bucket. You will likely have more serious issues scaling your databases.
Memory on the other hand has more commonly been an issue with NodeJS applications I've seen. I've seen a project which required 4-8GB instances just to run due to localized peaks. Now those were a different story ($$$$$/m on AWS for the cluster)...
Guys, keep thread clean from "x is better than PHP".
It became a habit to complain about php a lot. People do that on all sorts of forums like vanilla, discourse and even blog about it on their own wordpress. How about not using it then? Oh... wait.
This.
@SplitIce Yeah, the space you're working is a lot different compared to mine, considering I am working on a product for mass consumption rather than an architected business solution. Why I personally would not choose PHP for a project again is because it lacks some higher-level features such as full static type support (generics, arrays), enums, and threads with memory sharing.
As you said yourself, the choice of language isn't important if that is deemed to be the right tool for the job.
As with any language that has a higher than normal % of beginner programmers, people shit on the language rather than the people who write it.
ps. I would keep an eye on https://deno.land/ - using it for a small app and it does pretty much everything better than node.