16

I come from a Codeigniter background. I've used it for three years and really like it. It's simplicity is great.

I've built massive sites with Codeigniter, but I'm looking for a new PHP framework to learn.

The main reason for this change is a potentially big project on the horizon. It will not have many users (perhaps 100 at most), but the outbound traffic produced by the server will be huge. The project will transmit thousands of files (ranging in size from 1mb to several hundred mb) via FTP, one after the other. It also deals with users uploading hundreds of files.

The key for this project is speed. The system needs to fly through the running of the scripts (it runs a long script every time a file is sent via FTP to gather the file, it's type and it's destination) as quickly as possible to minimize performance issues. I'm aware that the transmitting of the files will only be as quick as the server can do it, and really as quick as the slowest bottleneck, but here I'm trying to minimize the bottleneck in the code as much as possible.

After a bit of research, I like the look of Laravel and have installed it to get to grips with it. But it's could its speed be an issue as its been tested to be slower than Codeigniter? Will heavy traffic and a lot of PHP parsing slow down the I know that Phalcon is based on C thus making it the fastest framework, would Phalcon be the better choice?

Any thoughts are much appreciated :)

Noah Goodrich
  • 315
  • 1
  • 4
  • 17
  • 3
    I use Phalcon for some highload projects and it is really fast (project was rewritten from Silex). I didn't work with Laravel, but benchmarks say it is much slower. – Phantom Jul 28 '14 at 15:03
  • 3
    Depends on the code you write. A well-written and optimized web application will always be faster than a poor one, no matter what framework it’s written with. – Martin Bean Jul 28 '14 at 15:31
  • 3
    @MartinBean - Yes naturally. But for sake of argument let's say the site is written with good, optimized code. – Noah Goodrich Jul 28 '14 at 15:36
  • I am also in a similar situation. So what did you choose? – jithujose Aug 02 '14 at 12:08
  • I found the best compare here : http://vschart.com/compare/phalconphp/vs/laravel – paulalexandru Oct 02 '14 at 07:05

2 Answers2

8

I am unsure if your question will be taken down as it being an opinion (you know according to guidelines and all)

but IMO - despite Phalcon being fast for its C build, I find (being Laravel 3 user transitioning from Codeigniter before it retired) with Laravel 4 now - it has a lot of integration with known networks and architectures.

Not to bash Phalcon as I have very minimal usage of it but here are some bullets for Laravel:

  1. Easily modular with composer: all packages can be imported in with the current PSR standards from composer for rapid deployment of dependencies which Codeigniter was lacking.

  2. It can follow any style you want it to be: PSR-0 and PSR-4. It's a natural MVC but you can easily go with TDD(or BDD), and other format. Though this is a poor bullet to some but it offers a lot of flexibility on adapting to various works.

  3. IoC is built into the APP. Its very comprehensible and extensives in order to utlize IoC

  4. Taylor Otwell is very active in adjusting and fine tuning the framework. Its a very active thriving community (Laracon NYC just passed, next up Laracon Amsterdam), so you will not be shorted with support.

  5. A lot of know application out there are pre-integrated with the framework from Queues (beanstalk, IronMQ) to mailers (swiftmailer), and even Cache systems (Redis or others). The interface is straight forward in terms of functions - worse case? just extend and you are ready to roll out.

  6. Readability: a lot of the structure and how the ORM (if you choose with the native ORM of Laravel which is called Eloquent) is all about readability of your code despite the underbelly being complex. So it will scaled right (a lot of people who switched over states the same).

Some further readings from those who switched over and wondered like you: http://www.web-and-development.com/laravel-vs-codeigniter/

and http://mulzer.tumblr.com/post/24141993116/12-reasons-you-should-switch-from-codeigniter-to

Now a bullets for Phalcon vs Laravel in speed: With Laravel + APC + a few other tweaks you can achieve something close to it while giving you all the flexibility that you gain from Laravel.

Finally if you need a side by side comparison: http://vschart.com/compare/phalconphp/vs/laravel

azngunit81
  • 1,574
  • 2
  • 20
  • 38
  • Great thanks for your input. I did previously have a check of the vschart, really good way to compare. I have to say Laravel was my first choice but i'm still somewhat undecided. – Noah Goodrich Jul 28 '14 at 15:44
  • Recommend for beginners is to check Laracast by Jeffrey Way. There are 18 free videos including a Laravel for beginner. Taylor Otwell also made a vagrant OS for Laravel specific setup out of the box if you need a VM...therefore you can actually get your feet wet in under 1hr (download time not setup time) which is a very nice touch for those who wants to try. @NoahGoodrich – azngunit81 Jul 28 '14 at 15:58
7

If it's just about speed take a look at this benchmark:
http://systemsarchitect.net/performance-benchmark-of-popular-php-frameworks/

I would def go with phalcon since it's created on c level basically the same as if it is php itself.

EDIT:

As of the writing of this edit, the site mentioned above is non-functional. Below is a snapshot from archive.org: https://web.archive.org/web/20160329072449/http://systemsarchitect.net:80/2013/04/23/performance-benchmark-of-popular-php-frameworks/

Community
  • 1
  • 1
herriekrekel
  • 571
  • 6
  • 15
  • Yeah that performance benchmark in that link was one of the reasons I was initially interested in Phalcon. – Noah Goodrich Jul 28 '14 at 15:03
  • 2
    Would Laravel + HHVM be a competitive option? – Unnawut Jul 28 '14 at 15:04
  • @Unnawut I would say so but that doesn't have much to do with the framework pretty sure you can also get phalcon + HHVM to run which would than be faster. – herriekrekel Jul 28 '14 at 15:11
  • 1
    I'm not sure if it's possible to do Phalcon + HHVM though: http://forum.phalconphp.com/discussion/1353/hhvm. But yes you have a good point. Phalcon would probably run faster anyway since writing natively in C probably can do better optimization. – Unnawut Jul 28 '14 at 15:20