PDA

View Full Version : PHP Framework



YargicX
2 Apr 2008, 4:22 AM
Hi to all,
I want to use a PHP framework. But i can't decide.I use extJs framework for client side. Is there ant PHP framework compatible with extJs.Or what's your suggestion for PHP framework?

Thanks to all.

esoteric
2 Apr 2008, 4:31 AM
There really isn't a compatibility problem with any framework and extjs, however I highly suggest CakePHP for a PHP Framework, I have tried just about every single framework out there and CakePHP is by far the best IMHO.

http://www.cakephp.org

YargicX
2 Apr 2008, 5:01 AM
Thanks for your response Eric... Have you tried Zend Framework too? There is a question in my mind.Zend Framework's owner a big company of course. Is it a advantage for Zend Framework at the moment or for future?

esoteric
2 Apr 2008, 5:14 AM
To be honest I haven't tried it out. Zend tends to have great products and after looking over it it looks like its a similar structure to what CakePHP offers. In the end I would look over the docs, the community and if a big company backing is a good thing for you then go with them.

I still suggest CakePHP, it has a great community, documentation, and support.

YargicX
2 Apr 2008, 5:46 AM
To be honest I haven't tried it out. Zend tends to have great products and after looking over it it looks like its a similar structure to what CakePHP offers. In the end I would look over the docs, the community and if a big company backing is a good thing for you then go with them.

I still suggest CakePHP, it has a great community, documentation, and support.
Thanks for suggestions Eric.
See you...

mirage
2 Apr 2008, 6:08 AM
I think Zend Framework is a great choice, though the learning curve is a bit more demanding than what you might want to deal with - especially if just starting out with PHP/MVC.

I primarily use and highly recommed CodeIgniter (http://www.codeigniter.com/) which has allowed me to crank out websites/apps faster than anything I've used before. I use it in combination with ExtJS all the time (though as mentioned ExtJS has really no compatibility dependencies with the server side frameworks) and I'm loving it.

The best thing about CI is that though it's open source, it's maintained by real company that also makes the [semi-commercial] ExpressionEngine CMS so as with Zend you have a commerical entity supporting the framework which can do great things to it's longevity. Last not least ExpressionEngine 2.0 is said to be build on stock CodeIgniter which means the programmers are eating their own dog-food. Hardly a better test case for a framework.

Cheers!

NOSLOW
2 Apr 2008, 7:31 AM
CakePHP by a mile! Although I'm not familiar with the Zend framework, I think the consensus with people in the CakePHP community is that it's trying to be too many things for too many people (When you try to please everyone, you please no one).

CakePHP takes a very lean approach with their framework and they really stick to their guns on this...it's core to their philosophy. If it doesn't need to be in the framework, they leave it out. They don't try to solve every edge-case out there within the framework, but instead provide a super-solid foundation to build upon.

One point worth mentioning is that you'll notice a big contrast in using CakePHP vs ExtJS. CakePHP takes the "convention over configuration" approach, while ExtJS is quite the opposite. If you follow Cake's conventions, you'll get a lot of functionality "automagically" (read, with a lot less coding), which is nice.

Since cake is an MVC framework, when combined with a front-end like ExtJS, you can virtually eliminate the "V" out of Cake's MVC . Cake provides one handy javascript helper that has a method to turn PHP associate arrays into JSON in one simple call (most of my view files look like this: <?php echo $javascript->object($data);?>).

What I have done is make all my Model calls return PHP associative arrays that are ExtJS JSON ready, so then the Controller code becomes very skinny. Cake's Models already return your data as Associate arrays, so you really just need to tack on the "success" & "totals" key to the array and it's ExtJS ready.

Once you get up to speed with CakePHP and ExtJS, you'll love it! You don't have to write any SQL, as Cake will do it for you once you've modeled your relational database properly. Cake provides a nice request handler that allows you to handle requests by extension (i.e. /posts/most_recent.json vs. /posts/most_recent).

Anyways, please excuse my rant :D

mjlecomte
2 Apr 2008, 7:34 AM
There are some other threads on this topic if you search the forums. I doubt any framework has changed that much to warrant any drastic inaccuracies in those threads.

KRavEN
2 Apr 2008, 9:14 AM
symfony is also a really good php MVC framework. There has been a lot of effort made on Extjs plugins for the framework that make it very easy to generate an Extjs application via the database schema and a configuration file.

YargicX
3 Apr 2008, 12:05 AM
Thanks alot to all my friend who responsed my question.
I think I'll use CakePHP...I hope it will be best choice for me...:)

Thanks again.

aramaki
2 Jan 2011, 3:46 PM
so, ok, cakePHP, CI, symphony, something else...this decisions maked by your personality opinion, but could you show any articles which present comparison between frameworks

scottmartin
8 Jan 2011, 8:20 AM
PHP:
http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks#PHP
http://www.phpframeworks.com/
http://www.webdesignbooth.com/22-open-source-php-frameworks-to-shorten-your-development-time/
JS:
http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks

and finally ...
http://lmgtfy.com/?q=compare+php+frameworks

Regards,
Scott.

manilodisan
8 Jan 2011, 9:45 PM
I use Yii. Very friendly and easy to use.
Used zend, kohana, cake and codeigniter before.

Codeigniter: no updates in years. They don't really follow people's needs, barely repair some bugs. A lot of things missing from it. Great community.

Kohana: Improved codeigniter, i let it go because right when I started they we're preparing a big update, not backwards compatible so I looked at Zend.

Zend: Very good fw. A little too "business oriented" for me. Richest one in my opinion but, another thing that I hate, is zend company tending to market and squeeze every dollar from it's user base so it might turn into something else pretty soon. Like all the good stuff in a "Premium" paid version etc.

Cake: strong fw, moves a little slow but that doesn't counts too much if you ask me. A lot of good websites are built on top of it.

Yii: I stopped here. This fw, once learned, really helps you build faster. Modules, MVC, good ORM, web 2.0 in mind. Built by some1 who developed another very important framework (Prado) in the PHP world. It lacks the libraries of Zend (but you can import zend libs into Yii.).

Like I did, I would suggest you to read their docs very well, see how the community answers, how much it takes for a problem to be solved, a question to be answered, how much it can save you time by providing stuff that you need frequently.

Akeru
9 Jan 2011, 4:54 AM
I use Yii. Very friendly and easy to use.
Used zend, kohana, cake and codeigniter before.

I second that, this is the path I've also taken :

Forget about Code igniter : it is way too hackish, cannot be called objet oriented and I often found myself struggling with it.

Kohana version 3 broke all compatibility with previous version. So starting a new project using it is was an option but their PostgreSQL support is a bit behind which was a show stopper for me. This put aside, this is a great framework.

Zend is very rich...so rich it could be called bloated. I tried it because it has a class for everything but often found myself only using a small part of them. Same applies for Symfony byt the way (did not try the version 2 though).

I fixed myself on Yii at the end. They have really nice features specific to their framework (behaviors, named scope). Their "definitive guide' is really a time saver when starting. You might also be interested in ext4yii which basically enables you to write extjs code in a php view.

Hope it helps.

Dumbledore
9 Jan 2011, 8:50 AM
Is there a Ext.Direct Stack for Yii available?

Akeru
10 Jan 2011, 12:20 PM
I really don't know. I've never looked at Ext.Direct (maybe should I...)

gevik
11 Jan 2011, 1:17 AM
Take a look at Ext4Yii too: http://www.ext4yii.com (http://www.ext4yii.com/)

manilodisan
11 Jan 2011, 11:48 PM
Take a look at Ext4Yii too: http://www.ext4yii.com (http://www.ext4yii.com/)
Why should we need PHP to create Javascript. No offence but it seems a little too much. I understand that it makes transition from PHP to Javascript/ExtJs faster by actually being productive while learning but I think it's worth to learn JS and Ext the hard way. Not to mention that you will always be behind versions since the bridge (ext direct or whatever) will have to be updated every time Ext is. This doubles the time for bugs being fixed in both applications or features being added. On top of that, it seems like an overkill to actually put PHP to interpret some templating language to have the output of the ext application.

Instead of learning ext you will be figuring out how to use the templating language which is an adapter for Yii. Should I go for Zend framework? Well, all my ext knowledge up to that point will stay back with Yii or whatever the adapter was written for.

You have the best tools to separate logic from presentation by not stressing either of them why shoot it in the head?

I use Yii to be fast and furious behind the scene. Extjs on a separate project to build the presentation. I can grab that presentation and even place it inside an air application or titanium and go desktop. It just gives you that portability that you don't wanna miss by building ext from PHP which takes you down the road of interpreting the markup, using a lot of regex to decide what should be where and stuff like that. Of course it's a small price to pay for most of the applications but...just my 2 cents, fell free to comment.

gevik
12 Jan 2011, 1:25 AM
Hi. I don't think this is the right place to debate Ext4Yii but to make a short comment on your reply:

It is all relative to what you are trying to accomplish and how complex and big your web application really is. Each layer on top of a given framework will have advantages and disadvantages. Frameworks like Ext4Yii, ExtGWT start to make scene once the actual technical implementation of your web application is only a small part of the whole picture.

Whether you use Ext4Yii or not, you will always need to learn ExtJS anyway. Creating Ext4Yii templates is really not difficult, especially when the provided code-completion does most of the work for you.

Happy coding :)

aramaki
12 Jan 2011, 11:23 AM
+1 for manilodisan