5 ms·
You know, from the get go one of the goals of ZF2 was simplicity, though it sounds like it's regressed in that area. Speed was another goal. Though at the pre
by mzarate06 15y ago
You know, from the get go one of the goals of ZF2 was simplicity, though it sounds like it's regressed in that area. Speed was another goal. Though at the present, that's regressed as well:
http://www.enrise.com/2012/02/zend-framework-2-performance/ http://www.enrise.com/2012/02/zend-framework-2-performance/
In ZF's defense, the ZF team has stated that they're aware of the performance problems and that they'll look at those at a later stage. However, that, combined w/your review, combined w/the complexity I see every time I view a profiled call stack of a ZF app in KCacheGrind, really make me want to start rolling my own framework. I've done just that w/my JavaScript, and I'm loving the net positive in simplicity and speed. The growing complexity of ZF makes me want to go that direction with my PHP code as well (though I'll probably look at simpler frameworks first, like Lithium) .
In regard to the following line of ZF2 code cited in the post ...
$message = $this->getRequest()->query()->get('message', 'foo');
That line in ZF1 would look like ...
$message = $this->_getParam('message', 'foo');
Not much of a difference, but I wonder what was wrong w/ZF1's less verbose alternative?
- troels 15y agoI've never used ZF as a full stack framework, exactly because of its complexity, but I've plenty times used selected components from it. It makes a very fine component library in that sense - I just hope they don't mess that up with ZF2.
- mzarate06 15y agoAgreed, I've done the same. That's also why I don't shy away from the idea of rolling my own framework. I've had to take some ZF components, like Zend_PDF and Zend_Mail, and add them to my own code before. It's easy, and obviously relieves the stress of having to roll such components on my own.
- ealexhudson 15y agoIt feels a bit trite of me to make many of these criticisms when the "proper" way, really, would be to get involved with the project and attempt to engage developers directly. Unfortunately, I don't really have the time to contribute in a meaningful way (i.e., code), and I'm very much of the opinion that people who write the code get to make the decisions. That said, it really does seem to me like ZF suffers from a general lack of engagement. There are surprisingly few developers involved in it, and those that are there quite obviously have their heads screwed on the right way around. It's a rare post from mwop that isn't useful/insightful in some way. I've watched a little from the sidelines, in IRC and lurking the dev list, and it did seem like all the goals were exciting and progressive. So, having come into the game a bit late, I don't really get where it went wrong. I didn't want to throw out names of alternative frameworks in the article, people are obviously mentioning Symfony and that's clearly high quality, but LoicProcrast's work on Photon has me tremendously excited. It's undeployable for me (right now), but in side-by-side comparison to ZF2 it makes many of the ZF issues exceptionally stark.
- alexchamberlain 15y agoIf you want great performance, consider writing an Nginx module in C. It's reasonably easy to get started!
- mzarate06 15y agoWell, my mention of ZF2's performance drop was more so to supplement a seemingly regressing nature of ZF2. I'm really not that demanding when it comes to the performance of a server side language. PHP + APC has been proven to be almost as fast as C++ (well, Facebook's Hip Hop, which is written in C++), and I'd argue that the biggest bottle necks in a web app are always the network latency and the database, so that's where I spend most of my performance tuning.
- alexchamberlain 15y agoThey are your latency bottlenecks, but your throughput bottleneck is almost certainly PHP.
- justincormack 15y agoHiphop is not the same as writing your application in c++. nothing like, not a useful comparison.
- masklinn 15y ago> Not much of a difference, but I wonder what was wrong w/ZF1's less verbose alternative? Might have wanted to reduce the API surface for the `this` (by removing extra methods which can be reached indirectly).