Choosing PHP Frameworks — Comparing Laravel, Symfony, and CodeIgniter

Choosing PHP Frameworks — Comparing Laravel, Symfony, and CodeIgniter

Using real OrbitSoft projects as examples

We can make applications in pure PHP, but we often use frameworks. Any framework can be used to solve a customer’s problems — the main thing is to use it correctly. The answers to the following questions will help you choose the best way to work:

  • What functionality will help cover the project’s needs?
  • Can the framework handle growing projects?
  • Will it be easy to integrate contractor functionality into a project on this framework, e.g., banking software for retail projects?
  • How much will it cost to maintain a project written on this framework? Is it easy to find developers? Do you need a license to use it?
  • Is there a development community to ask questions when they arise?

You can contact us for a consultation, and we’ll help you figure out which framework is right for your project. In this article we’ll analyze the assorted different features of Laravel, Symfony, and CodeIgniter, and tell you what projects we use them for.

Features of PHP frameworks

Symfony, Laravel, and CodeIgniter are suitable for building websites, providing a full development cycle. They have open-source code, which can be found on GitHub, and development communities. If developers have questions about what to do in a given situation, they can quickly find the answer.

In the following table we take a look at the various features of these frameworks:

Framework CharacteristicsSymfonyLaravelCodeIgniter
TemplatingTwig — allows you to write clean code and extends the capabilities of PHPBlade — allows you to use PHP code in viewsNo templates
ModularityModular frameworkNo modular approachNo modular approach
InstallingComposerComposerComposer for latest version
Web application development speedQuick. It’s not that easy to learn, but it’s affordable.Very fast: a lot of information on the frameworkMedium: CodeIgniter developers need to be found
Database supportMicrosoft MongoDB My SQL PostgreSQL Redis SQLiteApache Jackrabbit Couch DB DynamoDB GraphDB MemBase MemCacheD Microsoft BI MongoDB No SQL PostgreSQL OracleMicrosoft SQL MongoDB My SQL Oracle Windows ODBC Driver PostgreSQL SQLite2
Functionality3,000 extensions9,000 extensions2,500 extensions
FeaturesThere are LTS versions of the framework
Out of the box functionality
It’s the most stable framework
There are ready-to-use components which allow the use of a modular approach when creating applications
There is a built-in Composer batch manager
Out of the box support for unit testing
Large number of packages for extending functionality
Allows you to modify the system for new functions
Most functions can be redefined and extended thanks to classes
Works with .po/.mo file formats for system localization

The projects where we use Symfony, Laravel, and CodeIgniter:

LaravelCar insurance serviceVariable data analysis for policy matching
Storing data on completed policies
Mailing with a reminder to purchase a policy
Different roles for work in the personal cabinet
16,000 personal user accounts
1,600 policies sold per day
CodeIgniterLarge content providerWorking with user panels
Interaction with databases
Maintaining the service in 30 languages
350,000 users daily
700,000 requests per day
SymfonyAccounting systemIntegration with cash registers, terminals, bar codes
Order processing
Storing of data regarding customers and orders
Processing and calculation of sales statistics
1,200 personal user accounts
2.3 billion requests per year

Laravel for car insurance selection service. We use Laravel for the car insurance selection service: it compares the costs of policies from different insurance companies, and offers the client comprehensive and liability insurance at the best prices. They sell up to 4,000 policies a day, earning revenue from commissions from insurance companies.

Business tasks the framework helps solve:

  • Data analysis for policy matching
  • Storing data on completed policies
  • Mailing reminders to purchase a policy
  • Restricting access — creating different roles for working in personal accounts

Laravel task example. The framework optimizes the writing of new routes — matching program code and URLs.

This is an example of code for creating a route to get data. When you access the specified site address, controller functions will be called that will perform operations, and return either data or a web page with markup in response.

Symfony for accounting and control system in flower business. We use Symfony for an accounting system used in the floriculture business: it helps control purchases, manage sales, and oversee questions and/or issues with employees. The system has more than 1,200 users. It receives revenue from subscriptions.

Business tasks the framework helps solve:

  • Integration with cash registers, terminals, and barcodes
  • Order processing
  • Storing customer and order data
  • Processing and accounting of sales statistics

An example of a Symfony task. A developer doesn’t need to write a lot of code in order to connect new functions to the system. Symfony doesn’t copy when creating new components; it remains a single framework thanks to a clean and simple functional core.

An example of installing and configuring an additional component for an application:

Once the dependencies are set, the commands in the next section of the composer. json file will be automatically executed. For example, cache: clear — to clear the file cache of the application.

CodeIgniter for a large content provider. We use CodeIgniter for projects from a large Canadian content provider: they receive revenue from commissions for showing ads. The system has more than 350 thousand users and processes up to 700 thousand requests per day.

Business tasks the framework helps solve:

  • Work with user panels
  • Interaction with databases
  • Maintaining the service in 30 languages

An example of a task on CodeIgniter. Protect against sudden service crash for users. Before launching an updated version of the service on users' computers, developers test it in a special environment. There’s a chance that a developer could make a mistake and accidentally launch an unfinished version of the service into battle instead of testing. In such a case, the service is likely to crash and not work for users.

CodeIgniter has a utility called phing: it generates system settings depending on the environment, and eliminates the error of starting incorrectly. For example, you can create several environment settings which contain addresses for connections to the database, Aerospike, and Redis. By selecting the environment, you can quickly generate the necessary configuration files based on a template, instead of manually prescribing all the data.

The command to create databases is called from a special package «init» — actions performed during the initialization phase of the system. The name is purely symbolic, for convenience.

Whatever your needs, we can help!

Tell us what problems you’re facing with your business. We look forward to hearing from you.

Получите ответ по смс

Ваше сообщение успешно отправлено!
Представьтесь пожалуйста
Укажите номер, на который придет ответ
Нажимая на кнопку, вы даете согласие
на обработку персональных данных.