Phalcon PHP – i’m lovin it

Since i gave up working with Symfony 1.4, i was searching for a new framework. Because i couldn’t find one that i like, i ended up in developing a small framework by myself. Searching for some solutions related to ORM and ODM, i read some posts related to Phalcon.

Honestly, in a few minutes, i felt in love with this framework. Mainly because of the architecture (very similar with what i developed for myself) and because it is written in C, and it comes as a php extension.

The learning curve should be very fast for any developer that has the basic knowledge about MVC pattern and is familiar with namespaces. Also, the documentation is awesome + that there are a tons of examples on Github.

I am testing it under Ubuntu, Nginx + PHP-FPM – it is incredibly fast. Anyway, there are a lot of improvements that has to be made, but they are moving fast.

All in all, i’m lovin it !

3 Replies to “Phalcon PHP – i’m lovin it”

  1. I was wondering if you connected Redis to Phalcon using ODM? I see that they have built-in support for MongoDB using Collections, but I don’t see an easy way of doing the same with Redis. Searching for answers hasn’t yielded much, so I was wondering how you approached that, if at all. I’m also loving Phalcon, but I don’t want to go off track right away by not approaching data storage in the right way.

    Thanks,
    Chris

    1. Hi Chris,

      I am not sure that i undertood. You want to use Redis as a storage engine or as a caching system ? For storage engine, the only thing that I would do, is to develop my custom adapter as they suggest here. If you want to use Redis as a caching system, then this is quite simple:

      Use Redis from Incubator

              $di->set('cache', function() {
                  $redis = new \Redis();
                  $redis->connect('127.0.0.1', 6379);
      
                  $frontend = new \Phalcon\Cache\Frontend\Igbinary(array(
                          'lifetime' => 3600
                  ));
      
                  $cache = new \Phalcon\Cache\Backend\Redis($frontend, array(
                          'redis' => $redis
                  ));
      
                  return $cache;
              });
      

Leave a Reply

Your email address will not be published. Required fields are marked *