views:

1103

answers:

5

I am about to begin development of a new website and have been doing research on PHP Frameworks. I'm not an advanced PHP developer, but I have been developing web sites and apps (in asp.net) for a few years now.

My website will primarily be AJAX-based (using jQuery) and making lots of calls to web services. After some research, here's what I came up with:

CakePHP: Originally started developing in this, but found it too complex. The fact that it forces you to use and learn all this new stuff just to use it was a bit daunting, so I put it aside for the time being.

Zend: The performance of the framework leaves me a bit skeptical, but I heard it has great support for creating web services. I also heard it was a bit complex.

CodeIgniter: No real reason for not using this one. Based on what I've read CodeIgniter and Yii are very similar, but Yii is a bit faster and doesn't have un-needed code for PHP4 (since I plan on developing exclusively in PHP5).

As far as Yii, the only things that scare me about it are that it is newer than the other frameworks so it has a smaller community. It also doesn't seem to have a ton of web service support (only SOAP, from my understanding) as opposed to Zend.

So my questions come down to:

  1. Should these things worry me? (not as big of a community, poor web service support)
  2. Is there anything else I should look into?
  3. Is my choice of Yii over the other frameworks ok for a primarily AJAX-based web app?

Bara

A: 

Pretty much every modern web framework has excellent support for XHR/Ajax. It really just boils down to your personal preference based on your current knowledge of the language in which regards to framework you'll like the most.

I would also advise Kohana as it's pretty stable, mature, and has excellent support.

You won't really know until you play around with the framework, I suggest dipping your toes in a few of them.

meder
+4  A: 

You need to document the requirements of your project and the reasons behind why a framework is even required in the first place. Then look at the future of the site and associated functionality. Then choose the framework that provides the strongest functionality to satisfy those requirements. Don't get hung up on opinions. Read the documentation and identify the components you want to use, narrow your search from there and then experiment with them all.

Performing your due diligence will pay off not only for you, but for your client who is paying the bills.

To sum up:

  1. Identify required components of site.
  2. Research frameworks and identify matches for your requirements.
  3. Experiment and learn which ones work best for this job.

Edit/Opinion Additions:

If this is merely a personal growth project, then I would look at using what's going to look the best on your resume. Zend has the biggest name and a solid product, so they win by default because it's the old "can't get fired for IBM argument." Some big players are using Symphony, but it's a big learning curve. Yii, Cake, Kohana all have pros and cons and are great in their own way.

randy melder
nice answer, far better than mine :)
meder
you're kind. :-)
randy melder
There is no client, this is a project primarily for myself so I can learn, have fun, and perhaps use in the future. The site will really only require one page, and most interactions will pull up content depending on the action. I'll likely load more from another page. As you can see from my initial post, I DID research some frameworks, I was simply asking if I've made the right choice or if I missed anything. CakePHP is really the only one I've really tried in-depth, and I didn't like it.One other thing I'd like to point out is that I don't really want to do any command-line stuff.
Bara
+3  A: 

As a main developer of Yii, I'm maybe not totally fair (but want to!), however, for objectivity I should mention I tried both Zend and CodeIgniter before.

In the earlier releases of Yii, benchmark tests were very impressive, and because the leadership doesn't want to have this framework bloated, not all feature requests get implemented. This may sound a little disappointing, but if you're experienced enough in programming and design, you are already aware of its potential.

On the other hand, Yii still supports a really wide variety of practical and real-life solutions. This is somewhat subjective, but if you look at those often used classes, you will find out their power in real issues.

The documentation (especially the API) is serious-tuned and very specification-like, which you may find strange and cold in the first hours, but in the long run, it'll definitely ease your job (unlike those fashionable docbuddies, which would like to make friends in method signatures).

These all contribute to your development time. People are able to create serious applications within weeks!

pestaa
How is 3rd party support for Yii, specifically for addons/modules?
Bara
Two core developers (including the leader one) also work on a project called Zii, which is an official extension repository for Yii. It's not very mature so far, but there are nearly a hundred user-contributed extensions. By design, the architecture allows you to to plug in other libraries (like Zend classes) very easily as well.
pestaa
+1  A: 

I've used to be a developer of Symfony, CakePHP, Zend framework, Kohana and Code Igniter, but around 1 year ago I discovered Yii, My first (and second and third) impression was excellent:

  • Easy to learn
  • Easy to implement
  • Easy to use and extend
  • Very, very, very fast
  • Support of many languages
  • Support of many software, servers and accelerators
  • Support of MySQL, PostgreSQL, SQLite, and Oracle... Firebird support is beta.
  • Many other features that I don't remember right now.

Download it, use it and implement your project with it,... you'll be amazed.

Now I ask your questions:

  1. Should these things worry me? The community is not as small as it seems, Currently, Yii has an active community. We are not a few.
  2. Is there anything else I should look into? You should look your needs: Database you'll use, Web server, and others, as Randy said.
  3. Is my choice of Yii over the other frameworks ok for a primarily AJAX-based web app? Yes, It is.
robregonm
A: 

I need to learn a new useful PHP framework, for get a job. In my options I think in Yii and Kohana, in this order; and I'm glad to read your comments, guys. I try Yii with more enthusiasm. Thanks!

HighToro