views:

275

answers:

7

I've been reviewing different frameworks to use for my next couple of major web applications, and after days of research am almost set on using CodeIgniter.

The reason I'm leaning towards CI is that so far it looks to be the best suited for me. It doesn't require constant command-line access (I am currently using shared hosting; the projects do not warrant a dedicate server yet), nothing special has to be installed on the server running it (you just upload the framework to the root of whatever your developing), and they appear to have some excellent documentation, videos, and tutorials on how to get started.

Do any of you have experience with CodeIgniter? If so, what is your opinion of it and its features? What had you developed with it, and what types of applications is it best suited to create? I certainly don't want to get into a situation where I'm trying to bend a framework to do something that it isn't well-suited for.

Both of my projects will be database-driven apps that will require user registration, the ability to manipulate data that is specific to their account (their posts, listings, user account details, etc), amongst other things.

Also, if you have any other PHP framework suggestions, I am open to them.

Thanks in advance for your help!

-Sootah

+2  A: 

I used CodeIgniter to make a website that was used as a place where players could upload custom mods that they had made a for a game. It allowed them to login, upload files, download, rate mods, and do other similar sorts of things. I was quite pleased with CI in general, as it was relatively easy to setup and learn how to use and also to make very clean code. Maintainability was also quite good. I also liked that it didn't force me to use MySQL being relatively database agnostic.

It quite honestly sounds like it could work very well for your project. Is it absolutely the perfect solution? I don't know, but it would definitely get the job done.

Morinar
+2  A: 

I have been very happy using CI to develop two rather small web applications. Having worked with Ruby on Rails, the MVC aspects of CI were easy to pick up, although CI is much "looser" a framework than RoR. I like CI since it does a good job of organizing your code, but ultimately gives you the flexibility to work with your code how you see fit.

Some alternatives you may consider are:

Justin Ethier
+3  A: 

CodeIgniter was my first framework. It's great because it has a strong community and excellent documentation, but the problem is that it tries to retain backward compatibility with PHP 4 and therefore lacks a lot of "standard" features modern frameworks have such as autoloading. In addition, it's backed by a commercial company and it's not updated very often at all.

Here is how you load models, helpers, etc:

$this->load->model('user');
$this->load->helper('array');

Yuck, autoloading was meant for this kind of situation.

Enter Kohana. Kohana is strictly php5 and was initially created as a fork of CodeIgniter (it used to be called Blue Flame), but it has since been rewritten. The front facing site shows Kohana 2.* documentation and downloads, but I'd really recommend using the new 3.* branch. It's much cleaner, but the official docs are lacking. However, the community wiki is excellent and you can get started on a website easily with this.

I also like the Kohana community a lot better. It's more tight knit. It's hard to explain, but they seem more "proud"... the framework gives off a kind of hacker vibe because's it's so lightweight and you can do whatever you want with it. When it comes down to it, it's really just a bunch of loosely coupled classes. I really recommend it.

Kohana's source code is also incredibly well documented and is very clear. Back when the Kohana 3 beta was out, I learned the framework just by reading the source code (the wiki wasn't around yet). I've never done that before, but I had no trouble doing it just because of the code quality.

Also, since the framework is community driven, it receives much more frequent updates.

ryeguy
Didn't Ellis just release CI 2, or am I thinking EE?
Kevin
Yes, EE 2.0 just entered beta.
ryeguy
Hah, it's funny you bring up Kohana as I just found out about it today. I like the fact that it is strictly PHP5-based and all that, as opposed to CI's deathgrip on PHP4 for some reason even though it is not 2010.My concern is this: I currently am a beginner-intermediate PHP programmer. My success in C# has largely been because I could pretty easily figure out how to code things thanks to Visual Studio's autocomplete feature. With PHP I rely heavily on tutorials and the like.CodeIgniter looks to have more tuts and resources, although I may prefer Kohana I'm not sure I'd be able to use it.
Sootah
Unless of course I've simply missed some of the Kohana 3 tuts or docs.. Suggestions?
Sootah
@sootah I linked to the community wiki in my post, you should be able to learn from those. The [official docs](http://v3.kohanaphp.com/guide/about.kohana) are a work in progress, but you can get some info from there. Everything else you can get from the [API docs](http://v3.kohanaphp.com/guide/api). But really, the wiki is a really good resource. Also, check out the official forums, the community is really helpful.
ryeguy
+1  A: 

@Sootah

CI is going to drop PHP 4 support with CI 2.1.0. So older code will still work with 2.1.0 but new features will no longer support PHP 4.

CI is for me the best PHP framework. If you are going to use a PHP framework then use CI.

Drazen Mokic
+1  A: 

CodeIgniter is very useful and very easy to learn. Its a kind of simple but it could be an advantage too. I began with it and then went to Kohana 2.x that I liked very much. Now there is Kohana 3.x but I didn't find clear information as with its previous version.

I think CodeIgniter will do what you need. Probably you should begin to play with the 2.x (now in Beta) branch. If you want something more elaborate I suggest you consider Yii (www.yiiframework.com) that I am also learning right now.

jimezam
+2  A: 

Hello all! I thought I'd chime in here having been in the same spot you were some 12 months ago. I jumped into CI and haven't looked back. I LOVE CI's MVC approach - I had never really done any OOP before, but CI really emphasises the benefits of this approach. The unexpected benefit is that I've been able to quickly adapt to other OOP frameworks. Also, their documentation and forums are amazing, which is mission critical when adopting something new. I also love the way the urls are handled - very clean: domain.com/className/methodName, AND you can also build in custom routing patterns.

I do feel like I should come to CIs defense too...CI does offer autoloading at your discression, but doesn't make any assumptions in blindly loading models. Load them for your site, a class, or an individual method.

All in all, I enjoy CI I it's urged me to build stronger more capable web apps - I encourage everyone to give it a try.

Christopher