“Why develop a web app with CodeIgniter in 2016?”

This question was proposed as a subject by one of this blog’s visitors. It is indeed a good question, especially considering that “CodeIgniter remained way behind other frameworks”.

So let’s think a bit about why would we use an “aged framework” when we have great frameworks like… and here the typical example is Laravel.

I did try Laravel, back when it was at version 4.x. I was amazed at what that great framework can do. It was unbelievable. But a few months after that it became clearer that I don’t want it to do do everything for me. Why would I install such a huge framework for simple web apps?

And, is Laravel really a framework? No. In my opinion, Laravel is actually a collection of (mainly) Symfony components. And as you keep using Laravel you will actually use a lot of components that, because of their capability of being incorporated into a lot of frameworks, become more and more complex. And in the end you find yourself not programming what you are required to program but gluing components into a monolith. Do you really need that?

Laravel is like Java. Before creating the app, you must spend a lot of time importing all sorts of components, making sure that that component from that other framework works well with Laravel’s components. And I guess that is the case for a lot of frameworks these days. In the rush to cover all possibilities, needs and frameworks, the components become more and more complex (did anyone say “bloatware”?). In the end you won’t have the time to look inside the code of the component, because you will be too busy implementing the component into your application. You will actually have to learn so many new “languages” that you will forget how to do all of it in PHP.

Let me ask you a simple question: Do you know how to interrogate the database in PHP? Your (and my) answer would be: “Well… it’s simple… You create the model and use the necessary methods”. Oh… like so… “And what does the model do?” would be the next question. To which you might answer: “…”. Nothing. Nothing because we use frameworks. Maybe the CodeIgniter is not the answer, but at least this framework “allows” you to look inside the framework’s code and find for yourself how everything is done.

You may say that every single component written in PHP allows you to look at the code. But I will contradict you. What I learned from… learning PHP… is that there are a lot of methods to hide code. You don’t need to encode or encrypt your code in order to hide it from other programmers. All you need to do is make it complex enough for people to just ignore the component’s code alone.

Take my MY_Model for example. It all started as a question: How can I make a MY_Model that will help me speed things up when working with database? At the beginning it was simple… put that method, change that method a bit. But now, when someone raises an issue on MY_Model’s repository, I want to throw up. That is because the code has become so complex that it scares me to look at it.

And now, a year after its creation started, I can’t imagine working with anything else. But then I find myself forgetting the basic Query builder’s methods. Fortunately, the methods are so simple to understand that I wouldn’t give CodeIgniter for anything else.

And now CodeIgniter’s developers find themselves in the position to create a new CI. I sure hope they will maintain the same philosophy of a bare-bone framework that is fast and has everything we need without the need for us to import that and that component from that and that framework using composer and psr-0…psr-8, interfaces, middleware, etc. etc…

15 thoughts on ““Why develop a web app with CodeIgniter in 2016?””

I hadn’t worked on PHP for a long time and had to start all over again. I started off with the bare language and decided to start learning about frameworks. Well, I settled on CI. To start with, the documentation is very clear and the language is PHP, it doesn’t feel like learning a new language (as is the case with Laravel), It is also lean and installation is straight forward. One of the reasons for choosing CI to build my application was the cost of long term maintenance. Heavy frameworks are costly when it comes to making changes. The constant changes in versions (Laravel) are hard to keep up with and you end up with an obsolete system with security risks.
Your blog has been instrumental in my journey of learning CI. I landed on it when I was deciding whether CI or Laravel and I knew there and then that CI was my choice. Thank you for the great job you are doing here. Keep it up, you are giving people the reason to choose CI.

I agree with Christine. I am in exactly the same boot as she is – long time away from PHP, starting over.

I found Laravel unbelievably complex and over the top. Code Igniter seems to me to be just right for me, but what has been an inspiration and a constant source of help has been your website and your tutorials about PHP and Codeigniter.

Your work and effort are very much appreciated – so much so, that I’ve even donated to you!

Adrian, I have a request for new tutorial. I’d like to use Codeigniter to execute some heavy load script to convert database, move and rename lots of images…this script should require some time to perform all the action.
I’m wondering if Codeigniter could be used for this work…somewhere I read the CI stop script execution after 30 seconds, are there any other issues using CI for such stuff?
Thanks

I absolutely agree as a developer with project deadlines, I just don’t have the time to chop and change frameworks. I chose Codeigniter because it had the quickest time from installation to delivering a project. This was important to me at the time, I did go through a period where I toyed with the idea of changing frameworks. But as I had older projects I still needed to support, I decided to stick with Codeigniter. I am very glad I did. I am excited about version 4 but at the same time I hope they keep it simple.

Unlike some I can use Codeigniter and enjoy using it but I am not confident in my skills yet to actually contribute so cant really help with the direction it go’s.

Thanks for some great tutorials. Maybe a good idea for future tutorials could be around REST just an idea serving and consuming API’s

i am Becky from Ethiopia ,your tutorials are very nice and helpfull and they are clear to understand ,Thank you very much it helped me for my semister project.,,would you find me a app which can notify to the adimin when there is a change by the regular user or just a notification app using code ignter,,if you no time for this ,its my wellcome to tell me the concept how to do it ….keep up the good work,i will always visit your page for new tutorials!!!!!!!!!!cheeeeeeeeeeeerrrrrrrrrrrrrrssssssss!!!!

I agree also. When I started with Laravel my first instinct to figure out how something worked (besides documentation) was to look at the code source. You are absolutely correct that is unnecessarily complicated to the point where most people will simply give up. I like to have a full understanding of how all components in a framework I am using work, both for development and security reasons. With Symphony, I found myself digging through endless directories to find files with 5 lines of code. It took me hours to figure out how one component was assembled.

Couldn’t agree more on this..Codeigniter is just what it needs to be, and it is great almost for every project..
Light and let’s you see what’s going on inside relatively easy..You can be as “low fat” as you like but you can also have feed one of your models with a huge cow, because that’ s what you need or like to do ..

If on CI 4 they decide to take the “.. import that and that component from that and that framework using composer and psr-0…psr-8, interfaces, middleware, etc. etc…” I m going to be very disappointed and maybe leave for something lighter..