Blog

Why We Choose PHP and Laravel as Our Preferred Development Framework? (Part I )


“A problem well stated is a problem half solved.”
- Charles Kettering

Updated: 10 June, 2023

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

One of the key benefit of NodeJS is its non-blocking feature. One execution does not need to wait for the previous one to finish for it to start, thanks to the clever, asynchronous nature of most of the callbacks in Javascript. However, from our experience handling these asynchronous callbacks may end up costing more time to make sure codes are executed in the right order. In many occasions we needed to implement a lot of extra synchronous callbacks, or Promise, to make sure of that. The asynchronous nature of most Javascript callbacks may end up getting in the way and require more time to implement. You can probably see how ironic that may sound.

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

NodeJS is based on the renowned V8 Javascript engine, which is originally developed by the Chromium project for Chrome and Chromium browsers in 2009. Providing an efficient runtime environment for Javascript to run on popular web hosting capable OS’ such as Mac, Linux and Windows. However it is still relatively new, some may consider it unstable as a scalable solution for large applications.

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.

profile_kelvin_lee.jpg

Kelvin Lee

Co-founder, Managing Director

Project Architect, Creative Technologist and Product Consultant for over a decade. Can’t shut up about new products ideas after a few drinks.

Latest Blog Posts

Why You Should Start Embracing Strategic Decision-Making Over Meeting Individual Expectations

Why we should embrace strategic decision-making for success over meeting stakeholder expectations, and find balance between individual needs and long-term strategy.

Read More >
How Alignment Frameworks Can Help You Solve Complex Problems

As a strategy consultant, we have to understand importance of alignment in problem-solving. Whether it's tackling complex challenges or making critical decisions, alignment among team members is crucial for success. In this article, we will explore why collaborative problem solving workshop (i.e. **Lightning Decision Jam (LDJ)**) can help teams achieve the necessary alignment to solve problems effectively.

Read More >
Overcoming Anxiety Working with an Agency on a Digital Project

Embarking on a digital project with an agency partner can be an exciting journey for businesses and organizations. However, it's not uncommon to experience anxiety and frustration during the design process, especially when there is a lack of communication and uncertainty about the project's outcome. In this article, we aim to address these common concerns and provide valuable insights on how to overcome anxiety when working with an agency on a digital project.

Read More >

LOOKING FOR A TEAM TO HELP WITH YOUR NEXT PROJECT?

HIRE US