Phalcon is a new PHP Framework of my choice

Phalcon is a new PHP Framework of my choice
Page content

I’m working on multiple PHP based projects. Most of them using CodeIgniter as a base framework. I mastered it into stage, where has no secrets for me. The problem is that I also know disadvantages of this bit outdated framework. Recently core team announced that they are dropping future development so it means that CI is dead. Doesn’t mean that I don’t like it anymore. I just started looking for something new.

I like CI because I got control over everything. Modern PHP frameworks trying to solve all problems for you. It’s amazing, but lack of control is what you don’t need in when you developing projects. What do you need it’s this easy flow during development process. Full control over your MVC structure, but also a lot of “help” from framework itself.

How Phalcon is different the others

Phalcon is written as a PHP Extension – it means that it’s very fast, and… you need to have server or separate extension to run it. Forget about cheap shared hosting, look for custom good hosting or… spent couple dollars on EC2 instance.

How Phalcon compares to CodeIgniter

Transition was quite easy. We have Controllers, Models and Views. The biggest difference is within build in features of Phalcon. Out of the box, we have beautiful ORM, template system, and plenty small features which makes your live so easy. I’m not going to talk about obvious features, but small goodies like template system. So easy to create and use layouts, or just to create  rest API.

You don’t any any extra libraries to do your “stuff”. With CI my basic stack was including some CRUD , Template , Auth , REST API librares. I end up with huge library of everything to handle basic project. In Phalcon it comes out of the box. CRUD is there, template engine is build in. Auth – well… yo have to create it by yourself, but you are getting nice REST client and server features straight away.

What is annoying

For me it’s still learning curve, so i’m discovering each module step after step. So far lack of clear bootstraping structure is bit confusing. Paths & dependency injection – you can do this in so many ways, that it’s hard to chose one correct way on the beginning.