I am a newbie in PHP Frameworks and would like to share/discuss some experience with you guys. Getting straight to the point, what I understand till now (from a newby stand of point is this):
CodeIgniter + Doctrine + Twigg = Symfony:
Zend + Doctrine + Twigg = Symfony
Symfony 2, uses php5.3 (I realy like namespace stuff remind me .Net)
but it lucks of tutorials right now (only partial jobeet translation to ver2)
I enjoy CI community and noumerous tutorials, plus using Doctrine + Twigg I could achive the same with Symfony.
Zend is more enterprise with lots of tutorials, but more difficult to grasp than CI.
So the question is should I start with CI + Doctrine or learn directly Symfony2?
Am I correct with the above assumptions?
Start with CodeIgniter if you are new to frameworks. Both Symfony and ZF have a greater learning curve and if you're not familiar with some concepts you might get fustrated in the beginning with the more complex frameworks .
I would suggest you to go with Symfony 2 since it has got lots of good stuff built around it. Take a look at this article http://www.phparch.com/2010/02/symfony-2-benchmarks/.
Hope this link is very useful on learning Symfony 2. It's a tutorials based on days (21) teaching you how to create a calendar website. Good luck.
http://symfony.com/blog/do-you-know-jobeet
More:
http://symfony2easy.blogspot.com/
http://www.dobervich.com/2011/03/03/symfony2-blog-application-tutorial-part-i-project-setup/, http://www.dobervich.com/2011/03/05/symfony2-blog-application-tutorial-part-ii-the-data-model/, http://www.dobervich.com/2011/03/09/symfony2-blog-application-tutorial-part-iii-routing-controllers-and-templates/
it really adds up to what your requirements are.
Symfony is great, though my only bash on it is that it requires PHP 5.3, which is great, but make sure your host has 5.3 support. Also the issue of using CLI bugs me.
CodeIgniter 2 on the other hand requires 5.1.6, which is good for me as my host is still on 5.2; I also like how small CI was compared to Zend or Symfony. Now like you i like some of symfony's components and i use 2 of them (swift mailer & twig) on my CI install. doesnt mean you should just junk ci and go symfony. CI is built to be a stepping stone framework that you can build on. Symfony to me is a full-fledged framework with everything and the kitchen sink.
having said all that, not all frameworks are created equal. I use CI for one project and Kohana for another. Kohana offered me something i liked that CI didnt do and thats fine.
I think you should look at the different frameworks out there, some are full featured, some are bare-bones and allow you to grow with your needs.
You may quick start with Cygnite PHP Framework. Simple yet powerful tool to build your next project. It gives you exceptional performance. Check benchmark results:
Performance benchmark results
Related
I am interested in learning Zend Framework 2.x, and I've noted that there are many good books written about ZF 1.8, 1.9, etc... however, I haven't come across any that explicitly states it is for ZF2 (except for one, and it was written in German).
In order to learn ZF, I could sit an learn it through the documentation... however, that sounds rather unsavory, despite the fact that it contains the latest information and arguably is the "best" source. I would like to endeavor in the more abundant sources on versions 1.8 or 1.9 as I learn this framework.
How much overlap is there between 1.8/1.9 to 2.x? I know 2.x uses namespaces and many new PHP 5.3.x features, but are there really that many changes between the implementation of these versions that I would be wasting my time trying to learn anything less than 2.0?
I'm aware that even if there is a large amount of compatibility, I would still have to come back and fill in a few "knowledge gaps". I'm just looking for a quick run down of the framework overall.
Thank you for your time.
Zend Framework 2 is very different from ZF1. It's core has been rewritten and the MVC structure has changed quite a bit.
The blog post announcing ZF2 goes into some detail on what has changed and why so I would recommend reading that. If you haven't used ZF1 extensively, you won't know some of the components they are talking about but that's okay. But as it states, ZF2 will look alien to those familiar with ZF1. Part of this is the new MVC structure and there are many new core components not available before including the ModuleManager, ServiceManager, and EventManager which provide better ways of accomplishing tasks that were more abstract to accomplish in ZF1.
Unless you plan on working with ZF1 projects, there isn't much sense in learning it at this point; I'd jump right into learning ZF2 at this point. If you were to learn ZF2 now and come across a ZF1 application down the road, there will be things you run into you aren't familiar with but largely you should be able to understand what's going on and get in and edit the application and learn what you need to know as you go.
Since the libraries provided by ZF1 and ZF2 are able to be used standalone, it would be possible to use some ZF2 classes in ZF1 as long as those classes aren't too tightly coupled to other classes in ZF2. For example, you can use Zend\Crypt from ZF2 standalone quite easily, but trying to use Zend\Form might be a different story since its tied to views, validators, filters and other classes.
As for learning ZF2, like you said there aren't many books around yet since its so new, but there are a lot of resources available for learning it aside from the reference guide.
I'd recommend looking at Getting Started with ZF2, the ZF2 Skeleton App, as well as the Zend Webinars where you can already find some great ZF2 tutorials including a presentation called Getting Started with ZF2 presented by The Zend Framework project lead Matthew Weier O'Phinney. There's also an upcoming webinar about MVC that's worth registering for (its free).
Hope that answers your question!
I want to start developing in an MVC framework, specifically CakePHP.
I see they have released 2.0.0-RC2 and was wondering if it is a waste of time to start an app in 1.3 when 2.0 is right around the corner. Should I start learning and developing in 2.0-RC2 rather as I'm guessing most of what I will learn in 1.3 now might become redundant soon?
Thank you.
I would advise against starting on a Release Candidate when you are new to the platform or programming pattern - mostly because you won't know the difference between broken/missing functionality and your lack of knowledge.
Start with the stable build, then move to the new hotness once it has an official release.
For now, you can start learning CakePHP 1.3. There is official documentation from where you can start and also you have a lot of examples on internet. When CakePHP 2.0 come stable you will be ready to work with it.
Well .. first of all , i would recommend against use of php frameworks before you have learned enough to understand how they work.
But especially large distance should be kept from Cake and other Ruby on Rails clones in PHP. They all are filled with bad practices, and it is not MVC pattern which they are implementing.
I would start with CakePHP 2.0.0-RC2 as CakePHP 2.0 is the future of CakePHP. CakePHP 1.3.x is outdated in my opinion as it is still PHP4-based...
For documentation, see the cookbook for CakePHP 2.0: http://book.cakephp.org/2.0/en/ . And if there are questions, ask in the IRC channel, or post in the Google group (or here), and/or read the source code.
I'm embarking on a very big exercise to build a CMS in php. It's actually my attempt to learn PHP in a fun (and hardcore) way coming from a Java background. Java is all object oriented so oop is in my blood, but I'm finding that OOP hasn't made it yet to PHP. Most PHP is still being written today the old way without the new concepts.
I'm trying to find an example PHP CMS that's written as object oriented. I hear Xoops is. Any others you know of? or any OOP libraries in general that you know of that could help me in a CMS project.
I would suggest symfony framework as it is well documented and functional framework that helped building many web applications.
http://www.symfony-project.org/
PHP5 is pretty OOP. Look for CMSes and frameworks that only work on PHP5. For example, Kohana
Concrete5 is a pretty complex OOP based CMS. Might be a harsh start but I've learned a lot by working with it.
again, +1 for symfony, but this is a large project and getting to know symfony will consume most of your time, yet if you want to dive in, its documentation is really great.
since you are trying to build your own CMS, get started with easy to grasp frameworks and build upon them. Don't waste your time on everything that has been already done. I recommend you Codeigniter MVC Framework http://codeigniter.com and for CMS, PyroCMS http://pyrocms.com which is built upon codeigniter is cool. Codeigniter is really easy to get along, and documentation is very neat and clean.
Further, if you like to start with a simple php framework, here's what Tyrehall has done, http://github.com/tylerhall/simple-php-framework . This project can act as a base for your CMS
No one seems to have mentioned Kohana the PHP 5 only framework.
Kohana has a pretty active and very helpful community to back it up (#kohana on freenode in particular).
edit: Upon closer inspection I see someone has already mentioned Kohana.
what you will notice is that what is more important to most cms (and framework) developers is MVC pattern implementation. Most MVC implementations in php do in fact use oop practices (some stricter than others)
+1 for symfony, and another I'd like to recommend is Kohana (built on CodeIgniter)
Also have a look at their forums, as both already have a cms or 10 built using these frameworks.
Using these frameworks brings you about 60% there, as a lot of the rudimentary tasks are taken care of.
edit
also remebered this one: fatfree framework it's quite lightweight: http://fatfree.sourceforge.net/
Have a look at Phundament 3.
Phundament 3 is an application foundation built upon a set if independent Yii modules and extensions such as user, rights, yiiext, gtc, ckeditor, jquery-file-upload, p3widgets and p3media.
The combination of p3widgets and p3media provides basic content management system (CMS) features, like dynamic widget creation and file management.
Combined in ckeditor, p3media acts as a ckfinder plugin which gives you the full power of HTML and media files for content creation via p3widgets.
It comes with a very minimalistic setup which integrates perfectly into an Yii web application skeletion and installs with one single command.
as some folks suggested here, you should start with Codeigniter because it's really easy to dive in. Its documentation is very well structured and easy to read. But I think Codeigniter seems to be very old now.
What I really recommend to you is Laravel. There's another Framework you should look into, that's FuelPHP. But for me, Laravel has absolutely changed to way I'm writing my PHP code. It is the best framework I've ever seen in my life. It's so elegant that you will instantly fall in love with.
If Laravel suits you, I recommend you to follow this online course by Jeffrey Way # Tutsplus.com. You will love it!
Good luck :)
Have you seen CakePHP?
http://cakephp.org/
Its a MVC framework for PHP. Its pretty robust and can be used in a fully object oriented manner.
I am going to be builiding a site like ebay - with all the features of ebay. Please note my payment method is limited to paypal.
What would be the best PHP framework
to use to build this quickly,
efficiently and with the smallest
learning curve?
I have narrowed down to CodeIgniter as the major contender for this project - but having looked through the docs I couldn't find a library or class that I can use with paypal - is the same for all frameworks- surley not?
Zend framework - I considered this but although its documentation is very good, hardly any video tutorials - other frameworks seem to have lots of these especially with normal developers creating screencasts - where is the Zend community!
CakePHP - Having read the stackoverflow threads, I gathered this is a slow framework, giving developers little control as it seems to be a CMS backbone rather than a framework - agree? It was also said cakePHP and Zend have a steeper learning curve than CodeIgnitor.
I have start my short-listing again and I would appreciate any help with this.
Thanks all
You'll very likely find CodeIgniter to have the lowest learning curve. Regardless of the framework you choose, you'll have to pick up where the framework leaves off, and that is going to mean a significant amount of work on your part (if you truly want to implement all the features of ebay). There seems to be a PayPal lib in the CodeIgniter Wiki. Looks like it would be a great place to start.
Cake is not a CMS backbone, it's a framework like the others. It's just more opinionated, i.e. geared towards CRUD operations (create, read, update, delete, what you typically do in a CMS). If your application is focused on CRUD, Cake will give your development a kickstart; you can get a complete admin interface for your database tables up in, literally, minutes.
Thanks to that it may be a little slower, especially compared to "loose" frameworks like Zend, but in the end it won't matter much. You can do anything with any of these frameworks and any of these frameworks can be optimized to run as fast as possible. Try to get a simple prototype app up and running in all of them and choose the one that seems most comfortable to you.
I'd really recommend Codeigniter for speed. I've made a few things with it and it was great.
If you need some help learning Codeigniter Nettuts has been doing some really good screencasts
In the end, it won't matter. Your code for database and presentation will trump any 'problems' your framework has. The frameworks you listed are awefully similar. You'll be more or less stuck with which you pick, so pick one and learn all you can.
If you're going with codeigniter (note, maybe take a look at Kohana too, the php5 fork of CI), you can always use libs out of Zend if theres something that fits your needs.
I have to develop a CMS for a friend of mine, nothing commercial...
I'd like to take this opportunity to learn a php framework, to see if it would be suitable for future (and more complex) developments, or at least to steal some nice ideas...
SO I'd like to easily implement a content management system and at the same time have a look at a modern php framework (one of the rails inspired ones, or at least implementing MVC, which I think covers them all...)
I've heard of http://www.digitaluscms.com/, built with zend framework, and http://radiantcms.org/, but that is ruby on rails (I'd prefer php for ease of deployment and hosting...)
If you want a CMS built with a real Framework, I've heard (just today, actually) of Diem, which is built upon symfony (and uses some components of Zend Framework).
Maybe Sympal, also based on symfony, could interest you too.
If you want to learn, and work with symfony, one of those two might be the perfect match for you.
Still, as those two are not as popular as Drupal (or Joomla, or whatever other well-known CMS you can think about), I would probably not use them for any "real" site -- at least, not before studying them for a while.
For a framework, I would recommend Code Igniter wholeheartedly. It's MVC based, super-lightweight and it reminds you of Rails a lot. You can check out a screencast of a hello world application here: http://codeigniter.com/tutorials/
In regards to a CMS that could be http://expressionengine.com/, it's a popular CMS built on top of Code Igniter. I don't really like it as a CMS, but you were asking about a good platform to build on, so that would probably be a great bet.
The most common PHP frameworks are Symfony and CakePHP - I don't know CakePHP so much, but personally Symfony is too big and bloated for my taste, although very powerful.
The most common used CMSes are of course: WordPress, Joomla and Drupal. There are endless other systems available, but most of them don't really have a great platform to build on.
Good luck!
Others have mentioned various pre-built CMS applications. If you want to build your own in an existing PHP framework, check out CakePHP or symfony.
http://cakephp.org/
http://www.symfony-project.org/
But really, you should just learn Django, because it's so awesome.
A free CMS built on CodeIgniter is PyroCMS. The demo is currently down but installer is so freaking simply you could have it running in a few minutes.
Modular, multi-lang, UTF-8 throughought and pretty easy to skin.
Unlike other CMS' I have seen built on frameworks, PyroCMS doesn't touch the core framework at all, which means future upgrades of CodeIgniter will be easy.
you should take a look at silverstripe - besides the fact hat you really should read about what a framework nowadays can deliver, so some basic knowledge about Rails and Django is absolutely essential to put yourself in a position of beeing able to decide yourself what is good for you and what is not.
One most important thing ignored is RESTful-ness - many CMS or Frameworks still not support it or at least do it very complicated. Yuo need to read about REST to understand, why you want a framework or / and CMS that suppirts REST.
Talking about Joomla here is, of course, a joke.
Use Joomla. It probably won't teach you much but you will get a very nice system. Professional level even. Joomla has a MVC framework but most of what you do will be configuration. But really who wants to do a cms any more anyway? So many of them out there.
All kidding aside, Joomla is written in php, scales nicely and has a nice admin interface for the client/end user. It is also used all over the place.
If you really want to learn a usable framework try to write the cms in zend or codeigniter. those are beautiful frameworks.
If you really want to experiment a popular PHP framework while developing a simple CMS, look for a real CMF.
The only one I know at this time is Symfony2 CMF. It's a set of Symfony bundles providing popular CMS features like the Node concept, blocks, menus, dynamic routing (for routing to newly created nodes), etc.
Using a CMF instead of a CMS prevents you to configure your application only using a big administrative back-end and make you to understand the framework behaviors. As a consequence, you will be able to use the framework (Symfony in my example) even for a non CMS related project !
Using a CMS like Wordpress or Drupal (which is built on top of Symfony) will hide you the framework.
P.S: Actually, Symfony CMF is only compatible with Symfony 2. But beta versions of the bundles are already available for Symfony 3. Anyway, there is a LTS version of Symfony 2 whose bug fixes support ends in 2018 and security support in 2019 !