Codeigniter running into some major growth issues

I have been using Codeigniter for a while on many projects and it had been very useful as it is non-intrusive. Its very small footprint also allows for the extremely good performance on page loads. However, these projects were simply using just the CI core and not implementing any plugins. Some base classes have been extended, but purely specifically for the individual project so not causing any conflict with other code.

Recently, I started building a startup project using CI and would like to employ more plugins do speed up development. Pleasantly surprised, I found that CI had implemented Sparks for searching and installing plugins to CI. Great right! So I implemented an ORM called DataMapper and it was brilliant.

Here comes the reality check. After upgrading from CI 2.0.2 to 2.0.3, everything broke. Why? Because CI changed a lot of methods within its core classes from public to protected. That of course is not actually a bad thing as it was in fact incorrectly implemented before allowing a developer to mess with core functionality too much. However, through researching into these issues, I came to a huge realization that I missed about CI before. CI only allows plugins and developers to modify core classes by extending them into MY_core_class.php. If multiple plugins need to extended the same class, even if they need to overload different methods, it requires some code merging by the developer. If the plugins need to overload the same method in the same core class, that becomes a huge undertaking for the developer to understand what each plugin is trying to do and write merged code that works for both in the same overloaded method.

After that realization, I have determined that CI is fine for applications that are going to use mainly the core classes. If you intend to implement plugins, be very careful understanding what core classes each one will extend. Choose wisely. If those requirements cannot be met, look for another framework.

Leave a Reply

Your email address will not be published.