Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Brief comparison of Phalcon to other frameworks

Please I need to understand some basic information about Phalcon as a framework, am a newbie phalcon user. Also, is Phalcon the best framework for web API?



60.8k
Accepted
answer
edited Aug '16

i dont think there is any framework that can be marked as "best". Its like asking which car is the best. There is no such thing.

The trought is that phalcon requires a bit of skill ( tiny little bit more than some other simple frameworks ).

Personally phalcon teach me like a milion things litterally. It helped me immprove my skills in many dirrections, not just php.

I dont think there is a bad call of which framework to use. Its all the same. What I like about Phalcon is Zephir. Its my favourity "language" at this moment. Its so incredibly powerfull.

Its a bit hard to explain ( also i could be wrong ) but if you google laravel problem watever you get 10 000 results and you have to filter the one that actually works with you. If you google phalcon problem whatever you get much less results but pretty much 90% of the time its copy/paste solution.

I guess if your app depends on speed there is no comparision whats so ever. Phalcon is on top milion times. C will be always times faster than php ( for understandable reasons ).

I remember a colegue of mine is a fan of laravel, so there is this "debugger bar" that shows memory usuage and request time. Just the hello page with few routes and etc laravel was at 250ms resposnce time. If my request time in phalcon is more then 100 i know that there is a problem in my code.

If you just gonna use it for API... really just choose what serves you best. And dont stop at the first choice. If you start with phalcon, test laravel, lumen, silex in a while. Just so you know phalcon is the best :D

Cheers!

With other frameworks like laravel/symfony the most best thing that you have which phalcon doesn't is much bigger community and plenty of user made components, like you need user managment ? install FOS for symfony for example.

If you need plenty of things, specialized features out of box or without coding(like install some component) then phalcon won't provide that as well as laravel or symfony. But if you can handle this, you need only something like views, forms, validations, or just datbase things and routing then phalcon is way to go. Phalcon is really the framework, symfony and laravel is like something bigger - like library where in any second you can add more components to it(and making it more slow :D). And of course there is phalcon speed, most of time my whole request which is mostly (get json raw body if any) -> select something from database -> return it as json is done in application like in 1-10 ms(most of the time 1-4 ms, just there are some bigger queries sometimes with 10ms).

Personally I chose Phalcon over Laravel and Zend because of the Speed benchmarks. I was not that attracted to the many community packages that Laravel provides because I either write what I need myself or I dont want to tust some random guy from India (no offense <3 to the awesome indian coders) .

Also Phlying with Phalcon sounded much more awesome than Framework for artisans :D

Thanks a lot guys



9.8k

I use Laravel at work and Phalcon for everything else. Laravel does have a lot of nice built-in features like Artisan, specifically migrations and the ability to create commands that interact with your data the "Laravel way". There is also a huge user base for help (which can also be problematic if you implement something that's not quite right) and the Laracasts are an amazing development resource. That said, Laravel is huge overhead, incredibly heavy handed in its implementation, and the performance is not good.

When I first started building applications on my own outside of work I chose Yii. It was faster than Laravel and not terribly difficult to learn, but moving from 1 to 2 seemed like a big learning curve so I moved to Phalcon after hearing about how fast it was. After the struggles with the initial setup and figuring out how to use DI to map libraries, it was (and still is) a piece of cake. Plust it's fast as hell. I built a Phalcon API prototype at work that is faster than the .Net production environment. :-)