Our typical projects @ Onion Creative are product development for startups, or creative / digital marketing campaigns. These projects typically are more demanding in creativity and feature design, yet having more constraints over budget than most development projects. We need to be very cost conscious when we develop the products for our clients.
Synchronous vs Asynchronous Nature
Laravel being one of the best MVC framework, the synchronous, controller based architecture allow developers to bootstrap their product much quicker, safer with clearer separation of concern in its code structure. The synchronous nature naturally removes a large chunk of technical debt right from the start, keeping the cost and risks low and allow all teams to focus on building a great product for the users.
PHP is common on most (if not all) platforms
Needless to say, Apache + PHP is pretty much preinstalled on every Linux distro. NodeJS however requires a whole array of additional components such as NPM, ExpressJS etc. That can be a problem for shared hosting environment, which we sometimes are required to use for smaller projects per client requests.
Apache2 and PHP is a much older, more popular, and well tested environment for serving content
Laravel is built on top of PHP. It is originally develop primarily for serving web content back in the 1990’s, powering over 70% of all the websites in the world as of today. It is a result of a lot of hardwork from the community, and also a miracle for such a technology to endure all those years of community testing and critics and yet remain serving 80% of the websites in the world.
NodeJS is single-threaded runtime environment
Don’t get me wrong, NodeJS has this extremely powerful event-driven event loop model that can support far more concurrent processes that Apache and PHP ever will, however it also comes with a risk where if the thread crash the entire NodeJS stack may crash with it.
PHP adopts a multi-threaded model where each requests instantiate a new thread. It’s a much more limited and “expensive” way of handling processes, however that ensures that if any thread crashes, other threads will remain unaffected, which results with a stabler and higher fault-tolerance server. We will cover more on how Laravel/PHP actually benefit our clients in the upcoming post.