Laravel is Awesome

Posted: 2012-05-22
Category: PHP

You might not expect to hear that from a CodeIgniter and FuelPHP developer, but it's true. Taylor has done a brilliant job writing code that is clean, functional and has built a huge community of smart developers in less than a year of active development. People are flooding to Laravel from other frameworks and that's great for the PHP community.

Hold on, what?

So if you know me you'll know I have a history in CodeIgniter development. CodeIgniter is a slow moving framework with an API that has barely ever changed and historically the framework has always supported several versions of PHP behind the current active.

CodeIgniter supported PHP 4 when PHP 5.2 was popular, and has only switched to requiring PHP 5.2 now that PHP 5.4 is available. This has always been absolutely brilliant for developers like me who are involved with projects like PyroCMS and PancakeApp, which are distributed applications that work on any environment.

While developers have always been keen to move to the newest versions of PHP it's a well known fact that sometimes you just can't do that. Much like how designers and frontend guys wanted to use all the new HTML 5 JS API's as soon as they come out, but still had 60% of their users on IE6 - distributed application developers like myself are forced to work in a slightly different world where versions matter more than personal preference.

To put this simply, if right now upped the CI and PyroCMS requirements to PHP 5.3 then I would lose 26% of my community. My conversion rate of Community to Professional users is 1 in 5, so loosing that many sales would mean I would have to fire my support guy - which would make the project crumble.

These are the sort of things that need to be thought about when working with PHP projects - as remember, not everybody is in the same situation as you. This is why I still use CodeIgniter, and this is why it's a great framework for others in my situation.

But I thought CodeIgniter was dead?

This is an obvious reference to a blog post that has been going around recently: Why CodeIgniter is Dead. I am fine with people having opinions, but this article makes several assertions that are entirely incorrect, and makes many comments that lead me to believe the author has never actually looked at the 3.0 branch at all. To me, this article comes across as this: one of the Laravel developers decided that he was no longer in a position where he required a slow-moving API for his applications, and a PHP 5.2 requirement base, so he decided instead of just using Laravel he would blog about how shit CodeIgniter was. That is pretty low and entirely inaccurate. I call it FUD.

CodeIgniter 3.0 is still actively worked on by a whole team of developers, including a new Reactor Engineer Alex Bilbie. Unit testing for 3.0 is complete and the framework is up on Travis: Build Status, meaning bigger changes can be made without any worry of stability, PDO drivers have been included and there is even some progress being made on breaking free from the CI singleton without breaking the API. CodeIgniter doesn't break the API unless it's ridiculously minor, so thats important even at the cost of "not being cool".

Remember, this is not the first "death knell" for CodeIgniter. Developers have proclaimed the end of CI a few times before, and each time we saw a brain-drain from the CI community of bored developers going somewhere else to build something else.

It happened in about 2007 when a few CodeIgniter developers got fed up with the lack of community contributions being merged in, so they made BlueFlame and then eventually recoded everything to make Kohana. CodeIgniter carried on just fine for a while until about 2010 when even more developers got fed up with the lack of community contributions - myself included - which was the last time CI really had any issues in the community. Since then EllisLab have moved things to GitHub, the community has been put in charge and new features and bug fixes are flying in. This means since the last death knell CodeIgniter has never been more active - and while it might not be using namespaces and callbacks, it certainly makes writing PHP 5.2 code much more fun.

But you like Laravel?

Absolutely! Taylor has done a brilliant job of building up a framework that takes advantage of callbacks, IoC and event driven behaviour very well. Unit Tests are baked in nicely, the Migrations are very neat (and look pretty familiar to my CI migrations cough) and their Schema class is a beauty, very close to the way Rails handles things with the way callbacks and $table objects instead of shit-loads of procedural code.

Then why don't you use it?

Every single framework goes through the same trouble that every single piece of software goes through: Change.

As a framework developer you are always met with two extremes:

  1. Change a lot
  2. Don't change

We saw 1 happen during the Kohana switch to 2.4 to 3.x, where the entire framework was redeveloped and users of the original system were left in the cold. Development fractured, they even had two different websites with different sets of documentation. That was extremely unfortunate, but that is what happens when you change a lot.

1 annoys developers who are trying to build large-scale stable applications. 2 annoys developers who have been using your system for years and want new things

The lesser suggested 3rd option is "only change a bit" which CodeIgniter has been doing for a while, which still bores people who want the excitement of the bleeding edge.

It's pretty safe to say that Laravel is on the bleeding edge. Taylor has created one of the nicest looking frameworks around by building 3 major versions within the year, most of which have required a fair bit of application redevelopment. v3.x is looking amazing, but what happens when v4.x comes out? Will it require a lot of work? I don't know, but with all due respect to Taylor: that is something that worries me a little bit.

So you'll never use it?

I wouldn't say that. When I know that the API has settled down I will be happy to dive in and have a go. If Laravel support Composer packages like FuelPHP 2.0 plan on doing then I'll be able to drag and drop components between the two easily, so my framework choice will be far less important and I can play with either one.

Final Thoughts

Laravel has become the new, snazzy framework which gives bored PHP developers a new way to do things. CodeIgniter (and FuelPHP for that matter) are both similar projects which handle things in very similar ways.

What right minded developer wants to work in the same way for 5+ years without exploring other options? Not me that's for sure, and most developers eventually reach the same level. For years the solution for these bored PHP developers was "Fuck it, I am going to learn Rails", or Python, or Node, or whatever the hell else is a bit different - just to stop the boredom.

The thing that makes me truly happy for Laravel's existence is the fact that the project has now started acting as a catchment base for those developers and keeping them in the language. Instead of developers outgrowing the simplicity of CodeIgniter - which most of them cut their teeth using - and wondering off into the "grown up world" of Python/Ruby/etc, we're keeping a lot of smart developers in the PHP community to build cool stuff.

If Laravel start playing ball with the PHP-FIG group and building their components as PSR-0 and using Composer -much like FuelPHP 2.0 will be doing - then we'll start to see the whole PHP community really improving together instead of silioing our efforts into fragmented framework communities. We aren't CI devs, or Laravel devs, or FuelPHP devs, we are PHP developers and it's time to make that mean something respectable.

Interoperability for the win. Trolling for the lose.

Comments

Gravatar
Benjamin Kohl

2012-05-22

There is no room for disagreement in anything that you said. I've got your back when the trolls arrive.

Gravatar
Jonob

2012-05-22

"Instead of developers outgrowing the simplicity of CodeIgniter - which most of them cut their teeth using - and wondering off into the "grown up world" of Python/Ruby/etc"

This. I am just about to start a big new project, and had pretty much decided to go the Python/Django route. Now with Laravel 3 out...I'm not so sure

Gravatar
Steven Hambleton

2012-05-22

I wish this had been posted 2 weeks ago. Thanks for explaining why it's important to have the choice of stable but slowly developed frameworks and cutting edge.

Gravatar
Niall O'brien

2012-05-22

Awesome article Phil. Interesting stats regarding your users.
I'm guessing that in a perfect world, if your products were written from the start for 5.3 only, you wouldn't really have to worry and could easily use any of the new emerging frameworks.

Gravatar
Tom Schlick

2012-05-22

>> We aren't CI devs, or Laravel devs, or FuelPHP devs, we are PHP developers and it's time to make that mean something respectable.

Completely agree Phil. Even as a Fuel guy I can recognize the amazing work Taylor has put into laravel. There is nothing wrong with that especially since FuelPHP & Laravel share a lot of the same core ideas. Both frameworks are making the php industry better as we get people away from using their own implementation or *gasp* ZFW.

Gravatar
Mior Muhammad Zaki

2012-05-22

Any plan on CodeIgniter to use Composer?

Gravatar
David Thorpe

2012-05-22

I understand the requirements for backwards compatibility for some scenarios but in client-facing project development where you're hosting your own code and don't need to worry about that, I'd rather adopt new and exciting technology than stick with something that has in the past slowed down my development.

Gravatar
Edwin

2012-05-22

Yes. Agreed with all your points.

Gravatar

2012-05-22

David Thorpe: That is exactly right, when you control the shots you can do whatever you like, and for that reason I use PHP 5.4.2, which is lovely. Sadly only 0.2% of PyroCMS installations are attempted on PHP 5.4 so I'll be sticking with PHP 5.2 for at LEAST another 3 months and then move to the lowest common version of PHP 5.3. :-/

Mior Muhammad Zaki: Sparks are being rejigged a little bit to use Composer as the delivery channel, meaning that Sparks 9be them CI 5.2 only packages or PHP 5.3 PSR-0 compatable items) will all be easily installable in the exact same way.

Gravatar
Dwight

2012-05-22

it's "death knell" not "death knoll".

http://www.thefreedictionary.com/death+knell

great article.

i like reading about the history and evolution of codeigniter and other php frameworks.

Gravatar
Davidber

2012-05-22

Not trying to start a fuel versus laravel versus ci fight :)

What laravel has that Fuel doesn't have at this time is Dayle Rees. His little $5 pdf does more to get n00bs going with the software. CI has the benefit of eons (it seems that way) of documentation, but it is scattered throughout the interwebs. Fuel has some documentation, but it is slim and messed up a good chunk of the time.

I realize you love OIL, but not everyone wants to spend time with a CLI.

IMO, a centralized site with decent tutorials, they don't have to be 3 miles deep, but can be 10' deep and 3 miles wide does more for getting the masses going into the framework than anything else. That is currently what Laravel has going for it. Feature wise, imo, Fuel offers more. Getting people up to speed, Laravel wins.

Gravatar
Dan Storm

2012-05-22

Excellent post!

I feel exactly the same way. Many of my projects CI based and I'm still in the process of migrating some of my old projects and I'm still able to deliver to many different sLaravel

Following the development on CI still enables me to check out fancy frameworks like Laravel and I believe it helps with personal development doing so.

Gravatar
Joost

2012-05-22

Very good post. I'm am very happy with the fact that Codeigniter API is as stable as it is. It's the way to go if your projects need to survive for more than just a few months. We have projects originally developed in CI 1.6 that are still going strong. And it is a HUGE reflief we can update the CI core without having to refactor the entire codebase for the application. Sure, it's not that sexy. Sure, we get bored with the everpresent CI superobject. But it helps us to do what our clients expect us to do: ship software that can be scaled and maintained.

Gravatar
Max Schwanekamp

2012-05-22

Overall a very sane and reasonable post. You wrote:

> I don't want to justify his article with a direct link, but you can find it on Google.

This is a little silly. Phil, we're adults here, just link to it. Just like this post, Shawn's blog is opinionated. His language is clearly somewhat sensational and hyperbolic. We can take what he says with some salt. No need to act like it's so egregious as to be not worth mentioning. Plus there is some very good discussion there, including your comments and a particularly good one from Matt Borja.

People get worked up about these things, and yeah, Shawn could have been more balanced in his post, but ultimately the discussion has a good chance of being fruitful. Just like the "Plea to Ellis Lab" post that sparked the creation of Reactor, and the currently much-healthier state of CodeIgniter -- due largely to your efforts of course.

Thanks for the great post, and for being willing to stand up for CI.

Gravatar

2012-05-23

Max: Thank you, I've updated the article. I'm not particularly angry with Shawn, I just took exception to a lot of the comments he made and the fact he refused to see what the problem was frustrated me further.

I didn't want the whole article to be about that as it covers many points I've been mulling over for a while: Why PHP 5.2 is still important for some, why CI is a great tool for those developers, why developer A is not in the same position as developer B, why framework adaption of PSR-0 and Composer is important, why Laravel is starting to keep PHP devs in the community, etc.

Gravatar
Hutch

2012-05-23

Phil,

I appreciate you acknowledging Laravel as a good framework, even in your role as CodeIgniter and Fuel contributor.

However, it is my belief that both you and Shawn are missing a fundamental point when expressing your opinion on these frameworks; the fact that they are simply frameworks. PHP developers, especially those building large scale applications, should not depend on the framework creators to adapt to meet their needs but rather use the features each has as a starting point to meet their requirements and then create and maintain their own fork. The point that an upgrade of a framework from 3.x to 4.x may break large scale applications, while true, should, in theory, never happen.

The PHP frameworks are all built on the same language, a point you only alluded to at the end of your post. It does not matter if CodeIgniter, FuelPHP or Laravel are 'dead' or 'alive'. They are simply at different stages of implementation of the progression of PHP on a whole. I believe all these blog posts do not add any value to the community as they are just opining on whether a framework makes use of what the latest available features. I think it would be more constructive if they listed the PHP features that they use as opposed to other and how it would add value (speed, reliability, simplicity) to an application.

Gravatar

2012-05-23

Sorry Hutch but I think you mis-understand the idea of an API change. This is "We've had an idea of how we can help people build applications better" and not directly related to "PHP features" at all. You suggest that improvement only happens when a new PHP feature is release, but that is hardly how it works.

Currently lots of different frameworks have been using namespaces differently. Relatively recently a standard has come into place called PSR-0 which changes how people use namespaces. This leads to an API change, but is not a new feature.

Even something as simple as "We've realised that these two function arguments are in the wrong order" is an API change, something that PHP itself has been scared to change but is a factor framework developers must consider on their quest to make a better framework. Some try to be the best by changing regularly and some are happy with not changing and improving in other ways.

I don't think this statement means anything: "They are simply at different stages of implementation of the progression of PHP on a whole.". What is actually happening is people are using the language available to build on top of, to wrap up functionality and provide tools (or a platform for tools) to make frameworks - not just catch up with adding "stuff" that PHP has - which to be fair is not much.

My entire article is not about proving what is dead or alive because both of those terms are stupid, my article is about pointing out why there are different tools for different jobs and just because on tool is no longer the right fit for you, does not mean it has no place in the world.

Gravatar
Hutch

2012-05-23

Fair point on me missing the point of API changes that will be framework independent. However, my point stands that on large scale, SLA type apps, creating and maintain your own fork would be essential and many of those issues would become personal decisions.

The statement of "They are simply at different stages of implementation of the progression of PHP on a whole." refers to you differentiating the point versions of PHP required by CodeIgniter or Laravel. e.g. CI previously not using Namespaces which Fuel implemented.

And I totally agree with your last paragraph, as that is the same point I am making. That is why I think evangelizing or condemnation of a framework is useless. It reminds me of when people post on twitter "just started using <insert whatever here>" followed five minutes later by "<same item> is the best ever". In a year it will all change again, especially when technology is involved.

Cheers.

Gravatar
Fredrick Strohl

2012-05-23

Very great post. I just stumbled upon your weblog and wanted to mention that I have truly
enjoyed surfing around your blog posts. In any case I will be subscribing
to your rss feed and I hope you write again very soon!

Gravatar
Xavier Vidal

2012-05-24

Nice post, Phil.

I've developed with Kohana, Symfony, Zend and played with Fuel and other frameworks, and there's always that gets me annoyed: refactoring and migrations.

I think the main goal is to keep the framework development stable, to release new versions but never break older versions. This is an permanent issue that nobody thinks about.

I don't mind if a framework holds more code if if suits a painless migration. I wish to use X framework v1 and download X framework v2 and make the upgrade as i need, because there will be a compatibility layer, a simple switch or whatever.

I want changes and I want to keep in the PHP development edge, but sometimes the cost of upgrading is too high.

The great task of software development is to make systems that can evolve without breaking things, and if this means to have more source code i don't mind, maybe with bundles, maybe with some special architecture, i don't know, this is our task as developers: keep applications running and avoid big refactorings.

My 0.02 cents ;)

Gravatar
Hari K T

2012-05-24

Nice post mate .
I like your love for PHP-FIG group and PSR-X :-) .

Gravatar
Paul

2012-05-24

The bitching between web frameworks is getting so boring. These days people seem to care more about the framework than the project being developed.

There are way more frameworks than I care to count, each offering pretty much the same functionality, just in a different style.

Btw: I love how this post comes up 2nd in Google for Laravel ;)

Gravatar
Tim Post

2012-05-27

I've been playing with Laravel a bit, and I like it. But I'm never going to change my company's standard base over a sudden rush of lust that washes away once I realize just how much work that would be without much real benefit. Am I going to use it for a few personal projects? Yup. I'm also playing with Fuel, which is growing on me rather quickly.

Just use the tool that lets you get the particulars of the job done quickly. This whole framework debate reminds me of old ladies snickering because someone wore white after a certain day of the year. Frameworks should make development fun, convenient and consistent without getting in your way. I say the same thing about editors.

At the end of the day, you still need to produce. Producing is what makes users happy and pays the bills.

Gravatar
Click Here

2012-05-30

Simply want to say your article is as amazing. The clearness
in your post is simply spectacular and i can assume you
are an expert on this subject. Fine with your permission let
me to grab your RSS feed to keep updated with
forthcoming post. Thanks a million and please continue the gratifying work.

Gravatar
Matthew Schenker

2012-05-30

Hey Phil,
Thanks for a great post. I read the post that sparked this one, and like a lot of people was put off by the loaded assumptions in Shawn's writing.

I've spent the past few months building (or trying to build) test sites with a few different frameworks: CodeIgniter, Yii, Symfony, CakePHP, and Zend. I'm still zeroing in on the one that I want to use for my future projects. I'll admit up front that I'm strongly leaning towards CodeIgniter.

For the past three years I've been developing using Joomla, and have definitely outgrown it. Just to add some perspective here: when you come from a bloated CMS like Joomla that makes all kind of assumptions about how you need to do everything, and then you start exploring frameworks, CodeIgniter and Laravel both look quite liberating!

I'd like to address a couple of things you get into in your post...

"...bored developers going somewhere else to build something else."
“What right minded developer wants to work in the same way for 5+ years without exploring other options?”
I don't understand becoming "bored" with a framework. Maybe I'm way off, but if a framework adheres to good PHP, you can always head into the general PHP community and pull in new ideas (libraries, some really creative new bits of code for your sites, etc). The framework is just your base, but you have the whole PHP world at your fingertips. Now, if you're bored with PHP -- well, that's another story. Nothing CodeIgniter or Laravel can do for you there!

“CodeIgniter is a slow moving framework with an API that has barely ever changed...”
I'm excited about playing with the latest and greatest capabilities so I will be ready when they become standard. But I also like reliability. To me, CodeIgniter presents a kind of stability that makes me feel confident using it. I like the idea that CodeIgniter developers take their time and that changes come to the framework only when it's clear that it's really time for that change, and not just because there's a new idea being circulated about.

“CodeIgniter 3.0 is still actively worked on by a whole team of developers, including a new Reactor Engineer Alex Bilbie.”
This seems to connect with the previous point about the pace of change. Anyone who follows CodeIgniter on GitHub or the CodeIgniter forums should notice that work is happening quite actively there. I wonder whether CodeIgniter gives an illusion of “not active” because it's so stable? In other words, could it be that some people are mistaking intentionally careful development as a lack of interest? Perhaps it's the other way around: CodeIgniter developers are quite active and think carefully about any changes they make to the code base?

“While developers have always been keen to move to the newest versions of PHP it's a well known fact that sometimes you just can't do that.”
This is a difficult question. Even in the simplistic Joomla world, some extension developers have moved to PHP 5.3. Joomla itself is soon to require 5.3. So there's a point where it's good to put pressure on hosts to move up. But again, there must be compelling reasons. I do Web sites for a living, and often my clients are small-time outfits on hosts that only just started allowing 5.3 (or in some cases don't even do that). I'm feeling more and more confident in telling clients to drop their current host if they cannot get 5.3. But it's not always easy explaining this to someone. I think the CodeIgniter developers were right in holding off on this until now.

“Taylor has created one of the nicest looking frameworks around by building 3 major versions within the year, most of which have required a fair bit of application redevelopment.”
I agree that Laravel looks nice! I've read all their documentation, and it does seem like they are on the right track. But if I were to put the frameworks I have experimented with on a continuum, I'd say that Laravel and CodeIgniter feel rather similar in many ways. Then there's Yii, which is not too distant from these two. On the other end, I would put frameworks like Symfony and CakePHP, which seem to depart from familiar PHP territory.

I wonder whether there's so much talk about CodeIgniter because it's such a central framework in the whole PHP community? In terms of pure amount of material, tutorials, and contributed libraries, CodeIgniter is quite above other frameworks. Just my interpretation, but it seems that everything CodeIgniter does is more visible than other frameworks. Every mistake and rift in the community is taken more seriously because of CodeIgniter place in the PHP community.

Thanks again Phil for this post. These kinds of discussions move us forward!

Gravatar
Phil Sturgeon

2012-05-30

"I don't understand becoming "bored" with a framework."

This comes down to doing things exactly the same way all the time. If you are not using anything new your skill-set stagnates and you become somewhat irrelevant. Imagine if you were still using CVS and not knowing how Git works makes a job interview harder?

You need to learn new things, and its fun to learn new things. The point I'm trying to cover is that the new way might be awesome, but the old way may well have reasons for staying how it is.

"I do Web sites for a living, ... I'm feeling more and more confident in telling clients to drop their current host if they cannot get 5.3."

Quite rightly so. I'm putting most of my clients on PHP 5.4.3, because I can. Distributed applications like ExpressionEngine, PyroCMS and PancakeApp need to work everywhere, and the fact that PHP 5.2 is still clearly alive means it is a requirement for some. If it's not for you then that's great, how liberating!

Thank you for your feedback, I agree with most of your post :)

Gravatar
Matthew Schenker

2012-05-31

Hey Phil.
Yes, of course we need to keep our skillsets improving all the time. But my point was that a developer being "bored" certainly is not the fault of the framework, right? I mean, a good framework gives you the potential to keep building something new and challenge yourself, since at its heart the only limitations are PHP itself. That's one of my attractions to using a framework: an opportunity to become part of the wider PHP development community (as opposed to being ilocked away in the isolated world of Joomla). Every time I wander around on StackOverflow (for example) I see another technique to try out that I hadn't thought of before.

Gravatar
Jason Lewis

2012-05-31

Great article Phil, it's good to see things like this being written. Well done.

Gravatar
Ireland

2012-06-05

Hello everybody, here every person is sharing these kinds of know-how,
thus it's nice to read this web site, and I used to pay a quick visit this blog every day.

Gravatar
Georgi

2012-06-07

Hey Phil,

Gimme a hand with something, please.
If I wanted to start using a PHP framework for the first time, which should I choose?
I'm looking for a simple answer, nothing fancy.

From what I've read I'm looking to choose between CodeIgniter and FuelPHP (like the graphics ha-ha).
But as of lately Laravel became a candidate.

I'd appreciate any input.
Otherwise, thanks for the insight in your article.

Gravatar
Matthew Schenker

2012-06-11

Georgi,
What's your comfort level with PHP? The reason I ask is because, in my opinion, for those of us who want a framework that keeps close to "pure" PHP, CodeIgniter is the best. For example, I've spent time with Symfony, and it seems powerful, but for whatever reason it feels kind of foreign to me. Same goes in similar ways for CakePHP, and even Zend. But CodeIgniter feels like a natural extension of just plain old good PHP techniques. Another one that (in my opinion) stays closer to "pure" PHP is Yii.

Gravatar
Phil Sturgeon

2012-06-11

"But CodeIgniter feels like a natural extension of just plain old good PHP techniques."

Well you kinda nailed it, they are old techniques. Other frameworks use namespaces and newer PHP 5.3 features, and some take it a lot further than others. For example Symfony to me feels like writing in Java, while CodeIgniter still in some places feels like writing in PHP 4.

That's not always a bad thing as new developers can get up to scratch easily, but it can explain why some people feel the way they do about the framework.

Gravatar
Georgi

2012-06-12

Hi Matthew,

I'm pretty good with PHP, I've been using it for years.
I've never used a framework before. I tried to look at CakePHP a few months ago and I just didn't like it.
Not that there was anything wrong with the framework, it was just the feeling I had using it.

Laravel seems nice and has lots of good recommendations, including Phil, but I'm worried about wasting time if it turns out to be something I won't like. But then again, same goes for CodeIgniter and FuelPHP.

Thank you.

Gravatar
Click Here

2012-06-21

It's amazing in support of me to have a web site, which is good in favor of my experience. thanks admin

Gravatar
Fede Isas

2012-06-23

Great post, Phil!
If Codeigniter is a mature and stable framework to work with, and Laravel is the new, living on the edge, prone to change framework, then, where FuelPHP fits? In terms of future API changes, how mature is FuelPHP?

Gravatar
Phil Sturgeon

2012-06-23

Fede: I didn't comment on the maturity of FuelPHP because I didn't think it was in question. CodeIgniter has stayed pretty much the same for 6 years, Laravel has recoded itself 3 times in less than a year and FuelPHP has kept the same for 2 years but is undergoing sizable changes - but adding a legacy package that will make the transition as simple as possible.

All of the frameworks develop and change at different rates but Laravel and FuelPHP occupy the same area feature-wise. I don't think we can call any of the three unstable, but API changes do happen for the latter two as they sit on - or near - the bleeding edge.

Gravatar
Mahen23

2012-06-23

laravel is just the Justin Beiber of the current moment, after Beiber, another artist will come. The same applies to PHP frameworks, after Codeigniter, Laravel is here, after Laravel, a new one will come. Continous improvement is the motto.

Gravatar
Sire

2012-06-24

Great article, Phil.

@mahen23, did you just call Bieber 'improvement'? ;)

Gravatar
Federico Isas

2012-06-27

Phil: I didn't mean to question FuelPHP maturity in a bad way. I've been building apps with CI for several years and I think we can all agree that it moves slowly. I was really excited with the Sparks project, but now that I see Composer working with Laravel and FuelPHP, it just feels like the way to go.

But (and this is going to make me sound like a jerk) every time I'm about to make the jump to a new framework mantained by the community, I look at CI with EllisLab behind, and it just feels more `comfy`. I don't know, maybe there are just too many abandonware out there and I'm just being paranoid.

Anyway, great post! Best regards!

Gravatar
La Perla

2012-06-28

Maybe i'm too late to comment here but i found something intriguing in laravel:

CodeIgniter handles native library replacing and extending in a very simple way. When I extend a library using MY_library the new version is being used everywhere in the application, even inside core libraries. It's as simple as using $this->library ensures that the class being used is MY_library (that extends CI_library). I feel this mechanism like a 'dependency injector' in some way.

What about Laravel? Although it has a cool IoC class to resolve dependencies i didn't see it in action in the core classes. Core libraries are using static calls like Config::get() or Request::blahblah(), and that not allows a programmer to using custom versions of Config or Request classes. Searching in laravel code I found that the Autoloader class has a no documented method alias() that allows to register class aliases. That can solve the 'problem' but I don't think that using the php function class_alias() is the better way.

What do yo think?
(sorry for my bad english)





Gravatar
Phil Sturgeon

2012-06-28

Not particularly sure how Laravel solves it, but I love the way Fuel handles it.

class Session extends Fuel/Core/Session;

Namespace aliases are awesome :)

Gravatar
Petar Zivkovic

2012-07-21

Excellent post.

I whole-heartedly agree with your sentiment about developers getting bored with PHP and looking to alternatives, I've found myself there often. What keeps me developing in PHP is the fact that I actually really like using PHP, my job requires maintaining a lot of existing PHP code and most freelance work I do is with clients that have heard of PHP or want a CMS extended (like WP for example)... so all good reasons for staying with the language.

Laravel, from what I've been seeing lately, really is awesome. But regardless of it's awesomeness, I'm going to hold off on using it because as you mention, I'm not sure it's done changing... and I'm not sure that I've got the free time to learn and re-learn the framework several times just for fun.

Cheers

Gravatar
Devendra Verma

2012-08-03

Thanks Phill for this articles... Your post will help developers like me to have faith in CI and not to switch to something else, just because there is no rapid development. Now I have understood stability matters.I have seen people shifting from one framework to another because it has an edge over others .. but when I started using framework , CI is the one who taught me MVC easily and I am happy that i am in CI community.

I am still learning CI,some developers suggest to try ruby or python though, I was also thinking about this but after reading your article I am going to stay with CI.

Gravatar
Mithat

2012-08-08

Great post. A additional concern I have with Laravel apart from the moving-target API issue that you mention is that a lot of what might be considered core functionality (scaffolding and authentication in particular) is available only in the form of Bundles. While there are advantages to this, I can think of one significant disadvantage: orphanage. If I understand Bundles correctly, an author merely needs to lose interest in it for it no longer to receive any maintenance.

Or is this not actually an issue?

Gravatar
Gabriel Dumbrava

2012-08-27

I would suggest everyone starting to use a web framework to give Django a try. I've been using Django for the last few years and today I took a look at the other PHP frameworks and at this point they simply don't match Django in ORM, ease of adding extensions, number of lines to write to accomplish the same thing, automatic admin generation (which is very customizable), etc. This decision will save you a lot of time in the future.

Gravatar
Paolo Umali

2012-09-29

@Gabriel,

I'm all ok with FuelPHP's SimpleAuth. Also, creating a new driver is so easy. Take a look at NinjAuth too.

on Laravel, the very first goodies I noticed being used are the anonymous functions. But I still love FuelPHP because pretty much they have the same goal. What excites me about frameworks is that there is a great chance of interoperability the moment they all adhere to accepted standards.

Gravatar
Paul

2012-10-10

I just like the humor in your writing, I am currently learning CI and built 3-4 sites. I was a bit disillusioned by the post on CI being dead, but thanks for reassuring my wavering faith

Gravatar
Shawn

2012-10-19

@Mithat - authentication and scaffolding are built into the core, no bundles required. No need to scare people off!

@Gabriel - Django is a Python framework, wrong language amigo.

Great article Phil, a lot of people need to hear this before jumping on the down-with-every-other-framework bandwagon.

Gravatar
Robertbaindourov

2012-11-21

I guess you can't compare a platform like Grails with PHP. But if your writing a "large scale application" or what some might call, Enterprise, then is it necessary to have support for simple web hosts. I don't see how being able to deploy everywhere is something that an Enterprise application has to even be concerned with. Truly being bored with PHP might mean that you take a look at a newer language, one that eliminates the need for awkwardly typed characters and simplifies development. Laravel actually reminds very much so of Grails. Groovy is awesome. Its leap over Ruby, and lands on the JVM. And lets not mention Ruby as an alternative to PHP, because that language makes a mockery of what beautiful code should look like. Basically I think we should not say 'Laravel is better than CI' but that PHP is not going into the right direction at all. Backslashes for namespacing, really?

Posting comments after three months has been disabled.