Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhalconPHP vs Slim

I'm currently planning to develop a REST API for my applications, and I've been looking a lot at existing PHP frameworks, but also existing solutions to speed up PHP execution.

My goal here is to get the best performance, but also without compromising development speed.

I've been hesitating between two:

  • PhalconPHP (using only the Micro application)
  • Slim + Doctrine2 ORM

I read some articles about PhalconPHP and it seems really fast as it's written in C as a PHP extension. But I do prefer Doctrine2's ORM.

Also, Slim is by itself really fast, and I took a look also on HHVM by Facebook, in order to speed up PHP execution.

What I'm wondering:

  1. If I do use Doctrine2 ORM in place of Phalcon's native ORM, will Doctrine2 slow down the application, as it's not written in C like Phalcon's one ?

  2. Is Phalcon's native ORM worth it ?

  3. If I use Slim, will I miss some important features that could slow down the development process ? I do understand it's a micro-framework, and that's what I want: use multiple smalls components in order to build my application stack, but will I miss out some great features available in PhalconPHP ?

  4. PhalconPHP vs Slim personnal opinion ? In order of development speed, but also scalability/performance

Also, I saw this issue: Phalcon's ORM is slow. Don't know what you think about this?

like image 303
yachaka Avatar asked Apr 25 '26 13:04

yachaka


1 Answers

1.- Of course, anything beyond native phalcon will be handled as php code and so you will not take advantage of it.

2.- For most cases yes. Not because of database transactions but because everything around the application.Most of the needs can be done by using phalcon ORM or simple query language.

3.- You bet. That's the best of phalcon, you have a complete environment like any other framework but with the needs of less than the simplest framework. Only you know if you will miss something because it depends on your needs.

4.- Once you get use of it, it is really worth :)

like image 160
ragnar Avatar answered Apr 28 '26 01:04

ragnar