Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging Phalcon as a PHP developer

I have been a PHP developer working with Magento for years. I'm now wanting to work on a project that has no ecommerce component, and as such Magento is not a good choice. After browsing online at the other PHP frameworks, Phalcon is touted as the best choice in terms of performance and resource use.

The main drawback I've heard is that because it's programmed C, it's hard to debug any issues that may reside in the framework. Have any PHP developers found this to be a major issue? If so, what debugging tools would you suggest to address such issues?

Thanks for your time in advance.

like image 427
Sean Avatar asked Oct 22 '14 22:10

Sean


People also ask

What is phalcon used for?

Phalcon is used to design variety of projects. Yii supports all relational and non-relational databases. Laravel supports all relational databases. Phalcon gives equal support to relational and non-relational databases.

Is phalcon fast?

Phalcon Web Development is the fastest PHP framework ever built, delivered as C-extension. It provides ready-to-use classes and functions for any application. Phalcon development mounts upon an easy-to-understand and easy-to-use pattern called dependency injection.

Is phalcon open source?

Phalcon is an open source full stack framework for PHP, written as a C-extension. Phalcon is optimized for high performance.


1 Answers

In short: No.

If you want more info about Phalcon, read on.

I've done http://oisie.com/en with Phalcon+mysql. Now I'm building new software with Phalcon+MongoDB and one Phalcon+Mysql. I'm with Phalcon for more then a year now developing almost every day and I can tell you, there is no such debug issues. At least I haven't had any. Phalcon is very solid framework and works blazing fast. It has all it needs to have. Developing is also very active, they are building new version already and the best part is that there shouldn't be any pain-points with Phalcon while updating it on your machine.

If you like pre-generate folders and files, you should check out this repository on github:

https://github.com/phalcon/phalcon-devtools

I've updated IDE stubs to newest version to get auto-completion working. You can find those here:

https://github.com/phalcon/phalcon-devtools/tree/master/ide

My experience with Phalcon:

  1. Easy updates of framework. Just update your apache's or nginx's module and that's it.
  2. I haven't had any issues after update of framework. Try develop anything with Zend v1.x and update it to 2.x You will have to update a ton of your code.. With Phalcon there is no such problem. I think it's very important in long-term projects.
  3. My IDE is not filled up with 5000+ files of framework, so it works faster while developing.
  4. Phalcon is precompiled, so it's fast because of low I/O and compiling. I saw guys who made server response ±40ms with Symfony, but it was such a challenge for them.. With Phalcon it's just daily stuff. You have 20-60ms response from server without any extra caching layers.
  5. It saves money. Less CPU + less RAM = less $ for servers.
  6. I've tried Zend and Symfony. Also years ago was working with Joomla, Drupal and WordPress. Phalcon is my main framework now and after it and don't want to look back :)

If you are starting up with Phalcon, should find useful things on my github acc: https://github.com/stars/liesislukas

Have fun ;)

P.S.

Phalcon 2 progress: https://github.com/phalcon/cphalcon/wiki/Progress-2.0 Phalcon 2 is written with Zephir (language to build apache/nginx extensions): https://github.com/phalcon/zephir

I've tried writing my won extension with Zephir and it's really easy to do :) I never liked C family languages because of it's strict stuff compared to PHP. And Zephir is language, which is familiar to PHP, but you write apache/nginx extension with it. So if you even not using Phalcon framework, but you have some heavy tasks, you can easily write precompiled extension for it. Play with it ;)

like image 62
Lukas Liesis Avatar answered Sep 28 '22 18:09

Lukas Liesis