SitePoint Sponsor

User Tag List

Page 1 of 4 1234 LastLast
Results 1 to 25 of 97
  1. #1
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Zend Framework Bloated Hype!

    Just thought I would create a new topic to continue talking about Zend Framework from this post:

    http://www.sitepoint.com/forums/show...=638841&page=2


    ZF no. of files comparrison against code igniter.

    No. Of Files

    Mail
    ZF: 29
    Code Ignter: 1

    Cache
    ZF: 16
    Code Ignter: 1

    Request
    ZF: 1
    Code Ignter: 1

    Log
    ZF: 14
    Code Ignter: 1

    Config
    ZF: 4
    Code Ignter: 1

    Controller
    ZF: 40
    Code Ignter: 1

    View
    ZF: 43
    Code Ignter: 1


    Ever heard that its harder to keep programming simple than it is writing complex code?

    This is because people with with years of experience such as myself know how to code efficiently with the minimum amount of code.

    I don't need ZF cache class I can code my own in 5 minutes with just the right number of needed methods and without the bloat of having to load more than 1 class.

    I just don't understand how you can argue when I show you these types of figures.

    One person just argued that ZF uses design patterns.
    So do all the other frameworks.

    What are you going to say next? that ZF is light weight?
    It clearly is not.

    That it uses MVC?
    So do a lot of the other frameworks and they do it the right way with a lot less classes.

    Are you going to say that ZF is easier to use?
    How can it be easier to use when it has such a large API? Its like learning smarty to create a web site instead of learning PHP.

    Its the fastest!
    I seem to remember ZF benchmarked against other frameworks and it got the lowset score. So its not a fast framework.

    Remember Zend the company did not create PHP they just piggy backed on it so they could sell their warez. They have about 6 contributors to PHP out of 1,000 people who are working on each release.

    Do you or anyone else have another argument why ZF is the best framework to use?

  2. #2
    SitePoint Wizard Darren884's Avatar
    Join Date
    Aug 2003
    Location
    Southern California, United States
    Posts
    1,616
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think its the best but it would really depends on what you are using it for. You can't really compare it to Code Igniter though because it goes a lot further in depth. Where is Zend selling Warez?

  3. #3
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Zend Framework is more like a collection of components than a framework (like CodeIgniter/CakePHP) and it's meant to be reusable, so less code has to be written when trying to extend classes.

  4. #4
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Darren884 View Post
    I don't think its the best but it would really depends on what you are using it for. You can't really compare it to Code Igniter though because it goes a lot further in depth. Where is Zend selling Warez?
    It sells:

    zendserver
    zendplatform
    zendstudio
    zendguard

    also the zend certifcation which I seem to remember cost money to take the test. I could be wrong as it was so long ago since I did it.

    Look at zendstudio its not the best php ide.

  5. #5
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SoBeNoFear View Post
    and it's meant to be reusable, so less code has to be written when trying to extend classes.
    All library classes should be made reusable. Its the whole point of OOP. Keeping classes simple makes them more reusable.

  6. #6
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    All library classes should be made reusable. Its the whole point of OOP. Keeping classes simple makes them more reusable.
    Of course, but just because that's a primary concept doesn't mean all libraries implement it the right way (especially in logging/caching libraries, that kind of construct should use the strategy pattern, but most libraries just use one kind of storage or the other, concretely)

  7. #7
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    The Zend Framework is more a collection of core library components then a run-n-go framework like CodeIgniter or CakePHP. While those frameworks do the heavy lifting on the backend leaving the developer to focus on the frontend. The Zend Framework does not do that, it only offers pre-build components to aid in the development of your own backend. It is a different methodology and development requirements. It is also designed to allow the developer to pull out everything that is not needed for the current application. As such Zend must provide a lot more code to make each component as flexible to the needs of the developer, nothing should be hard coded.

    In own opinion, There is no best of anything only the best for the requirements.

    Remember Zend the company did not create PHP they just piggy backed on it so they could sell their warez. They have about 6 contributors to PHP out of 1,000 people who are working on each release.
    They may not have created PHP, but they made it what it is today thanks to the Zend Engine that was built for PHP. Without the Zend Engine, PHP would still be just a collection of Perl scripts.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  8. #8
    SitePoint Evangelist
    Join Date
    Mar 2006
    Location
    Sweden
    Posts
    451
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    No. Of Files

    Mail
    ZF: 29
    Code Ignter: 1
    I do agree with you on some points, but some things are just complex and doesn't fit into one file. I haven't looked at Code Igniters mailing features, but if they really do fit into just one file, it's probably just a bunch of wrappers around PHP's own mail function. Take a look at Swift Mailer. It's not very lightweight at all, but it's a very good mailing library, and it offers you a level of control that definitly justifies its number of files/lines of code.

    That's the hard part of developing a framework. Since your target audience is just about everyone, you need to cater to a lot of different peoples needs.
    So you need to decide whether you're going please everyone, or if you just want to please a few. If you try to please everyone, the code base will definitly get bigger, and probably a bit bloated as well.

  9. #9
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wysiwyg View Post
    I do agree with you on some points, but some things are just complex and doesn't fit into one file. I haven't looked at Code Igniters mailing features, but if they really do fit into just one file, it's probably just a bunch of wrappers around PHP's own mail function. Take a look at Swift Mailer. It's not very lightweight at all, but it's a very good mailing library, and it offers you a level of control that definitly justifies its number of files/lines of code...
    To add to this, Zend Mail (can be said about Swift Mailer too) does more then just send email messages, it can connect to a POP3, IMAP server and retrieve email. It also provides a lot more features then CodeIgniter's single solution.

    I'm not really sure what the OP is trying to compare, each framework is built with a different set of requirements. ConIgniter's is quickly build a site with zero backend work. While in the case of Zend, large reusable component library to help with backend development.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  10. #10
    SitePoint Addict webaddictz's Avatar
    Join Date
    Feb 2006
    Location
    Netherlands
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    ZF no. of files comparrison against code igniter.
    I'm not a Zend Framework fan. Its architecture and its defaults are, to me, unnatural to use and I sometimes have to do things that really don't make sense to get the results I would like. That's not simply the fault of the framework though: it's a combination of the framework, it's documentation and my own lack of interest.

    To change a small detail, I first have to search through the guide, and hope that the detail I'd like to change is actually documented there. If not, I have to go through a heck of a lot off class API's, to find a method which might do what I want it to do. If not, I have to ask one of my friends that actually do use Zend Framework. If all else fails, I try a rain dance and just hope it works.

    I don't like the Zend Framework because I think it's getting too big to comprehend quickly. This is *my own* fault however, as I really just don't want to invest any time in researching its new and improved options. I also dislike the fact that I can't test two out of three layers of my application, simply because there are too many objects and Singletons involved.

    That said, I've used it. I am using it still, for one project. The above points are not enough for me to throw the framework out of the window, especially if there's a project where multiple developers are involved that have experience with ZF. Also, there's a shitload of features in the framework: I would not be surprised if the next version can actually make me a coffee, although I probably have to instantiate 26 classes and set 46 options for it.

    Code Igniter is a great framework to start with. It's *not* as flexible. It's *not* as full-featured as the Zend Framework. It *doesn't* have the same user base. Comparing LoC or number of files to say which framework is better is non-sense and a very bad argument. The problem probably... is you.
    Yes, I blog, too.

  11. #11
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth View Post
    To add to this, Zend Mail (can be said about Swift Mailer too) does more then just send email messages, it can connect to a POP3, IMAP server and retrieve email. It also provides a lot more features then CodeIgniter's single solution.

    I'm not really sure what the OP is trying to compare, each framework is built with a different set of requirements. ConIgniter's is quickly build a site with zero backend work. While in the case of Zend, large reusable component library to help with backend development.
    Code igniter does both smtp and php mail function.

    What about PHP mailer that does the same job in just 3 files. it does php mail function, smtp and pop3. I could condense it to one and remove a lot of the unneeded methods.

    Code ingiter is resuable aswell. The problem with zend's reusability is that you have to port a lot of the unrrealted classes such as error, logging, etc..

  12. #12
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Of course you can condense it into smaller chunks be removing the stuff you do not need. But then the whole thing is tailored for your need and purpose. But then we get into the pretend OO Programming model where Classes become nothing more then pseudo-namespace containers for your procedural code (which is what CodeIgniter is).

    CodeIgniter, is hardly reusable, all of its internals are tailored for its own needs that is what makes it a set-n-go framework. Pre-configured framework by what the creators feels to be the best option.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  13. #13
    SitePoint Guru bronze trophy TomB's Avatar
    Join Date
    Oct 2005
    Location
    Milton Keynes, UK
    Posts
    996
    Mentioned
    9 Post(s)
    Tagged
    2 Thread(s)
    Generally, more, smaller classes = better extensibility. (Of course it depends on the overall design).

    This is an age old design consideration in OOP. Where do you draw the line between using a class or a native type for an attribute? Native type will give you better performance but significantly reduce extensibility.

    I wouldn't base a framework on the number of classes.

    I'm not a huge fan of ZF, but it works well because you can easily grab one part of it you want and isolate it for use in your project. Generally I've found the same issues as webaddictz. Although I would rather use ZF as I don't like the pseudo-oo that CodeItniter (and CakePHP while we're on the subject) uses for interacting with models and views.


    E.g. from http://codeigniter.com/user_guide/general/models.html

    PHP Code:
    $this->Blog->get_last_ten_entries(); 
    is equivilent to

    PHP Code:
    get_last_ten_blog_entries(); 
    because there's no room for polymorphism here. e.g. if I want to load 10 latest posts some are blogs some are articles, I can't easily. I also dislike the fact that it uses primitive array types to store the data rather than an object of a specific type.

  14. #14
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth View Post
    CodeIgniter, is hardly reusable, all of its internals are tailored for its own needs that is what makes it a set-n-go framework. Pre-configured framework by what the creators feels to be the best option.
    Code ingiter is reusable. more so than ZF. As I explained just to use ZF's mail functionality you need to copy 24 files accross.

    Which is better just using one class tailored to your needs or 24? Having 24 files there means you have to know a lot of information if your going to use it or modify it. Also more code there is the more chance of it being buggy.

  15. #15
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    Code ingiter is reusable. more so than ZF. As I explained just to use ZF's mail functionality you need to copy 24 files accross.

    Which is better just using one class tailored to your needs or 24? Having 24 files there means you have to know a lot of information if your going to use it or modify it. Also more code there is the more chance of it being buggy.
    If you are worried about number of files or a large API, consider using an IDE, like PDT, NetBeans, Zend Studio, etc.

    CodeIgniter is hardly what I'd use as an example of reusable, pure OOP libraries. It's not made to be reusable, it's made to be simple and made for one purpose.

    EDIT: But like you said, it's "tailored" to your needs. However, that doesn't mean it's tailored to everyone's needs.

  16. #16
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    ...Also more code there is the more chance of it being buggy.
    Sorry, but that is just a rediculus [sp?]. The amount of code does not correlate to an increase chance of a bug. Making untestable monster single file mass of code that is a just a pain to try an maintan, can cause more bugs. In ZF's defense, dividing objects up to there indevidual bases makes it a lot easier to test the lowest componet in isolation. I.e., reducing catchable [logic] bugs. (Writing this on my phone, pleaase forgive spelling and formatting.)
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  17. #17
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    have you seen the bug list just for the config functionality?

    http://framework.zend.com/issues/sec...omponent=10010

  18. #18
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anything can be said to have many features and "flexibility". A good programmer should always ask what those features achieve in the end, and whether there are better ways to do it.

    With the possible exceptions of Mail and PDF, ZF is clearly overengineered. Many of the things it does shouldn't be done in the first place ("object oriented" configs?!). Others are done in they ways that are way more complex than need be.

  19. #19
    SitePoint Evangelist
    Join Date
    Aug 2005
    Location
    Winnipeg
    Posts
    498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ZF no. of files comparrison against code igniter.
    I would argue, that while more files can occassionaly mean more complexities and possibly more code, it also indicates a more modular code base.

    A monolithic file of 1000 lines is less fun to work with than 10 files of 100 lines each, anyday. File modularity would/should also promote class modularity, adhering to SRP and probably indicate a properly decomposed interface.

    CodeIgnitor is actually equally complex, and while it may be faster, it's not due to Zend bloat, not it's design, whereas CodeIgnitor lacks due to it's poor design.

    The last time I asked in the CodeIgnitor forums, how a forward was executed, I was told what I needed was a redirect. By one of the CI engineers paid my Ellis labs, to boot.

    There is a significant difference between a forward and redirect otherwise, they would be the same thing.

    CodeIgnitor makes A LOT of assumptions for a low level framework competing in the same arena as Zend Framework, that is what makes it less than ideal for professional developers or design geeks anyways -- design as in those who follow OOD principles, patterns, etc.

    p.s-I dislike both Zend and CI but if I had to chose and the application required long term maintenance I would side with Zend anyday.

    Cheers,
    Alex
    The only constant in software is change itself

  20. #20
    SitePoint Evangelist
    Join Date
    Aug 2005
    Location
    Winnipeg
    Posts
    498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The amount of code does not correlate to an increase chance of a bug
    I think, that is normally the metric most software factories use to determine quality...number of defects per 1000 lines or something like that.
    The only constant in software is change itself

  21. #21
    SitePoint Enthusiast
    Join Date
    Jun 2009
    Location
    Brisbane, Australia
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    CodeIgniter gives such a miniscule overhead reduction in exchange for sloppy incoherent code. It really makes me laugh when people ponder usage of Zend Framework for there projects... I can almost guarantee they will never be working on an Application where Zend Framework's codebase is the bottleneck. However if they ever did somehow reach that point, they would be rewriting their application in a more robust langauge like C, Java or even Python, rather than rewriting their application in CodeIgniter or even worse; the self-written framework.

  22. #22
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know how you can say that and ZF framework does not produce sloppy incoherent code?

    You can't even create a UML diagram showing the structure of your apps using Zend framework.

    You don't know whats been loaded and the coding standard is worset I have ever seen.

    It seems Zend thinks its a big enough well known company that it can come up with its own coding standards. Most of the examples in the php.net site use a Java style coding standard yet zend has come up with there own.

    Self writen framework huh? Theres nothing wrong with it. As long as you do it correctly.

    A light weight framework that is similar to CI. A framework should not use design patterns for the sake of using them. They should only be used when they there is a problem that they can solve.

  23. #23
    SitePoint Evangelist
    Join Date
    Aug 2005
    Location
    Winnipeg
    Posts
    498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know how you can say that and ZF framework does not produce sloppy incoherent code?
    It's not perfect but the overall design I think favours composition/IoC and more OO best practices and patterns than CodeIgnitor.

    You can't even create a UML diagram showing the structure of your apps using Zend framework.
    Why not? What specifically did you have a problem with? Did you try and generate one automagically using a tool? That could be a result of it's favoring dependency injection, no?

    You don't know whats been loaded and the coding standard is worset I have ever seen.
    You do, you just need to step through your code and keep track or print_r() a debug_backtrace() to see what was loaded and in what order.

    Dependency injection makes the execution of the code a little more implicit, as opposed to explicitly indicating what objects have what dependencies. It's a trade off made by many OO professionals to reduce concrete dependencies in favor of more flexible code.

    It seems Zend thinks its a big enough well known company that it can come up with its own coding standards. Most of the examples in the php.net site use a Java style coding standard yet zend has come up with there own.
    In all fareness, if any framework deserves the title "authority framework" it's probably Zend. They didn't totally re-invent the wheel either, they adopted much of it from PEAR, such as reflecting the directory structure in the class name - brilliant if you ask me

    A light weight framework that is similar to CI. A framework should not use design patterns for the sake of using them. They should only be used when they there is a problem that they can solve.
    I agree, that many frameworks use patterns, almost for the sake of using them and feeling 'smart'. At the same time I see an equal amount of code that uses weak/poor interpretations of what a front controller is, including code that should go in a bootstrap, action controller, etc.

    Cheers,
    Alex
    The only constant in software is change itself

  24. #24
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's not perfect but the overall design I think favours composition/IoC and more OO best practices and patterns than CodeIgnitor.

    Rubbish! If ZF used best practices it would not have so many files for simple tasks. I've already gone over this sort of stuff in my first post.

    How the hell can you say using 16 classes for caching compared to code igniters 1 is OOP best practices. Its bloated!

    What about the Mail class? ZF uses 29 files. php mailer just uses 3 and does everything ZF mail class does.


    As for IOC I already explained with ZF you have to load more of ZF components like error classes, logging, db etc..


    Why not? What specifically did you have a problem with? Did you try and generate one automagically using a tool? That could be a result of it's favoring dependency injection, no?

    You do, you just need to step through your code and keep track or print_r() a debug_backtrace() to see what was loaded and in what order.

    Here we go someone that just says anything or makes stuff up to try to prove the other person wrong without ever understanding anything. This just proves to me the lack of skill you probably have in designing applications with DRY, KISS, IOC in mind.


    In all fareness, if any framework deserves the title "authority framework" it's probably Zend. They didn't totally re-invent the wheel either, they adopted much of it from PEAR, such as reflecting the directory structure in the class name - brilliant if you ask me

    pear is one of the worset bloated rubish libraries out there and it looks like the ZF developers just carried on coding the same way.

    I agree, that many frameworks use patterns, almost for the sake of using them and feeling 'smart'. At the same time I see an equal amount of code that uses weak/poor interpretations of what a front controller is, including code that should go in a bootstrap, action controller, etc.


    You only need one file for a front controller I'm wondering how many zend uses?

  25. #25
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You just saying things like IOC, DRY, KISS, best practises, etc.. yet you have no proof or comparison with other frameworks.

    please post parts of the ZF where you think is good coding compared to a framework like CI.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •