Need some information about Yii vs Codeigniter

Hi there

I need some information and important difference between Yii and Codeigniter! Want to create a list of pros and cons about these two. Actually i’m a Yii fan but in our company, our team manager decided to use Codeigniter, I really want to know the difference and which one is proper for big projects.

I did some googling but they didnt talk about key features.

thank in advance.

I haven’t really looked at CodeIgniter much but the difference is mainly that in CodeIgniter you have to do pretty much everything yourself.

The framework is also a bit old, and those two things have done that lots of people are migrating to Laravel from CodeIgniter.

Unfortunately, a lot of people have also migrated from Yii 1 to Laravel … :(

I am hoping that people will start migrating to Yii 2 :)

Sorry about your manager, btw.

Thanks, very nice answer

I also need some information about security difference, speed difference, modules that Yii has and codeigniter does not have etc etc…

I’ve used CodeIgniter as primary framework before coming to Yii 1.0. Recently I’ve tried it again asked by a friend to implement a few things in his project.

  • IDEs are completing code worse when working with CI.

  • Translations system is too primitive in CI. Also there’s no message command so it takes forever to find all the untranslated strings and translate them. That was the biggest frustration coming back to CI.

  • Working with forms is much more steamlined in Yii.

  • Yii has Gii to generate code.

  • Yii has debug toolbar.

  • CI has no PSR-autoloading.

  • GET and POST aren’t wrapped so it’s harder to test.

  • Performance-wise, CI is faster than Yii but not too much.

  • CI built-in XSS cleaner isn’t secure (at least it wasn’t, not sure how it’s now).

That CodeIgniter does not feature PSR autoloading means that you don’t get to use all those Composer packages - that is one of the things that we get for free with Yii 2: if there is something we need, we can just find a Composer package and use it directly. No need to write a plugin for it.

I know that some people prefer a framework like CodeIgniter - though I would probably call it a toolbox instead - over a coherent framework like Yii because of the learning curve.

It is like - in the C++ world where I am from - those people who prefer procedural code over object oriented code.

Yes, it is easier to understand initially. But it snowballs awfully fast out of control once it gets more involved. :P

1 Like

Well, that’s not entirely true. You can always include Composer’s autoloaded in the index script and use packages as you want.

agree with samdark and jacmoe, yii’s flexibility is just awesome. You can change almost anything to your liking and the system doesn’t break. All you need to understand in yii is how to read the api docs (they are for developers), and you need to have a fair understanding of OOP and modern Standards like namespaces, MVC etc.

Once you know how it works you can build applications much more faster than with any other framework I’ve seen (which is a lot) ;)

Perhaps I exaggerated a bit. :)

Another point to consider is Desatir’s experience with Yii - no matter what framework you are working with, there is a learning curve.

And the manager needs to take that into account: what the team knows versus what it needs to know…

Thanks for all responses.

Does Yii supports HMVC? because we have a discussion about Kohana supports HMVC, but I think Yii also supports.

BTW in our country depend on alexa rank, the Yii is most popular between some frameworks like kohana, laravel, codeigniter.

Yii already has that : it is called ‘modules’ :)

Each module has its own set of models/views/controllers.

And, if you add Widgets on top of that … they are also some kind of HMVC.

And what about ftp management, something like in codeigntier.

I couldn’t find something similar in Yii. :-[

I saw this page and its picture about HMVC :

What the picture shown is something like calling one controller in another and there is no return after redirecting to another controller.

Is it simple redirecting?

I don’t know its good or not but the manager is selecting one framework between CI3, laravel5 and Yii2.

No. There’s no need for it in Yii. There are widgets, AJAX etc. Kohana, is, unfortunately, almost abandoned by its team

Right manager choice should depend very much on what the team is familiar with and if it worth changing since there’s a learning curve involved.

In my opinion, a switch from CodeIgniter to either Yii 2.0 or Laravel worth doing. A switch from Laravel to Yii 2.0 or from Yii 2.0 to Laravel makes less sense. Both are modern frameworks with their pros and cons so it’s very hard to choose one of these if you haven’t tried both in real projects.

Samdark said ‘No’ and he is right if you by HMVC means how it is implemented in Kohana.

However, the way that HMVC is defined/described elsewhere, is extremely close to what Yii modules and widgets provides.

HMVC, like MVC, is just an acronym for a general architectural idea - a software pattern.

Some people think it looks cool in a feature list …


yeah right the longer the acronym the better :D

I actually Tried all three Frameworks in halfyear long projects (tho the Yii2 project just started 2 months ago),

The pro’s and cons i’ve noticed in all three pretty much sums up what people have said before, but on my own oppinion i think that Yii2 is currently the best for larger projects (laravel ofc just behind it), with laravel tho it’s a bit of an issue that it has trouble with non conformist code, it really wants you to follow just one path. CI gives in my opinion too much freedom in what you do, and if you don’t exactly know what you want to achieve it might come back and haunt you as it leaves too much space for problems (security) to occur. Yii2 in my eyes gives the user more speed, more flexibility and the ability to while still staying within the best practice guidelines, create custom code that isn’t in the framework…yet.

it’s what you say, there are a lot of parts that need to be evaluated before you can choose a framework that fits best with what you want, and what your team is able to do.

FTP management ?

Use Composer:)

Search for it at Packagist.


I’ve used Codeigniter since about 2011. If you go to YouTube and search for ‘codeigniter hmvc tutorial’, then you’ll be able to check out some of my CI tutorials. I like to think that I’m good at Codeigniter and I’ve certainly built lots of sites with it.

However, I’m new to Yii and hoping to learn more from the good people here. Actually, I’m about to post a thread, seeing if I can hire someone (just in case anyone is interested).

Anyway, what you’ve been reading here is right. Here’s the vibe, as I see it:

  • Both Codeigniter and Yii are bullets in terms of page load speed. I think they load about 3 times faster than Laravel and Symfony. So, they’re both very fast.

  • With Codeigniter you code everything yourself. On the plus side, this means that you have more control over every pixel on the screen. The downside is, it’s much slower to build things with CI.

  • Codeigniter with HMVC is brilliant - however, the new CI owners don’t like it and very sadly that way of doing things doesn’t seem to have much of a future.

  • Codeigniter is a great framework but (in my opinion) it’s a dying framework. The new Codeigniter owners haven’t produced anything at all since taking over about two years ago.