PHP Zend Framework Generator - php

I am in the phase of learning Zend Framework for PHP development, I have been doing 'dirty' PHP programming for about 2 years now and I have learnt quite a bit from my mistakes.
I have been introduced to Ruby On Rails, it is a great framework and Ruby is quite an interesting language too, but not everyone wants their web sites to be in RoR, at least not all of my clients.
Hence as a result I do a lot of PHP. Having worked on RoR, I find Zend Framework to provide very similar functionality and environment and hence I am really excited about the same.
However I am interested to know if there are any 'generator' scripts that help you along the process to generate / automate common tasks such as project structure creation, model creation, controller creation, just like those in RoR?
If such a thing already exists, great, otherwise I will go ahead and build such scripts myself as I am very certain they will come in very handy, especially for me.

Zend Tool is your friend!

i have made several code snippets and file types in editor ( netbeans ) to help me with automation.
You could look into zend studio that has a built in integration for zend framework that work quite well, but its commercial and would mean switching IDE's wich is always a burdain

I am working on a code generator for Zend Framework that could be useful to you. It is based off of the Qcubed code generator. Check it out at http://clintberry.com/2010/08/zend-framework-code-generator-with-scaffolding/

This is the best tutorial I found. It explains how to start using Zend Framework step-by-step
Zend Framework Tutorial

Related

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.

Php frameworks 2010

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.

Well built php applications to learn from?

I was wondering if any of you would be able to recommend some of your favorite open source php applications in terms of code quality and proper programming technique.
Though I have been using frameworks for quite a while, I would love to see how professional applications go about this.
I'm particularly interested in
MVC
authentication
Thanks a million!
Edit: Perhaps I didn't explain too clearly. What I was looking for most are fully functional applications that have their own built-in custom frameworks. I want to see how a professional level app is built and structured when there's no consideration for it's own framework to be used by others.
That being said, it looks like zend is the way to go! Thanks for the suggestions. I will take a look!
I would recommend the Zend Framework, which supports MVC, Authentication, and that's just the tip of the iceberg.
Edit: Since I apparently misread, you can probably take a look at source code such as
http://www.manning.com/allen/ZFiA_Code.zip
( From the Manning Zend Framework in Action book )
Another book that provides full source code to a CMS is Pro Zend Techniques:
http://www.apress.com/book/downloadfile/4469
Here's a whole slew of search results for applications tagged with Zend on github:
http://github.com/search?q=zend&type=Repositories&x=0&y=0
WordPress may be a good app to the end user, but it would be bad to learn good PHP code from. I agree that the Zend Framework is an excellent place to start. Not only is there code very good, but they have excellent documentation and tutorials. I would start here: http://www.framework.zend.com/manual/en/
Zend Framework provides both MVC and authentication/access control. For auth and access look at Zend_Auth and Zend_Acl.
This is a good guide to getting started with MVC in Zend: http://www.framework.zend.com/docs/quickstart
Some applications that have been built around the Zend Framework include Magento (an ecommerce engine) and Digitalus (a CMS). Both are open source.
Take a look at the Zend Framework.
It is a great example of object oriented code, using MVC.
There's also a whole set of classes related to authentication, implemented in an easy to understand and extensible way: http://framework.zend.com/manual/en/zend.auth.html

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