Php frameworks 2010 - php

i am looking for a new php(5) framework it must be lightweight(x<500kb), oop, have orm, active record built in, simple to learn, fast to use, active community and dev.
I need it for small, personal app development.
My php skills are quite low and i have .net background. I have previously used LightVc+cough and codeIgnitor php frameworks.
There are so-many frameworks there and it is quite hard to find the best.
I have checked the other threads here but they are to old to consider sustainable.
Thanks for your time.

I think you dig out the http://www.phpframeworks.com/. It has details about each and every accepted framework.

Code Igniter is very popular and also supports PHP4: http://codeigniter.com/

Unlike .NET and miscellaneous other programming languages, you really don't need a framework to write a PHP application. In fact, I'd advise against it. Learn the language, not a framework.

For someone with low PHP skills I'd say codeigniter although it doesn't have ORM built-in (it has a sort of lightweight active record class), but there are tutorials on how to use Doctrine (a good PHP ORM solution) with it.
However if you want a PHP5 only framework (as in written to take full advantage of PHP5) then I'd suggest looking at Kohana (a PHP5 only fork of codeigniter), Yii or Zend framework.

Related

Rearchitecting procedural PHP

I need to re-architect a PHP application that is entirely procedural. Pretty much every WTF-ism you can ever think of is in this which means that it's likely to be more of a rewrite than anything else.
I want to stagger this and would like to do it with MVC.
Can anyone recommend a PHP framework that is going to help me?
The current database (MySQL) is OK - but the code isn't.
Some updates:
* I consider myself to be very skilled in web programming but I do very little in PHP
* A lot of experience in MVC
* No issues with Design Patterns
* The project is an ecommerce platform
* I am coming from a mainly .NET background
You should take a look at CodeIgniter. It's fast, stable and easy to learn.
I use Codeigniter pretty much all time. It's quite easy to use and it has a light footstep (it loads only classes you use).
CakePHP 2.0 beta has pretty much everything you'd want in a framework. It's fast and it's really good once you've picked it up.
If you have previous experience in Ruby on Rails => Yii
Else if you have previous experience in Django/Spring => Symfony2
Else if you have no experience in any framework & fast way learnig => CodeIgniter
CodeIgniter is probably the simplest answer. It's easy to learn and well documented. However, I prefer Zend Framework because of the templating system, the extensive library, and the new ZF tool. However I found the learning curve on ZF to be a tad steep. I recommend getting a CURRENT book to learn ZF. "Easy PHP Web Sites with Zend Framework" is very good.
http://www.wjgilmore.com/books/read/easy_php_websites_with_the_zend_framework
if you want other decision it's symfony(herder) or Yii(very easy to learn).
Simple project are creating by using(CI), if you project is harder use symphony or Yii.
If you want became ninja FrameworkDev learn Zend

PHP framework similar to Python Pylons

What is most similar PHP framework to Pylons?
I mean mostly ideology of programming.
Being primarily a Python developer, and having used Pylons, TurboGears, and Django, I would whole heartedly, 100% recommend Kohana 3.x. To be completely honest I am not a huge fan of PHP, even though it is the language of choice at my current employer. Given the choice I would use Python and Pylons. But, using Kohana is just about the best framework I could hope for from PHP. I hope I am not biases, considering I work with two developers on the Kohana development team. ;-)
PHP and Python are very different. As such, there is no real equivalent of Pylons in PHP. But, I would also say there is no real equivalent of Kohana in Python
Methyl, Great php framework is Codeigniter, fully documented. Also there is Kohana, if you want php5 features.
Regarding your question, Since benchmarking PHP vs Pylons they are comparing smarty with pylons, it might be similar.
I would go for Codeigniter or Kohana. Behance.net is one of the sites build on Codeigniter.
I used Pylons a few years ago. I don't think that there is any web framework in PHP very similar to it.
However, I find that Symfony encourages several web development patterns used in Pylons. For example, in ORM, templating, testing, configuration files, MVC, etc. Some other MVC frameworks that can be compared to Pylons are CakePHP (which is inspired in Ruby on Rails) and the Zend Framework (one of the largest, with lots of components to be extended).

Object oriented php CMS or framework

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.

Which PHP frameworks are used by corporations?

There are several questions about PHP frameworks, but I'm curious as to which one(s) are used in the commercial world when developing web applications with PHP. At my first web-based job, they didn't have a framework for the PHP codebase. Is this common when dealing with PHP? If not, what frameworks to companies producing a product (either a site that provides a service of some kind or a web-based product that can be purchased) using PHP tend to use?
Is this common when dealing with PHP?
In my experience, unfortunately it is. This is of course a gross generalization, but people who tend to learn PHP as their first programming language don't learn the essentials of maintainable software development and often don't really know how to write good code. I think this is a failing of the PHP community, where historically most learning resources don't emphasize good practices (probably because the authors didn't know any better!). You can of course write good code with PHP, as long as you understand underlying programming principles.
Companies will often start out with a hap-hazzard code base of PHP scripts that get re-used and gradually extended from project to project (often without source control!). The companies that know what they're doing and take it seriously will evolve this into some kind of in-house framework, or I have often found they'll move onto something without the historical crapness of PHP, like Django or Ruby on Rails.
If you're just starting out, there are several decent MVC frameworks that will form a good base for all your developers to learn and use. In no particular order:
CakePHP
CodeIgniter
Zend Framework
There are of course others as well.
That said, as always it depends on the project. Sometimes a framework either won't make sense or will be overkill, othertimes you're better off using a pre-built product (like a CMS) and building extensions to it.
Most frameworks are strongly focused on the presentation layer. Now, "corporate" is of course a rather vague term, but I assume you mean for more typical IT tasks, such as accounting, CRM etc. For these tasks, the presentation layer is a much smaller part of the entire application. Not only does this make said frameworks less important - it actually disqualifies them somewhat, since you don't want the restrictions on your model layer, that they impose.
I think it gets more and more common to use a framework. A few years back most programmers developed their own framework. But the cost to train a new employee for such a framework gets higher and higher. Therefore many companies are moving now to well known frameworks.
I guess that Zend is currently the most used Framework in the corporate environment. One reason is that it does not give you any restrictions on the model layer.
I can not predict the future but I guess that Flow3 will be used in the future too. It is the new Framework behind Typo3. And many Typo3 developers (web designers) who need to write web applications will probably use Flow3 then.
In last two three places I've worked the company had their own (private, built in-house) framework.
According to a PHP Framework Popularity at Work survey by Sitepoint in 2015 (7554 survey participants) the five most used frameworks are
Laravel (22%)
Symfony2 (14%)
Nette (9%)
CodeIgniter (8%)
Yii 2 (7%)
Furthermore survey results indicate, that
5% use a company internal framework,
3% use no framework at all,
3% use a CMS for everything,
1% use a simple MVC framework.
There seem to be continent specific framework preferences: In America and Asia, Laravel seems to be the framework of choice (except for Russia: Yii 2), whereas in Europe you'll find more Symfony2.
(Be aware that this is just referenced from one source -- see links above.)
The only enterprise-level framework I can think is Zend Framework. CakePHP, Code Igniter and others are only focused on RAD development.
Having experience with CI , yiiframework and calephp (not much, really) my opinion is that CI is not flexible as ohter 2, so I do not recommend it on larger-scale projects.
Anyone who disagree, just can try a demo project with cakephp and Yii and he will see how things are easier with them as crud,form validation etc.
Of course all have their disadvantages :)
recently i talked with a CTO of a company, offering a e-lecture solution and we talked about PHP for a while ... we both agreed, it is not the best language for rock solid solutions, but he pointed out the symfony framework, they used just before moving to java ...
also, flow3 mentioned by raffael is quite powerful ... most interesting thing to me is, it brings AOP into PHP ...
greetz
back2dos
You may want to look at www.flow3.org, it's a pretty comprehensive approach to PHP application frameworking and is rapidly approaching its first mainstream Beta release.
I'm not sure if PHP has gone into the enterprise market in the US yet but when i worked in a corporate office the language what they use is Microsoft .NET.
PHP is yet to enter the corporate world IMO. It is popular with the hacker world and maybe micro and small software/web companies.

php CMS system built with a framework - php framework AND php CMS

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 !

Categories