Don`t reinvent the wheel unless you sell wheels. Top PHP frameworks for start-ups (Part 1)

BACK

March 25th, 2019, posted in tech_stuff
by admin

This is the first article of a two-part series. The present article looks at key things to consider when choosing a PHP framework, if you are a founder or a non-technical stakeholder. The second part provides a deeper dive into the technical aspects.

 

 

So, you have the funding, the market knowledge and a vision. But you also have a gut feeling that this is not enough. You need to make an educated guess on the technologies you`ll be using, and this article is here to help.

 

You already settled on PHP because it`s fast, reliable and open-source. In short, a cost-effective solution for building web apps. But what about choosing the best PHP framework for the job? Rather than reinventing the wheel, frameworks allow you to focus on what`s truly important.

 

A framework allows you to build apps faster and more efficiently through reusable code (i.e. libraries of pre-defined functions, APIs). Think of it as a “semi-complete” application that can be specialized to produce custom apps. 

 

In the coding world, you can never expect things to remain static for too long. Same as in a start-up. Using a framework also makes your application highly scalable, meaning less of a nightmare in terms of overall maintenance.

 

At UPDIVISION we build complex apps for a living. So, we`re all about reducing development time and maintenance cost. We have to. Below are some key aspects we learned the hard way when choosing a PHP framework. We also included a handy comparison between the three most widely used PHP frameworks, so you can see for yourself how they stand up to the challenge.

 

 

 

Clarity of purpose. If you don`t know where you`re going, any framework is OK.  

 

Before choosing a framework, any framework, you need a clear purpose. What are you actually building and what do you need for the job? 

 

If you`re thinking of an e-commerce platform, then you will probably need a framework that provides you with an easy payment integration and plenty of add-ons. Are you building a high load, real-time application for fintech or telecom? Then you need a framework that handles large volumes of data requests and backend computations. Do you want just a simple CMS? Then load balancing is probably less of a priority.

 

In the words of Alan Kay, simple things should be simple, complex things should be possible. Some PHP frameworks are better than others at certain tasks and choosing the right framework means fitting the means with the purpose.

 

Sometimes, the means need a little tweaking to fit the purpose. Like the time we decided to ditch Magento and PrestaShop and create our own tool, since no other e-commerce option fitted the level of customization we needed (read the full story here). As a framework, we chose Laravel, because it provided a solid foundation, giving us the codebase, as well as the freedom to expand functionalities as required.

 

 

 

Opinionated. Frameworks have opinions too.

 

All frameworks make some assumptions about best practices for application architecture to some degree. Non-opinionated frameworks will usually not assume much beyond structure and conventions. At a minimum, they make sure things are where they`re supposed to be and use the names they`re supposed to use.

 

Opinionated frameworks enforce a lot more of your application`s structure. While this comes with limitations, opinionated frameworks can make for a solid choice when deciding on development strategy.

 

Unless you need to start from scratch and develop a complete infrastructure from the ground up, an opinionated framework ensures:

 

  • Faster development and shorter time-to-market: you only need a few steps to create a minimum viable product (MVP)
  • Smoother collaboration: the framework answers common architectural questions and everyone speaks the same language
  • More focus on the business logic: dig deeper into the problem your app is trying to solve, instead of writing basic functionality

 

 

 

Community. It takes a village to raise a framework.

 

There will come a time when you will struggle with a particularly stubborn bug or an edge case. Or there simply won`t be enough information on the topic, as one of our developers found out when trying to deploy Laravel on AWS.

 

That`s why community is so important. How many people talk about the framework on the web? How popular is the framework in terms of blog posts, Stack Overflow questions and answers, contributors on GitHub and the likes? Will you be able to find the answers you are looking for easily? How friendly is the community with newbies, does is provide adequate learning resources for beginners?   

 

Community also means the framework is alive, evolving and will probably be able to keep up with you for the duration. Which, in the long run, simplifies both the maintenance and upgrading of your applications.

 

 

 

Documentation. Period.

 

A well-documented framework is easier to use and upgrade. Well-written, clean, organized documentation can be a life saver, so it`s important the documentation is supplied with examples and updated from version to version.

 

Documentation is crucial. Period.

 

 

 

Long-term support. Are you going steady with your framework?

 

Support is another big one. You want to make sure the foundation on top of which you are building is properly maintained. In addition to the help received from the community (forums, mailing lists, IRC), is there support available from the publisher? Do major releases have long-term support?

 

What about regular updates or patches? Does the publisher cater to bug fixes and security loopholes and what is the support window for each?   

 

 

 

Learning curve. Too steep for you?

 

Some frameworks are more beginner-friendly and easier to learn, others take longer. While this shouldn`t be a deciding factor in itself, it`s something to consider given your budget, timeline and security considerations.

 

The time needed to learn a framework might also influence your recruiting strategy: a steep learning curve might mean you will predominantly hire and work with seasoned developers, while a friendlier framework allows you to open up more to junior positions.

 

 

 

To sum it all up, we rated the three most widely used PHP frameworks according to the criteria provided so far. We used a five-star rating system for each category, with 5 Stars being on the higher end of the spectrum (e.g. purpose – can build just about anything, enterprise apps included; very opinionated, strong community, very good documentation). 

 

 

                                                                

 

Stay tuned for the second part of the series in which we will get down to the nuts and bolts of the three most widely used PHP frameworks and how they compare from a technical point of view.