Qcodo vs. CakePHP vs. Zend [closed] - php

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have some exposure to CakePHP and think it is a great framework.
Then, I run into this thing called Qcodo. It is another PHP Framework.
I've been hearing Zend alot. They all seem very neat, but I'm wondering what are differences between all these frameworks.
Before I waste too much time learning another framework,
does anyone know pros and cons of each framework?
They all seemed to have the general goal: making web application development in PHP easy, modular, and scalable.
EDIT
Found this interesting comparison result between CakePHP and Zend

I have never heard of Qcodo.
CakePHP is a full featured framework with a lot of automagic, but unfortunately it is one of the slowest frameworks out there. It also doesn't have official forums, and there really isn't that busy of a community. It tries to be a Ruby on Rails clone, but that just doesn't work so well with PHP.
Zend is impressive. It has a strong community and a corporate backing. It is very featured, but it is also very bloated (see that benchmark) so it has moderate performance. From what I hear though, you are able to use the components separately without using the whole framework, and can even use them with other frameworks!
I use CodeIgniter at work and I love it. It is by far the most newbie friendly framework, and with your CakePHP experience it should be a breeze. It has very good documentation that is thorough, clear, and well written. There are a few features that it doesn't have (such as an ORM) that other frameworks have, but CI has one of the most active framework communities I've seen. Since it's easy to write libraries for it, you can find a library to do pretty much anything you want to - ORMs, authentication, etc. To add to this, if you want an ORM for CI, I recommend DataMapper.
You may also want to check out Kohana. It's a spin off of CodeIgniter. It's strictly PHP5 and has an ORM and some more features. Haven't used it myself though, but I have heard good things.

I recommend reading the features of each and determining what you need and looking at code samples of the features you'll be using most.
Some frameworks may seem intuitive to you, but not to others. Selecting a PHP framework is a very personal choice IMO.
I've been using CodeIgniter myself after using CakePHP for some time. The main reason for switching was due to performance, but CakePHP has come a long way in the last few years so that's probably not a valid reason anymore.
[Edit: Apparently, it still has performance shortcomings, see post by ryeguy and comments.]
I've never found Zend to be intuitive and have never looked into Qcodo.
Wikipedia has a list of web app frameworks by language, you might find information to help you decide there as well.

I use both QCodo & Zend Framework
QCodo is a MVC framework of code generator, a lot of codes are ganerated from your database design, and produce ready to use Search & Edit Form for each of your database table. It also handle the database table relationship to pre-generate a set of methods for one-to-many / many-to-many relationship between tables.
Due to these codes were generated from your database design, all the codes were optimsed for each project. In short, It is a framework of database oriented
...................................................
Zend Framework is designed, as far as I know from the founder of this project), to decouple all the models, and indeed they are deploying a lot of ready to use models for different kind of project, from the Zend_ACL (access control list for authenication), to Zend _Search _Lucene, Zend _Service _Twitter, Zend _Service _Flickr, etc). And I think there will be for the future.

My vote for Qcodo! A while ago I did a research to what suited me best, and the result is qcodo, nowadays I can't do a project without considering to use qcodo, or at least his database handling part which is absolutely fantastic.

I think Simfony is the best PHP framework although I have not use it. I used mainly Qcodo/Qcubed but I am moving to Rails, this is why I find Simfony not bad. I tried Code Igniter and is not, it is simple to use, light (I suppose), but it does not have any scaffolding, but this might be changed now. As another guy said you can use an external ORM because CI does not have one by default. Zend Framework has a very modular architecture and has many libraries. I used Zend_ACL but permission inheritance was a pain so I did my own implentation, Zend_Lucene queries did not found the data I needed... ZF is a very low level framework and it needs an ORM too. I had a look at CakePHP but I found it its database interface not at the level of Propel, Qcodo and Doctrine, but I think the you can use your own library.
I usually want in a framework:
ORM and object wrapping the real row in the database ($objUser->Name = 'Jack')
MVC - most of the are MVC
Code generators (Qcodo is fantastic to code generate from the database)
Front controller, routing and url friendly (Qcodo does not have one)
Clean template (Qcodo has $objLabel->Render(); not real tags)
helper methods like link_to, image_tag etc (Simphony and Ruby on Rails)
Database migration to keep track of DB changes
integrated testing framework to test the real application, not few isolated functions (Rails do that and may Simfony)
The community and popularity of the framework.
Most of the advanced PHP developers I met use Simfony, but this is from my personal experience only.
Concluding, I would use Simfony bit I strongly suggest to try Rails using Ruby or JRuby.

Determining the best framework should be a project-by-project decision. If you have a big database using the innoDB engine and lots-and-lots of relationships between tables, check out QCubed (Qcodo). I've seen no framework that handles complex ORM relationships - even reverse relationships with ease! It's also quite fast at handling complex queries (e.g. reverse relationship queries) - although performance in any framework depends largely on the coder's ability to write efficiently.
If you're building a CMS, then you'll want Zend or Symfony for the MVC capabilities. QCubed/codo supposedly is MVC based, but it doesn't seem as clearly laid out as Zend. QCodo also DEPENDS on never changing the structure of your database - One can manage, but it's a real pain to add new fields to a DB table once a site has been launched because it auto-gens custom classes for each table.

I use CodeIgniter mainly because it had really good documentation and has a reputation of being easy to use. Also, Rasmus said it was his favorite, which is admittedly a lame reason, but I've had no complaints.

Don't ignore Symfony, it rocks. I'd say its biggest strengths are a consistent "go with the best practice" approach at every level, a vibrant community and excellent documentation.

I;m using QCubed, the successor to QCodo. Its simply the best you can get out of an Open Source PHP framework. Is quite fast if you know how to make it work. The only downside is that the documentation is lacking. However, the examples site is great. Start using it and I bet you'll have a lot of peace! :)

Related

Benefits of PHP frameworks [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I have heard a lot about PHP frameworks like ZEND, CodeIgniter,CakePhp etc and i am also well aware of some advantages of using it i.e. increased productivity,reduced errors etc but doesn't php framework make coding a complex process ? Doesn't coding without framework provides more flexibility ? Some people say you don't need any additional framework, as PHP is itself a framework.
So why there is so much usage of PHP framework ? Are frameworks really necessary in PHP?
This is a broad question and I think an important one. I am in the camp of NOT using frameworks unless absolutely necessary. The question is, when is it necessary?
First off, the thing that I think gave me this strange, allergic reaction to frameworks is that inexperienced coders want to use them for EVERYTHING, even tiny sites.... and it's bizarre. Maybe its through some need to make their resumes bigger by saying they've used codeigniter- but in my experience that doesn't make a damn bit of a difference. Hiring managers want SKILLSETS, not somebody that can read API documentation- which anyone can do. If you have working knowledge about program architecture and OOP principles, you're hired. If you don't, but you're a codeigniter ninja, .... eeehhhh.... ok?
Frameworks have their uses but I think when your mom wants to make a website for her bake sale then you can just slap a page together using a much lighter weight system. I don't sit in the camp of belief that you should include code "in case you need it". Over time, I have developed my own framework that is absolutely tiny, which is why every single web site or application I have ever built has ranked in the top 2% (though usually top 1%) of page load times in the world by google.
This is not to say they are bad- just don't go running off to use a framework because you want to put it on your resume- you're actually shooting yourself in the foot in the long run. Why? Because you won't spend time using the language itself, you'll spend time using the language of the framework. Take jQuery for instance- I avoided it for YEARS because it wasn't JAVASCRIPT. People scoffed at it- but now, when I go to a technical interview and I get asked (inevitably): "What is your experience level with jQuery", and I say "not much", and they for a second look surprised, but then I follow it up with "but I just wrote dependency injection via inversion of control in native JS yesterday"- I get hired ON THE SPOT.
Frameworks are great. Just ask yourself if you really need them. Particularly the question is: are the benefits of coding it yourself outweighed by the time benefits (don't forget about the learning curve of the platform) of the framework or not? On the one hand (non-framework approach), you learn a lot, and perhaps you take more time because you're working out your own kinks- but you learned a ton about the language itself (PHP in this case). On the other hand, you learned a new framework and maybe got a site up quicker that most likely is slower.
Wordpress is a great example of an overused framework in my opinion. Back in my freelancing days I used to take on gigs that needed me to "revamp a wordpress site"- only to find a site that could barely load because somebody plugged in every plugin they could find and made what was a stupid simple site into a tank with ungreased treads. It's OVERKILL in that case.
With my experience in CTO and Tech Lead positions, when somebody puts Wordpress and jQuery as primary points on their resume, to me that says "I don't know a thing about OOP and how to use these languages if required" which, in the real world (and I work on huge projects like windows 8 and other projects of that magnitude) - is OFTEN the case. Microsoft expressly forbids the usage of jQuery in their metro app system for MS released products because they want to show off their system dependency free.
Other companies, however, DO use frameworks. I just got off a project using Foundation and it was AWESOME- but that's because the architect of the project fully researched the framework and we used it RIGHT. The result was a fully responsive pristine code base that went from full monitor glory down to triscuit-sized smartphone screen awesomeness.
IN SHORT:
Frameworks, when used right, can be awesome- particularly for large projects (and I'm talking enterprise large). For smaller projects they aren't necessarily bad- but when they are used without thinking about their implementations, its like using a hatchet for a scalpel.
Just my 2 cents.
Doesn't php framework make coding a complex process?
It depends what you want to do. If all you're doing is creating a basic contact form for a site that is all static HTML, then yes using a framework would make it a more complex process. On the other hand if you're building a large scale app then using a framework would not necessarily make it more complex.
Doesn't coding without framework provides more flexibility ?
This depends on the framework itself, they aren't all the same. Some frameworks such as Slim or Codeigniter are very trimmed down and don't get in the way too much and so don't really impact on flexibility, some are more complex such as Symfony2/Zend.
Some people say you don't need any additional framework, as PHP is itself a framework.
They are right, you technically don't need a framework, you can do anything with plain PHP that you can do with a framework. Frameworks have really evolved from developers personal archives of functions and helper code. PHP can be relatively low level in that it doesn't have a ready made function to do everything you need. Before frameworks, developers tended to have their own set of helper code that would be reused on many projects. Frameworks are still essentially that, except they are collaborative projects that hundreds or thousands of developers contribute to.
One other benefit of frameworks is if you have several developers, and one has developed an application and you want another developer to contribute to it or take over it, then if the developer is familiar with the framework that was used he can get up to speed on the app much quicker than if it was written in plain PHP. Without the framework, the new developer would have to decipher the previous developers system before they even start to look at adding any new functionality.
Are they necessary in PHP?
No they are not, sure it is possible to code anything without frameworks. But it's more work, this is like: Why am I using C when I can do all the same by writing assembler?
So why there is so much usage of PHP framework?
The benefits of using frameworks is, that you can use many predefined things. For example, in most PHP frameworks you can use MVC Pattern. Sure you could also build your own MVC structure with flat PHP, but that is like re-inventing the wheel everytime again. Only thing is, if you have very specific requirements, you may can/should not use a framework, but in most cases the requirements are not that specific.
The point with MVC is only one of a lot benefits. Depending on the framework you want to use, there are specific benefits.
So, it is just like you said. By using a framework you can save time, because you don't have to re-invent everything that already exists.
You can see a framwork as a tool, that helps you to develop better and faster.
Edit: Like Ayesh K mentioned in his comment, it is also a benefits, that a framework is developed by many experts, so it normally is better code, following the principle: 'Four eyes see more than two'.

Choose Zend OR Symfony? And why? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I know this has been done many times before (some posts are really old so would be nice to get feedback based on current state of play), but I would like people's advice on which framework to use for a new application that we are about to start developing.Though we have set-up everything according to ZEND but now client's investor need to know why we choose Zend.
It was selected on the bases, out of 5 developers 2 are familiar with Zend. Now client want a detailed explanation why we didn't choose Symfony over Zend. Our reason is not enough to support our selection ;) so help me to choose which framework has what advantages over other so that we can present him solid reasons(for zend), and if symfony has more +ves then why we choose it(symfony) NOW. We can change our framework now.
I guess the correct answer is 'depends on what you're application and you're own requirements/preferences' so here is a brief description of the application and some of our own requirements:
The Application:
A financial transaction system extracting live transactions data done over thousands/millions of POS world-wide.
Few important things for project:
Database is already provided to us & it is an ORACLE database.
Oracle database has more than 86 tables. Some of the tables have more than 60000 rows of data at present & some of them have 79 columns too.
Our Requirements:
good support for jQuery
allow easy output of different types of output (HTML, XML, JSON)
easy UI development using in-bulit functions/methods.
ACL
fairly fast development (as always, schedule is tight)
nice clean business logic layer with freedom to architect the solution as we like.
a framework that helps you to get stuff done quickly but doesn't restrict you too much.
a good platform for doing other projects.
Any feedback from people who have used these frameworks (specially those who have used both) would be much appreciated.
Zend is not compulsion, but if changed to symfony, we need support for that. So support your answers with reasons, links.
Thank you.
Why Zend
First of all, I had my good experience over working with Zend Framework. It is most stable framework over all the php RAD Frameworks. Zend provides you jQuery builtin Class as Helper that will make it easy for you to make jQuery usage most easy. Even though, it provides the best usage with Dojo too. ZendX_jQuery class makes it easy for you to make use jQuery whenever you want. And, as you know jQuery allows ajax calls by $.ajax*() so it would be perfect choice for going through client side scripting.
However, I'll focus over the zend too because you can go through writing your API for most of the common transactions all over the site. As, ZEND provides Using AjaxContext with Zend_Rest_Controller and Zend_Rest_Route classes for this purpose that holds the Ajax context.
Zend has the best cache system. Even though, it provides the perfect search indexing using lucene. It is easy and stable to make your own re-usable component in your class library. CLI makes your structure delightful so no need to make everything manually.
No problem of managing templates. Action loads its view by prefix. View doesn't bounds you to have any templating engine. However, you can go through that too.
Layouts capability makes it extremely perfect to make generic and dynamic layouts that would be based over different of the controllers based upon ACL. And by ACL, i also got that Zend_Acl provides the complete solution over implementing out the ACL services. ACL is ofcourse the mandatory thing in your application.
Zend also provides you ability of having the modular structure of your site. Just plug and play your code snippets.
Why Symfony
I never gone too much deep over the symfony. However, I experienced it before for one of my project. Overall, as comparing, zend has decent folder structure then symfony. Symfony provides you ability to your code snippets but those snippets are known as bundle here. It has some templating styles that you need to implement in your views. It didn't found any built-in core library for implementing jQuery dynamically. May be, I would be wrong here but I don't know about it yet!.
I also got the same situation when I need to compare Zend & Symfony. But, after looking over all the aspects, I decided to go through the Zend.

Should I begin learning PHP Framework? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I have known PHP basics, functional programming for a long time before. But this year, in my 2nd semester I have learned Object-Oriented Programming with Java. So I want to apply my knowledge of OOP to PHP. But I find it very difficult to think of any decent utilization. It's not like in Java everything is an object. I see it easier to connect to database an old way, to write some simple functions for logging or registration, etc.
All those examples http://php.net/manual/en/language.oop5.php just gives me knowledge about syntax, not methodology of using it.
So I began to think. Maybe it's because I wanted to apply OOP without any Framework, and it's no use without it? If so - any Framework recommendations that are easy to learn?
OOP is a methodology used to organise your code into meaningful, reusable entities and it doesn't alone answer to the question of "how to best organize your code to create web applications".
Most of the web frameworks use Model-View-Controller architecture (MVC) along with OOP. In order to understand how web frameworks work, I suggest you to familiarize yourself with MVC as well (for a starting point, see "Coding Horror: Understanding Model-View-Controller")
Also, regardless of any frameworks, it is crucial to understand some basic concepts when creating web applications. At the minimum, familiarize yourself with how sessions work (http://www.php.net/manual/en/book.session.php), as well as how you can access databases (PDO for generic database connectivity, MySQL for MySQL-specific binding, etc.).
As for what web framework to choose, the options are plenty. Therefore consider the following pointers as informative:
Yii Framework has a pretty clean OOP-based design (http://www.yiiframework.com/)
Another popular object-oriented PHP framework is CakePHP (http://cakephp.org/)
For a more light-weight framework with less overhead, consider CodeIgniter (http://codeigniter.com/)
The de facto web framework for PHP is Zend (http://framework.zend.com/). Its huge, comprehensive, well-supported, but not always the perfect companion when travelling light.
Also note that if you organize your code according to MVC, you may find yourself most comfortable when not using any frameworks at all
Also note that unlike in Java, in PHP object-oriented features have been slowly added during its versions 4 and 5. Therefore, many web frameworks designed for earlier versions of PHP may not provide you as cleanly object-oriented design as you might want. Therefore when choosing a framework, consider whether you opt-in for backward-compatibility (PHP4 support) or are you seeking for a clean, object-oriented design in the framework (mostly PHP5 required).
OOP has its usage outside of a framework, you cannot compare apples with oranges.
The most respectable frameworks out there are written in OOP. So try to use one such framework in order to see use cases of OOP, then learn from that framework (step through with a debugger and learn how the framework works from the inside).
I would recommend you two things, if you really want to become a pro:
Zend Framework - not easy to learn, but it will show you lost of things from the next point:
a book about design patterns - VERY VERY IMPORTANT
Regarding the databases: modern PHP code should use PDO.
The framework will only show you usages of design patterns and how to organize your code, so you'll develop a "common sense" for it.
After you've passed that point, you will be able to invent your own OOP-world, without a framework (if this really needs be, although a framework gives you the time to actually be innovative).
You don't need to learn any PHP framework to start applying OOP principles. You can check out this fine answer to see some application of OOP without any framework.
Learning a framework is definitely a good choice, because then you can use lots of ready-made component. There are a lots of PHP frameworks nowadays. You can check out CakePHP, Zend (component-based), YII, Symphony (Yahoo uses it), CodeIgniter etc.
Hope this helps.
First of all, you don't need a framework to utilize OO style of programming in PHP; in matter of fact PHP has many core classes that use object oriented approach. For example take a look at PDO or the SPL.
Anyways concerning frameworks, there are various OOP-based frameworks out there, most which follow the MVC pattern. Some popular frameworks you might want to look into:
Zend Framework
CodeIgniter
Symfony
CakePHP
Zend Framework is very extensive, but the learning curve can be quite steep, but it's definitely worth the effort. If you want a good introductory MVC framework, I can recommend CodeIgniter; it's very lightweight and easy-to-use. Unfortunately I have no first-hand experience of Symfony or CakePHP (or other MVC frameworks).
You should use framework. Your code will be more easily edited by other developers if you do so.
Code Igniter is quite easy and basic, but you can check out Zend, Yii, Symphony and so on.
I recommend you Codeigniter framework to start with

Which PHP framework should I use when creating this type of website/application? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
In the jungle of frameworks out there, I've come to the conclusion that I cannot simply decide on a framework without considering the type of application / site I want to create. I think I need a little help with determining this one.
This site is graphics heavy, with all of the content presented in a small <div> in the centre of the page, surrounded by graphics. The graphics around it should preferably be loaded only once.
The site will allow users to log on with their account and choose from a number of pre-made food recipes, or create their own. Then they can press a button to have the site generate a week or two of dishes.
The users will need their own control panel where they can customize stuff as wallpaper, dishes, labels etc. As well as browsing recipes, adding ingredients, and looking up which dishes they can create with the ingredients.
As mentioned, all of this data is supposed to be presented inside a square in the centre, so we need a system of jQuery panels. I was thinking of dynamically adding content to this square as needed. For example, emptying the content and adding new content to it when clicking links, etc.
We don't need any community per se; the possibility for discussion can be explored in a separate, external site.
I should mention I am more of a designer than a programmer. I get stuff pretty easily, but fear I don't have the capacity to create a framework like this from the ground up. I do know a bit of Visual Basic, but I'm not so good with C# syntax. I've never even touched PHP, but my partner has. He's also somewhat familiar with Java.
Basically, we need a framework that's easy to understand and get up and running.
I rolled my own framework based on http://kissmvc.com/. It allows you to basically do what you need in PHP but gives you an easy MVC framework to do it in. You don't have to learn the specific syntax to Zend, Cake, Code Ingiter or Kohana, all of which I played with before I found kissmvc. Based on a blog post by Rasmus, it was all the direction I needed and I love what I have now for reasons #animuson mentioned.
Rasmus' post: http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html
From what you write, I would say all "big, famous" frameworks will be able to do this fairly "easy"... So You should really define a few prototype tasks and check out a few of the frameworks. You should be able to solve this using, CakePHP, Symfony, CodeIgniter, Yii, Zend, or any other framework, so it is better to do some real testing.
You might look for a framework that has a tight integration to jquery, but this should not be a showstopper, since you should be able to implement this in almost any framework.
You might also consider footprint and execution time, and find a framework that performes well and is not too cpu heavy (read Yii or CodeIgniter for instance).
Good luck in the search
Ultimately if you want it to fit your needs you need to build your own framework, otherwise there will always be limitations. Keep in mind that there is no framework that you can simply install and tell it to do these things, you are going to need programming knowledge of how the framework works in its entirety and how to program your custom pages to work with those features. I found it easier to just build my own framework. That way I always knew exactly what everything did and if I needed something additional, I could easily add it in the correct spot without doing much thinking on it.
A framework is only the base materials and functions you need. If you're looking for something like a pre-built website such as PHP-Nuke or a forum system, you're looking for a content management system, not a framework. A framework generally comes with absolutely no pre-built pages. Might I add that some content management systems do come with their own framework and some use existing frameworks from elsewhere.
So, we basically need a framework that's easy to understand and get up and running.
well as far as the above statement is concerned you may want to have a look at cakePHP framework.
You will easily find help on cakephp framework on stackoverflow and cakephp google group. Response will be quite fast on both the sites.
You will need to go deeply through the documentation of every framework that you plan to use because with a functionality that you are planning to built would require you to study the framework quite well.
With cakephp you will be able to create CRUD (create, update, delete) operations quite easily with less effort, but for further functionalities you will have to study it's documentation and keep your cool while you learn it :-)
I have always found plain php to be all the framework I need.
PHP itself has all the features provided by the other frameworks
A superb templating engine, database access, parsing, and control logic.
The great thing is all these features implemented in a single unified component called "php".
The main problem is you need discipline to separate presentation, navigation, busines logic and database/persistence handling. You can have sql statements mixed in with your html, you can emit html directly from an sql statement in fact you have complete freedom to implement all the known anti-patterns and invent some of your own.
The "Java" and "Perl" frameworks generally provide things like request handling, template handling etc. which are missing from the basic language, but, these features are built into php. Most of what the "php" based frameworks do is force you into (a very sensible) MVC design pattern and save you a tiny bit of coding.

Commitment to Zend Framework - any arguments against? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I am refurbishing a big CMS that I have been working on for quite a number of years now. The product itself is great, but some components, the Database and translation classes for example, need urgent replacing - partly self-made as far back as 2002, grown into a bit of a chaos over time, and might have trouble surviving a security audit.
So, I've been looking closely at a number of frameworks (or, more exactly, component Libraries, as I do not intend to change the basic structure of the CMS) and ended up with liking Zend Framework the best. They offer a solid MVC model but don't force you into it, and they offer a lot of professional components that have obviously received a lot of attention (Did you know there are multiple plurals in Russian, and you can't translate them using a simple ($number == 0) or ($number > 1) switch? I didn't, but Zend_Translate can handle it. Just to illustrate the level of thorougness the library seems to have been built with.)
I am now literally at the point of no return, starting to replace key components of the system by the Zend-made ones. I'm not really having second thoughts - and I am surely not looking to incite a flame war - but before going onward, I would like to step back for a moment and look whether there is anything speaking against tying a big system closely to Zend Framework.
What I like about Zend:
As far as I can see, very high quality code
Extremely well documented, at least regarding introductions to how things work (Haven't had to use detailed API documentation yet)
Backed by a company that has an interest in seeing the framework prosper
Well received in the community, has a considerable user base
Employs coding standards I like
Comes with a full set of unit tests
Feels to me like the right choice to make - or at least, one of the right choices - in terms of modern, professional PHP development.
I have been thinking about encapsulating and abstracting ZF's functionality into own classes to be able to switch frameworks more easily, but have come to the conclusion that this would not be a good idea because:
it would be an unnecessary level of abstraction
it could cost performance
the big advantage of using a framework - the existence of a developer base that is familiar with its components - would partly be cancelled out
therefore, the commitment to ZF would be a deep one. Thus my question:
Is there anything substantial speaking against committing to the Zend Framework?
Do you have insider knowledge of plans of Zend Inc.'s to go evil in 2011, and make it a closed source library? Is Zend Inc. run by vampires run by evil vampires that want to take over the earth? (It was established in the comments that Zend is actually run by vampires.) Are there conceptual flaws in the code base you start to notice when you've transitioned all your projects to it? Is the appearance of quality code an illusion? Does the code look good, but run terribly slow on anything below my quad-core workstation?
Accepting answer
Thanks a lot everyone for your detailed feedback. I wish I could set up a bounty and distribute it evenly among all answerers.
Among many opinions favourable towards ZF, there was one very well founded one against. I took that very seriously and had a close look at alternatives, mainly Yii and Kohana. From that comparison and from reading some more opinions regarding ZF and competing products, I can see that Zend can be viewed as bloated in some fields compared to more minimalistic frameworks. (I can also see that this "bloat" is mostly with good reason to provide maximum flexibility. But the question whether you want maximum flexibility and deal with the ensuing complexity, or a simpler approach with clear guidelines, is a valid one.)
Anyway, I will go for Zend for the project at hand, because the main use I have for the framework there is as a component library. I do not want to adopt Zend's MVC model, I just need high-quality components for Internationalization, Session handling and so on. Because I am building a redistributable product, Zend's flexibility (e.g. the support for five different dictionary formats) is welcome to me. Also, ZF seems to be the only framework that allows the degree of freedom I want (No forced use of patters, file structures...) as far as I can see, no other framework offers that.
For future projects in which I want to make use of the actual MVC features, and totally submit to a framework's conventions on application building, naming, style, and procedures, though, I may not necessarily be going for Zend, but for a more minimalistic framework like Yii or Kohana.
Zend Framework is the best choice. Best framework API of them all, readable code, language conventions, good docs, comunity, support et all
My dislikes of it (subjective, mabe people are going to downvote me for it) are:
Zend_Form, has it's use, but in general is too obtrusive, I just want to structure my HTML not fight APIs and decorators.
Zend_Db_Table, powerful, but it needs a lot of work to accomplish your goals, and Rails taught me to be lazy. No, I don't want to write 3 classes for a model, one for the table, one for the rowset, one for the row, then bind them to each other and so on. I might need the table data gateway at some point, but for now I really want to interface this data with a quick active record.
no active record. With the late static binding in php 5.3 this might change ...
I tried really hard to use these two for a couple of months until I finally had it.
I overcame them by (ideas from Ruby on Rails)
use plain view helpers instead of Zend_Form as in:
echo $this->formText('email', 'you#example.com', array('size' => 32));
having my own Active Record like models ( http://www.phpactiverecord.org )
validate and filter on the model
for the really extreme corner cases, one can fall back to Zend_Form + Zend_Db_Table, although I never felt the need.
EDIT
There are some new kids worth checking out, like Laravel
The one thing ZF really wins over other frameworks is the router, controller and views, conventions, clean readable code, process.
Unless you're looking forward for a massive, giant project with 20+ developers, I'd - if I were you - would do anything including sacrificing an arm and/or a leg just to avoid Zend Framework.
The nice option you found out might look handy - to the point where you find other 1k+ setting that just looks like a waste of time and developer effort in the library. You'll soon find yourself in the middle of Customization Ocean, overwhelmed by settings, interfaces and abstract classes.
The documentation is not only detailed, but as a result very lengthy and complicated (similarly to the library itself). I want 3rd part classes to help me and not to get into my way.
The most important factor was the development speed for me, obviously. Without a bunch of colleges around you, Zend Framework should be seriously considered whether to be dropped.
There are too many people making wishes in the Zend issue tracker, too many people implementing code. To date, I've yet to see any serious vision behind those millions of lines.
My two cents really comes to down to one point: despite (or rather, because of?) it is backed by the PHP company, it is far too bloated for personal usage and small- and medium-sized projects.
My team is currently using Yii for a medium-sized project. It's not perfect either, but way more usable and developer-friendly compared to the big brother.
I don't have any big argument against ZF -- on the contrary ; of course, I have not used all the components yet (not sure anybody has), but I've never seen anything that looked "bad" when going through the sources.
When beginning a new project, I would generally go with Zend Framework myself, actually, if I'm the one who has to choose...
There's at least one argument I would like to add to your list :
Zend Framework can integrate with other components : you talked of using components of ZF in your application, but didn't talk about the opposite.
A great example is Doctrine (the default ORM of Symfony), which can be used with ZF quite easily -- and is much better than Zend_Db, in my opinion !
Besides that, I have to say that I agree with everyone of your points.
About the encapsulating ZF classes into your own classes : yes, you could do that (I sometimes do), but I wouldn't recommend doing it for everything : in most cases, it will probably not be necessary.
About the future :
Zend Framework is released under a BSD licence -- which means what exists cannot be closed-sourced.
Closing it would mean its end, anyway -- would be a stupid move, in the context of the PHP community
Work on ZF 2.0 is just starting (With PHP 5.3 as a requirement, btw)
Maybe, depending on your schedule for your application, it could be interesting ?
At least if you don't need to start developping before at least a couple of month...
We've been developing with ZF for almost a year now, and I really have no major qualms with it. Had a bit of a learning curve, but once I understood it, I realized how well put together this framework really is.
Compared to other frameworks, some people might point out the lack of a Model library as being a downside. I actually prefer not being told what to use, and integrating Doctrine with ZF is frictionless. If you're developing in PHP 5.3, and want an ORM, I would highly recommend Doctrine 2 (caveat: it's still in alpha testing).
The other great thing is being able to pick and choose what you want or don't want. I'm not a huge fan of Zend_Form, but I don't have to use it if I don't want to. Also, there's a very loosely structured plugin architecture that lets you really easily hook your own libraries into the framework.
So, I'm a pretty big fan of it.
One thing I am missing in the Zend Framework is a proper OR mapper. Zend_DB is ok but has some shortcomings, especially when dealing with huge databases (many tables) it gets very cumbersome. But there are a couple of OR mappers out there that can be integrated (e.g. zend-framework-orm or Doctrine as mentioned by Pascal MARTIN).
But yes, Zend is excellent, very powerful and I feel it is in some ways what PHP actually should be/should have been in terms of interface and functionality.
What I especially like apart from the obvious is the support for Dojo for rich client applications and the SOAP support.
I used ZF on a project as sole developer. Although the learning curve was quite steep, I didn't encounter too many of the problems described above. In general I found the framework very flexible, and the loose-coupling of the components made it easy to do my own thing when the ZF way of doing it didn't suit my needs.
But having recently started using python, I'd say use python ;)

Categories