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 7 years ago.
Improve this question
What is the best method of understanding how and why a framework was written the way it was?
Develop a feature for it, or fix a bug. If you use the framework for developing a real-world solution, you can make a list of shortcomings to address or features to add that would make your task easier.
Fixing a bug will really help you understand the code, because most of the time you are given a piece of example code that recreates it, which you can then trace down into the bowels of hell to find where things go wrong.
All it takes is persistence, really.
Take a very simple component and analyze the code. For example, look at some of the components of the Zend Framework (something utterly simple like Zend_Version or, to step up a bit but still keep it simple, Zend_Debug). Pick them apart and see what makes them tick. Then, try to write your own simple component.
After making many websites 'from scratch' I found myself reusing the same scripts over and over, and I found some things tremendously tedious because I never bothered to abstract them away before for re-usability. So, if you have any experience making websites, you should have a pretty good feel for what your framework should include. If not, I would probably start by thinking of an MVC file structure, get your framework to first work with views, then controllers, then models. Then make sure each of those is easily extendable because no matter how hard you try, there will always be things missing... and then just start slapping on utilities as you need them (form helpers, model helpers, etc.). In other words, come up with a project for which you would like to use the framework, and build the framework and website concurrently.
I know the world needs another like it needs a hole in the head, but writing your own framework is a great way of learning a language. I wrote a fairly complete one in PHP in under a fortnight and learned a hell of a lot about PHP and Web development in the process.
The only reason I haven't released it is because I was finally not happy with the way it managed session state, but that was a good learning experience too!
I think the way to begin framework design is to write down about 5 basic aims for it. For mine, these were:
aimed at producing simple Web apps with a dozen or so forms
aimed at people with a good knowledge of SQL
no procedural code PHP or otherwise (except for that in SQL SPs)
no HTML/javascript/CSS programming needed
application described in XML
work on a vanilla PHP/Apache stack
no state maintenance on server
That was enough to get me started.
The other suggestion I can make is to try to build an app using the framewark at the same time as you build the framework itself. This will quickly reveal problems and suggest ideas for new directions abd features.
You are on the right track. Just remember that Rome wasn't built in one day. Every house is built over a longer period, brick by brick.
By using a framework, you will discover some of it'S shortcommings and be able to find some functionality that is missing or needs improvement.
Start there, develop the improvement and submit it to the frameworks community for peer review. Even if they decide not to include your work into the framework, you will receive very valuable feedback on your work.
Don't stop there, use what you learned in your first attempt for a second one (and a third, fourth, fifth...) That way you will learn to understand what others expect from the framework (which might differ very much from your own expectation), and slowly understand the inner workings of hte framework itself.
Conclusion: Be patient and persevere. Understanding will follow. (Sounds esoteric, I know. But it may work!)
There are a number of things that most frameworks include, although the definition is fuzzy.
Provide a basic bootstrapper (manage settings, setup environment, check for compatability issues between PHP versions, etc.)
URL Routing - How to define rules for which URLs point to which pages.
Manage plug-ins, libraries, modules, etc.
Database ORM - Manipulate objects instead of writing SQL queries (simplified)
Templating - Usually involves creating a mini-language for template logic (loops, conditionals) to avoid having PHP code in the template itself.
Beyond this, most frameworks also include a slew of libraries from simple e-mailing to advanced web service API's.
I would recommend two frameworks to look at:
Codeigniter
I recommend this because it's a "batteries included" framework that works out of the box. It also has a great community, lots of 3rd party libraries. CI has a bit of trickery to get the framework to play nice with both PHP4 and PHP5, which is also good to know (because, for some reason, a lot of people still use PHP5). You should also take a look at KohanaPHP, which is a branch of CodeIgniter that has been rewritten as a strict PHP5 framework.
Zend Framework
Zend is a module-based framework. Instead of dropping everything in a directory and churning out pages, you pick the parts you need and glue them together yourself. Since Zend is made by the folks behind the engine behind PHP (confused yet?) it uses "the latest and greatest" of PHP5 - everything is Objected-Oriented and it uses type hinting. Very clean code, if a bit verbose.
I think the essential stuff is the bootstrapper (the "glue" for the framework), as well as how each framework implements a system to support user-made libraries and plug-ins. The rest you can find as stand-alone applications elsewhere.
you should really try to understand, on a high level, the life cycle of a request. here's a good example a what happens from request to response in the Zend Framework, http://framework.zend.com/manual/en/zend.controller.basics.html
Related
So I'm about to start a big Property Management System for the cloud. This Hotel system already exists in VB.net technologies, and now we are porting the whole system to web.
We are trying to decide between ASP.net or PHP, we are thinking on PHP because ASP.net would cost too much on licensing and servers. So there is Laravel, Symphony, CodeIgniter, Zend, etc..
The thing is, this project is suppose to live for years to come. But we feel like getting constraint ed by using a PHP framework, because every time the framework gets updated then we need to update our whole system. For example.. now Laravel got updated from version 4 to 5. And the whole folder structure changed. I can't imagine having our big system needing to be updated and keep up to every Laravel version update. How do you keep up with this ?
Also, what would happened if Laravel disappears, its the trendy fashion now. But we see PHP frameworks come and go.
Would it be wiser not to use any php framework and building everything from scratch to have more control over it ?
You should first note that using a framework is primarily meant to solve two issues;
Force coding into a certain 'format'. Collaboratively working on code can generate 'hacked' solutions, or unmaintainable code. A framework can be the force which helps keep these things in check.
A framework comes with a certain core-code which handles for example database abstraction, routing, etc. which can save you a lot of time to develop yourself.
An extra thing to mention; when implementing new features, there is the possibility someone has built it before and maybe even better than you would have anticipated.
Keeping up with the framework should not be too hard, as long as you abide by the coding guidelines of the framework. With the bigger frameworks, new releases have (or after sometime generate) tutorials on how to port your previous version into the new version format.
Choosing which framework to use, is a question which is opinion-based and not suited to discuss here, but keep in mind that you choose your framework according to your needs. Also check how big the community is and how much 3rd party plugins/code exists (the more, the longer the framework will last).
Good luck!
You could see a framework as a base to start from. Remember that you get all the code! Look at the code. Do you like it? Does it fit your requirements? Using a framework gives you a huge advantage over making everything yourself from scratch.
But do you need to update? Would you update your own code constantly? Perhaps it's not always needed. Sure, if there is a security issue you should do something about it, but seeing every update to a framework as essential is just plain nonsense.
I build projects aimed at specific versions of frameworks and libraries. I try to build in flexibility so I can swap out frameworks and libraries, and versions, but I often find that I stick with what's working.
Some people might not like this, and argue you should always be on the latest version, but I find that completely impractical.
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 9 years ago.
Improve this question
First, let me apologize for Yet Another Framework Question. But I think this is different enough from the usual "What framework should I choose?" to warrant it.
Here's my situation: For the past year I've been using a custom framework. It's been used on everything from small CMS's to larger sites and even a mid sized social network. It's worked great but I now see its limitations. So, I've decided to switch to a 3rd party framework. The simpler frameworks (CI, Kohana, Cake) seem too inflexible from what I've heard - so this led me towards ZF. But, I've also heard that ZF may be too flexible and thus hard to work with. What further complicates this is that I'm looking for a one-size-fits-all solution; I need a setup that works on small projects to very large projects. I am the main developer, but I need my partner to eventually be able to learn the system and help with the less complicated programming tasks.
I've researched Doctrine and I love it. So I'm leaning towards Symfony (with Doctrine) as the main framework with ZF to fill in the gaps. Plus, I need the ability to add my own pieces to this platform parallel to any 3rd party libraries. I hope this will provide me with a solid, extensible platform, as we really can't afford to be switching out frameworks every few projects.
I'm looking for advice from others who have been in the same situation as I am in now. Any advice would be greatly appreciated.
Edit: I've posted my solution below in hopes of helping other people in the same situation
After some research I've decided to go with Symfony. Here are my reasons:
Less verbose than ZF
Seems very customizable due to usage of YAML files (yet I never feel overwhelmed by them)
Autoloading of custom classes doesn't require any extra work like in ZF (albeit it's not hard to set up in ZF)
The developer toolbar is great, and they're adding some nice features to it in ver 1.3
The ability to use pieces from other frameworks (ZF, eZComponents) makes me feel confident that I won't have trouble finding what I need
Comes bundled with Doctrine and is very easy to set up (in fact Doctrine will become the default ORM in ver 1.3)
It seems like there's a much larger community for Symfony. Google "symfony tutorials" versus "zend framework tutorials" and you'll see a massive difference in the number of results
Plenty of documentation: tutorials (the Jobeet tutorial so far is very good), API references, and a more human readable description of the framework and its underlying principles
Yahoo! has used it for a few of their own projects - it's nice to see a Big Name back a framework IMHO
Edit: For the sake of hopefully helping others in the same situation, here are some things I don't like about Symfony:
Does not follow the PEAR naming scheme (ZF does)
Internal classes begin with "sf". This is contrary to the practice of capitalizing the first letter of the class name
Variables and functions are written_like_this, yet class methods are camelCased - this seems sloppy to me
These are all cosmetic issues though; things that bother me because I like to do things my way. I realize that whenever you use third party software you must be willing to make some sacrifices.
ZF is certainly a nice framework, but I feel using Symfony as the primary framework and extending it with pieces of ZF is the best choice for me and my team.
Edit
It's been 2 years since originally posting this, and since it's still getting hits I thought I'd give a quick update. I probably built about 25 - 30 projects using symfony 1.x in the last 2 years, and I'm very happy with how it performed. As a full stack MVC framework, partnered with Doctrine, it handled almost everything I threw at it. And whatever it couldn't handle, it was easy to add my own custom code. In fact, that's what I love most about symfony - how easy it is to extend. I ended up building a bunch of plugins and Doctrine behaviors that greatly reduced development time. And the admin generator tools have been a god-send. I'm still using symfony 1.4 for a few projects here and there, but have decided to mainly focus now on using Symfony2. It's a completely different beast than symfony 1, but I really appreciate its architecture. More importantly, it seems even easier to extend than symfony 1.x. I do miss some of 1.x's features, but that's the sacrafice you have to make when switching frameworks.
I like using ZF because of strong conventions. You can be sure, that everything will be as you expect it. Class names, function names, variable names, directory structure, ... all of it. It really speeds up the development if you stick to it. If you adapt it it's more like looking into your own code, when checking the ZF internals ;)
Let's be honest. ZF is not fast. Not as fast as Nette, CodeIgniter, etc. But the difference is that there is a class for everything. And if there is not, there is a class you can extend or interface you can implement.
All the other frameworks try to gain on the "wow" effect (blog in 30secs, twitter in 2 hours, etc). But when develioping a real life application, you realize, that it's the use at will, flexible and extensive architecture, that you need.
Zend Framework: Huge, Flexible, Modular.
I'd use only if am building a enterprise big ultra system.
But, I'm using Yii Framework and I like it.
Because: Very Fast, Simple, Widgets (easy to reuse component, this is very nice).
Yii it's easer to use, because is not a enterprise framework, and have all Basic features you really need in most cases.
*
EDIT: Now that I nearly understand HOW
to improve the ZendFramework using
your own code (as asked here Adding
3rd Party lib to Zend and here
Using 3rd Party lib within Zend),
I switched back to ZendFramework. I
currently design my application and
each day which I work and test
anything with ZendFramework it gets
more and more familiar and it easily
quickens my developement. My advise:
Use ZendFramework.
*
I have currently the same problem:
My story:
I was using CakePHP until I wanted to expand my project's size.
CakePHP was not as flexible as I wanted it to be.
So i tried to use ZendFramework.
The very first time I read the 'QuickStart' guide, i was a little bit afraid of having that much files for a simple guestbook application.
After a time of 'playing' with the ZendFramework I decided to use ZF as a 3rd party lib in my own custom framework.
The problem is, IF you use Zend's MVC components you might be forced to use 30% of the whole framework, because the MVC components are one of the biggest part of the ZF.
I mean if I use that much of a framework WHY shouldn't you use the rest, too?
After that, I decided to write my COMPLETE custom framework without using ZendFramework as 3rd party lib.
Now I am sitting in front of mountains of papers, full of sketches about code design.
I will keep you up to date about my further decisions.
I honestly think it really depends on your style. There's no end all be all answer to this question.
ZF relies heavily on classic and proven design principles. It's also very extensible, but requires more "configuration" than "convention". I personally do not trust 3rd party code by nature, so I'm a fan of more verbosity, for the sake of being more familiar with the technology I'm working with. But that's just me.
I've also used CakePHP successfully and two other frameworks proprietary to a company I worked for with great success. They're all trying to do similar things, just pick what feels best for you.
I've personally used CakePHP successfully for both large and small projects, however it is often difficult to make it budge the way you want. My reasons for using Cake continue to reside in the fact that the community support is top notch, the security updates are often, and they do not force meta-packages (such as unit testing) upon you (although this is bundled, you can just bin it if you're not interested in using the built in package).
Altogether, it's made a nice system for me over the past few months, however I have heard time and time again that Symphony is fantastic, so you may perhaps be on the money with your first thoughts. With NetBeans support for Symphony in the pipeline, I may too find the need to switch before long.
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 4 years ago.
Improve this question
Which one of this frameworks would you recommend to someone who knows the basics of PHP?
What are the advantages and disadvantages?
I wouldn't suggest any frameworks to someone who knows just the basics. Instead, I'd suggest to get a firm grip on OOP and the most common Design Patterns first, because that is what you will find in these frameworks. It also doesn't hurt to know your way around the various available PHP libs and extensions.
I think frameworks are a double edged sword for beginners. You may be able to do more in less time in many cases but in other cases (not a few) you will make mistakes because you do not understand the complexity of the framework code. I think you should be able to read a framework and understand its architecture if you want to use it.
That said it seems that the real cracks use Symfony. It might become or might already be the best, most versatile, most powerfull framework out there. But it definitely needs a lot of understanding of the principles of programming as well as web techonology and server technology in general.
Also very powerfull and much easier to start with is Zend Framework. It can definitely do much more for you than Kohana.
If you want a lightweight framework, Kohana is a good choice too. It has come a long way the last months and I think it is rapidly establishing itself as the new lightweight favourite.
So all in all, the three frameworks you mentioned are the three top frameworks on the PHP framework market at the moment and you won't make a mistake with any of them.
UPDATE: It is now 8 years later and Kohana is no longer maintained. Laravel would be my current recommendation for a relatively simple yet very powerful PHP framework.
Even though ZF is well established and well documented, I would suggest Kohana since it is quite a bit less complex. It is very easy to start tinkering with it by simply downloading or cloning the sample application from github.
Symphony is not for beginners. I disagree that frameworks in general are not for beginners. Starting with a blank file and no framework leaves all of the architectural design up to someone who has no idea what they are doing while starting with a lightweight framework like Kohana gives you a well-organised platform and documentation to hit the ground running. Learning OO without any examples to guide you is very difficult since you don't already know what good OO design looks like.
After downloading/cloning the Kohana sample app, hit the docs and you'll be writing well-designed OO code in no time.
For a beginner and using the three examples you gave I would say start with Kohana(or Code Igniter) for these reasons.
It's a lightweight framework which is a good starting point for full PHP development because it serves as a guide in how to organize a project in a language that doesn't have a lot of structure on it's own
Introduces basic MVC concepts.
Has basic features that will be useful in any PHP project e.g. caching, data filtering etc
I would then move on the Zend Framework if you plan or strive to work on larger projects for these reasons:
Kohana documentation is greatly lacking (it's manageable for a beginner because you end up poking around and see what makes a framework tick so that they don't see like this ominous holy code which is a plus; but in a major project with timelines it's annoying)
Kohana enforces certain conventions which is often inconvenient in major projects
Lacks mature features that are useful in "enterprise" development e.g. a decent unit testing system (there is rudimentary phpunit modules to use in Kohana and you can certainly use base PHPUnit but in contrast Zend Framework has extended PHPUnit functionality to better suite it's framework)
Better support. Zend framework has the Zend Company behind it as well as a huge community. This is a huge win for them because it permeates in everything about the framework e.g. configuration is thought out much better in Zend framework,more robust security featues, proper class autoloading based on PEAR namespacing, and it has a plethora of contributed components. Some of these benefits you can shrug of when starting but become invaluable when taking on large projects.
I've not used symfony but from what I can tell that also has some useful features once you get more versed in PHP (better ORM, better scaffolding etc). Synopsis: Kohana is a good start but I'd advise against roosting there if you plan to get into PHP beyond small sites.
In your case I would go with (in this order):
Kohana
Zend Framework
Since they are easier to pick up (specially for a beginner) than Symphony.
I always wondered why people say that not providing a unit test system is a major drawback in a framework. Well, testing you app is your responsibility and you should use the tools you're most comfortable with. Me, for instance, prefer SimpleTest and are bothered with framework that come bundled with and promote the use of their own testing system. Why learn another unit test system when SimpleTest is more than enough?
Notice that providing a unit test system and unit testing the framework is two completely different things. The framework should be unit tested, period. But for this task, the developers of the framework may use the tool they prefer most. They may even roll their own test framework (it seems that some people never learn and keep reinventing the wheel). However, (IMHO) the framework test should be kept separate from the framework itself. It shouldn't even be included on the framework tarball, but be kept as a separate package that interest only to developers of the framework.
Just my 2c.
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 9 years ago.
Improve this question
I'm about to begin building a huge clinical healthcare application with PHP, and I'm looking for some advice on a framework. I need to be able to come up with a quick prototype, so it's important that the framework takes care of many mundane tasks; therefore, I've narrowed it down to CakePHP or Symfony.
I'm hoping to get a few developers opinions that have worked with both frameworks.
Thanks, Pete
IBM published an article here on both those frameworks along with Zend in a comparisson, see:
http://www.ibm.com/developerworks/opensource/library/os-php-fwk1/?S_TACT=105AGX44&S_CMP=ART
I personally use CakePHP, it's pretty awesome compared to just straight out PHP. Easy to build things in, very MVC focused, reasonable integration with third party components. I did have some issues with the lack of any sort of discernable upgrade path between versions though. I can't speak for Symfony, but I believe it's more heavyweight than CakePHP.
Take a look at the screencasts for CakePHP as well, they give a good overview:
http://cakephp.org/screencasts
I'd like to counter some of the arguments presented above. I've worked extensively with Zend Framework and symfony, and I've had a brief look at CakePHP.
First of all, compared to symfony, the ZF documentation is not "extensive" - its on the other hand quite superficial. Second, I think that the symfony community is much more available and helpful than the ZF framework in general, and the development process is much more transparent.
However, I agree that Zend Framework enjoys the advantage of being supported by Zend, which might be a powerful argument for enterprise projects.
In my experience symfony is more of a framework than ZF. In symfony you use the whole package - or the whole frame, while you in ZF is able to use tools to your liking, making it more like a "toolbox" than a framework.
Also remember that if you like some of the tools in ZF, you'll be able to use these in symfony (and probably also CakePHP) projects, alongside symfony/CakePHP.
This is not really an answer but more like a general comment to the answers given above.
I recommend reading the right answer for this question. It mentions Zend Framework as the best choice, and presents some correct points to justify it.
Let me begin by saying I have no prior experience with CakePHP or Zend other than having browsed around in the framework code and their documentation. I started using Symfony about 15 months ago and I researched before what framework to use. I decided to go for Symfony because I found the Symfony core to be written in a nice and orderly way. It felt like I could easily understand the framework by reading the code itself. Besides that I found an enormous amount of documentation that is really focussed on working with the framework to produce certain functionalities. Very pragmatic so to say. CakePHP just doesn't seem to fit my personal style and I perceived the core to be very hacky. Again, I might be wrong but this was how I felt about it back than. After 15 months of coding with Symfony I'm still very satisfied. Often you read comments or blogs that say it's too complicated. I think these people insult their own intelligence. It indeed takes a while before you get a firm grasp of the frameworks internals and approaches to problems but once you are past that point it really is an awesome tool. The community is very helpful and the future looks bright. All in all I can only advise you to go with your gut feeling when you look at the approaches taken by the frameworks and their code and coding styles. You'll spend a lot of time in these frameworks so you must feel at ease when you look at their code and their solutions for common problems. Every framework out there is terrible if you start fighting it, going along with it will make every one of them a great tool. Some might in the end turn out better than the other. I guess you'll know the answer to that yourself after finishing your project with it.
Good luck:-)
I've had minimal experience with both frameworks, but all i've ever heard about symfony was complaints (even though it seems to be used a ton!). Probably just that people don't spend the time to fully learn the framework.
From my experience both seem to be decent frameworks, but like any good developer you must understand at least the level of abstraction below what you are using to be effective.
Probably Zend Framework.
If you want something different try codeigniter.com
or it's oo version in php5 www.kohanaphp.com
I have not used other frameworks, but I use Zend Framework and it is great. benefits are:
clean and standard library, coding style, conventions, etc.
enterprise support: it is supported by Zend, the company that every PHP programmer knows
comprehensive manual, many blog posts and tutorials, at least 2 well written books
has packages on most open source operating systems, so easy to install and maintain
a very live open source project, updates come so soon you can't keep up to them.
open license: ZF uses BSD-like license so you won't have many licensing issues
My framework decisions boil down to this (note that I primarily use Cake, little Zend, and have fiddled around with CodeIgniter and symfony).
Zend is the most enterprisey. You get the folks # Zend supporting it -- I think it's development timeline is the most solid moving forward. It also has some great modules like PDF readers, etc.
CakePHP's focus (IMO) is rapid development. But it's consistently one of the worst performance-wise -- if you're going to have a heavy-use app, I think that Paul M Jones has some posts on benchmarks. Zend is about 2-2.5x faster than Cake, IIRC. If you don't have MVC experience, Cake can be a good choice b/c it def. locks you into MVC. I find myself constantly needing to think outside their pattern, though -- which is why I'm slowly moving to Zend.
The other frameworks have different strengths, too. At PHP|Tek in Chicago, CodeIgniter was the talk of the conference, so it might have a lot of momentum over the next year or two.
Cake and Zend also have super tight integration with some other enterprisey stuff like unit tests, etc.
Definitely Yii, we used it several times for the enterprise and were very satisfied with the result. I especially like its extensions like backvendor, coco, bootstrap.
For me Yii has been quite easy to learn and implement. Tried cake php but yii seems much clearer. Anyway whatever framework you use, you must continually improve your core language skills in parallel. This helps to take the maximum advantage of the framework that you`re using.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am a long time PHP user when it comes to web applications and am mostlz comfortable with it. However, I have a one semi-large project whose maintenance / extensibility has reached its end of a life cycle. I was weighing on different PHP frameworks (there were no when the project originated), since it is the way to go for this project, and I came to conclusion the ebst option would be to do it with Zend Framework.
Symfony seemed to complicated (I don't like setting up database model as that
CakePHP seemed murky
Igniter I liked at first, but then it seemed to me it is more like Zend with less features and no Zend behind it
Zend I like the system of that I can use only what I like and not being tied into a specific directory structure, and of course there is Zend behind it. Performance is what potentially bothers me
Now, after this little rationale behind choosing Zend, there are several things I see as a deal breaker when choosing a framework.
I haven't used ORM in the past because I am more than comfortable writing SQL directly, so I still need to be convinced to use ORM
Not too much abstraction going on from the guts
Flexible directory structure
As long as this project is going to be written anew, I just as might write it in Python/Django, since I am quite familiar with Python, but not with Django. So, I would like to know if there is someone that worked with both Zend Framework and Django frameworks and if can outline a few key point differences?
I must also say that this project is made as a standard site/admin dual project. That is, it is basically two sites in one. One is for frontend and users, other is for data administration in the backend. I must and will build backend on my own, some scaffolding methods would be cool, but full automatic scaffolding is as good as nothing in this case.
I am still quite not sure how one approaches building basically two applications within a directory structure of, what is supposed to be, one application. Do you just make two separate applications and rely on URL scheme from there on to separate them? www.example.com and all of the /* being one application and www.example.com/admin/* being a second application.
Sorry for the long question(s), but as you can see - everything is pretty much related to one problem - I need to start a project anew, it has already established database+data which I can remodel, but would like to keep that kind of work at minimum.
Ok, thank you everybody - looks like I'll try and implement this stuff with Zend, gives me most flexibility out of the package (I did tests with both), and we'll see how it goes.
Well Django is more fullstack framework than Zend. It's more similar to symfony than Zend.
Django can reverse engineer your database into ORM classes. and has a cli tool that help you do stuff ( admin and model generators, project skeleton generation etc.)
Zend is more of a component framework. it has its own MVC and ORM implementation but you need to write that stuff alone. Its approach is to use only stuff that you need without imposing some directory structure.
In your case Django will have some advantages because of its great admin generator module, and Django itself is pretty fast (faster than most PHP frameworks).
I'm personally using symfony with Zend framework for some stuff I need (Mail, OpenID, Lucene search), but have played a bit with Django and I like it.
Zend doesn't include a real ORM. It provides some helper classes but you are mostly on your own in modelling your database and writing your own SQL queries. So you would have full freedom there. As Deresh says, Zend is modularized so you can pick and choose the parts you want.
Personally I use Zend together with DB_DataObjects from PEAR as by ORM. It can auto-generate your skeleton code. It is a very simple solution for handling simple queries but I can always write custom SQL where necessary.
Regarding separation of the two admin and frontend I would suggest putting them on different domains, e.g.: admin.yoursite.com (backend) and www.yoursite.com (frontend). You can probably work it with having them both on the same URL but it is not really a use-case that is supported by Django or Zend.
I'm not so experienced with Django, but from what I've read about it, it doesn't seem to be what you're looking for (too much "abstraction from the guts").
Zend framework does not provide you with an ORM. It provides you with some tools that might aid in maintainability of your code (for example its much easier to do $user->save() on a Zend_Db_Table_Row object then to manually type in the equivalent SQL string).
If you're more comfortable doing SQL, that's totally cool and Zend digs that...just beware that there might run into some more maintenance issues down the rode. I would suggest going with a "named query" approach where you store you queries in an external resource and load them "on demand".
Zend has a very flexible directory structure...the recommended one only facilitates in making things a little easier.
You can easily pull of your admin section urls using modules and routing....its a very common use case in Zend.
Bottom line is, Zend is a "presentation framework" mostly. That's what it excels at. It gives you a clean way of organizing the presentation (the screens) that are shown to your users and aids in maintenance.
It doesn't do much for you from a data perspective. This is up to you, and is probably 90% of the work that needs to be done to become "maintainable".
The goal is that your business logic stuff and data access stuff should function within any "framework", and even without a web server! Otherwise you'll just move you unmaintainable mess from whatever you have to Zend.
Also, I wouldn't concern myself with performance...mosy things can fixed with a good caching strategy.
I can't compare between Zend and Django, but I can tell you it's entirely possible to have the Django "admin" application run on a different domain (virtual named server), and you don't need to duplicate any code. You just build your Django app as normal but put the admin app and url in a different virtual server that shares a common database server/cluster.
The Django admin app does have limitations, but it's very powerful for something that comes almost free.
Finally, when I first started Django I had a lot of disdain for ORM's in general but I accept them now as a useful tool in the toolbox.