What are the benefits of using a framework like codeignitor over hand coding something? I see lots of people saying how amazing frameworks are but they take longer to learn and code what you need so how are they better? and which is the best one?
This article will explain you... http://buildinternet.com/2009/08/why-php-frameworks-matter/ In general, a Framework reduces tons of work when you are working with a large project. But if your project is small (with just a login function and some specific works like shortening URL), then Frameworks won't be of much use. You don't have to learn every Frameworks. Learn one and use it on all of your projects.
Frameworks are great as they come with MVC structure, lots of classes and functions to make our task easy and fast. But frameworks are not for everyone. They only make sense to those who understand PHP OOP, URL routing and MVC style. If you are learning coding or you are just a beginner, don't try a framework. Frameworks are there to empower software developers for faster development. They are not for learning, nor they make learning easy.
OOP, URL routing and MVC, aren't hard, but the thing is they would initially look too hard than they are actually. That would turn down lot of new programmers from learning PHP.
Frameworks save time in the long haul, however it you do have to take time to learn it if you don't know already. The downside is you have to include a few extra copyrights saying you uses X to create this, which depending on your style you may or may not want(it's not asking much in most cases though). Alternatively you could create your own which takes a ton of work and constant updating, but if you planned on building multiple applications it could work out to your advantage.
Actually, all of them are really hard! They don't seem hard once we start understanding them properly, but until then, they are very hard. I say so because no one can understand them in one go, it takes lot of effort
Yup. The first framework i used (also currently using) is Codeigniter. It really helps in understanding MVC better. Other frameworks aren't so newby friendly.
There are different type of frameworks. Some will make it really easy to setup a complex website if you use their out of the box features. For example, you could use Liferay to setup a really complex Website. But, if you need to customize it, good luck! Customization is the major problem with frameworks. If you want to change it's default behavior, you'll lose time to learn how they work, understand weird behaviors, etc. I must say that from all framework I tried (I tried a lot of them for JAVA, PHP and .NET), code igniter is the easier. BUT, it doesn't have a lot of things out of the box. You need to find librairies, etc. So, if you want to start a Website from scratch and can't reuse a "full framework" (like a forum app, Wordpress, etc.), I would use Codeigniter.
Yeah - concur with alot of these guys. A good approach - if you are just starting out might be to use Code Igniter. And - if you start out with Expression Engine, that might help in your learning since it uses the Code Igniter framework. Unfortunately - it's not free.