SitePoint Sponsor

User Tag List

Page 4 of 4 FirstFirst 1234
Results 76 to 97 of 97
  1. #76
    SitePoint Guru
    Join Date
    Mar 2006
    Posts
    701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As many wrote here,We not use just use the framework that make the work for us?
    Zend for example is too huge for me , but if project needs to use something from zend why not to use it?.
    CI has some libraries as zip for example that are usefull but me personally I do not like CI.

  2. #77
    SitePoint Evangelist
    Join Date
    Aug 2005
    Location
    Winnipeg
    Posts
    498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Remember I'm not really pushing CI its just a framework I'm comparing ZF's bad pratises against. I would never use ZF or code igniter because any class I required I would build from scratch. I know how to make any class I need and I can make it light weight and optimised. This might be another talking point that people use frameworks because they don't have the experience or skill to write light weight optimised code!
    I think it's important to realize that personal perspective plays a huge role in decisions we all make.

    What you consider, small lightweight and optimized, I might consider inflexible, poor design and/or tighly coupled.

    Looking at your OpenCart code, for example (while I think it's done very well) does have many inconsistencies and bad practices. You have a request object, and yet I still see traditional redirects using header()?

    You may have done that on purpose (index.php?) just because it did not make sense to you to have Response object instantiated at that point, but to me, it clearly indicates a less than ideal design (notice my choice of words here -- not nessecaruly bad practice -- but for the sake of consistency I would use a reponse for anything response).

    OpenCart is a well written eCommerce app -- Ive played with it in the past and looked over the source. I understand where blueyon is coming from. Zend in his case would result in bloat or at the very least something that resembled Magento as opposed to a small, compact, light weight OpenCart.

    At the same time, Zend is appealling to a much broader audience that the framework built specifically for OpenCart. For instance, can you use easily change the response/request objects and start delivering results from the CLI?

    Zend is, in many cases, over engineered. It's controllers are insane IMHO, but it was obviously a design choice consciously made by experienced OO designers. I personally prefer things much more simplified, but other people don't struggled with details like I do, so again, personal perspective.

    The idea of being a client developer/user of a fraemwork is to *not* worry about implementation details and instead start using the interfaces and interactions to expedite your development.

    Those of us that can resist looking at sources are often more successful at using a framework, than those who MUST see source.

    I never bothered looking at the source code of MFC when doing Windows development and using MFC beat writing code using the standard Win32 API by light years.

    MFC (while bloated and of poor design) made developing applications a lot easier, especially once you understood all of it's idiosyncrasie, caveats, design choices, etc.

    I understand the frustration we all feel, there are so many frameworks to chose from, it becomes almost impossible to select. Yet when one does come along (like Zend) which has the promise of standardizing the way we develop software, many of us find design flaws and bad decision making.

    We say it's bloated, of poor design, more complicated than need be, etc.

    It'll never end in open source, pretty much every developer I know has atoine time, invented their framework in PHP. It's a blessing in disguise and a thorn in our side. :P

    More options means more work in selecting a framework and more time possibly wasted re-inventing the wheel.

    I think someone needs to sit down and *really* analyize existing frameworks, using as many metrics as possible to ultimately determine which is best`-- a term I use loosely. :P

    Cheers,
    Alex
    The only constant in software is change itself

  3. #78
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you PCSpectra.

    small lightweight and optimized, I might consider inflexible, poor design and/or tighly coupled.


    I normally find lightweight and optimized go in had with flexible, losely coupled and well designed.

  4. #79
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    Thank you PCSpectra.
    I normally find lightweight and optimized go in had with flexible, losely coupled and well designed.
    That is not necessarily the case. take for example codeignitor, according to you it's light weight and flexible and loosely coupled right?

    take this scenario as an example: I am using Yii for development but i do not like their implementation of active record and want to replace it with another. How easy is to to use CI active record implementation as opposed to using zend active record implementation. CI active record is built for strictly to be used with CI so you would refer to the CI active record component as being tightly coupled with CI, Zend active record on the other hand can be easily implemented in other systems so that component could be seen as loosely coupled with zend.

  5. #80
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The same can be said about ZF forcing you to use ZF error class, log class and db class when you want to use the session class with a db.

  6. #81
    SitePoint Guru
    Join Date
    Jan 2005
    Location
    heaven
    Posts
    953
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    The same can be said about ZF forcing you to use ZF error class, log class and db class when you want to use the session class with a db.
    If you don't want to use those them then don't...
    Creativity knows no other restraint than the
    confines of a small mind.
    - Me
    Geekly Humor
    Oh baby! Check out the design patterns on that framework!

  7. #82
    SitePoint Enthusiast
    Join Date
    Jul 2005
    Location
    Norway
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In the world of photography, people are always debating which lens is the best. And always there are a lot of different opinions.

    For example, there's the 50mm classic lens, which has a large aperture (good), nice bokeh (good), is small and light weight (good or bad, depending on who you ask) and is rather cheap. But just like our eyes, it won't zoom, so you have to walk back and forth to zoom, or buy several other lenses like 24mm and 100mm so that you can switch.

    Then there's the 18-200mm lenses, which can zoom from wide angle to telephoto, but they have not-so-good image quality and their aperture is not large, and they have distortion problems. People often say that these lenses try to do everything well, but end up doing nothing well.

    So maybe it's the same with Zend Framework. They're trying to please everyone but end up with a very complicated design. They're trying to make a "one size fits all" framework.

    Maybe they're suffering from the spaghetti sauce disease (http://www.youtube.com/watch?v=iIiAAhUeR6Y)

    And since they want to make lots of abstractions, but still be able to do everything, they hit the wall with abstraction leakage: http://www.joelonsoftware.com/articl...tractions.html

    These are my thoughts on the subject. I might be wrong.. It has happened before

  8. #83
    SitePoint Enthusiast
    Join Date
    Sep 2009
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    How can you say this when ZF is a glue framework and is a lot more messy than CI.

    Look i vote for light weight classes dedcated to the job they were created for then a bloated big everything type of approch. Its called KISS.
    The actual technique sounds like Single Responsibility Principle(http://en.wikipedia.org/wiki/Single_...lity_principle). I like the term KISS, but like Occam's Razor can be misused as simple is too wooly and means different things to different people. Simple relies on personal bias/experience as a source of the measurement.

    Arguing what is simple is an involving/fun but possibly never ending argument.

  9. #84
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    People in software industry are usually biased towards heavyweight, bloated solutions. Job security and "natural selection," I guess. If you write a templating class that's 20 lines long, you're a dilettante. If you write a templating library that does the same stuff, while being 1.5 megabytes in size, it is assumed to be a sign of "professionalism." Especially if you can create a commotion around it. You see, it's not possible to write a book about a 20-line class. It's very difficult to write an article about it, or make a presentation on a conference. You can't pose as a guru with it either. With a 1.5 megabyte library, doing all those things is easy. And the best part it, you don't need to prove that those 1.5 megabytes of code are necessary. Because users and authors of other 1.5 megabyte libraries will assume that it is right away, and people who don't can be simply dismissed as not professional enough.

    You know what this thread shows? It shows that many developers don't really think about libraries they use. Because there isn't a single real argument in favor or ZF here.

    "It all depends on what you need."
    "It's flexible."
    "Don't reinvent the wheel."
    "Don't use it if you don't like it."

    These are meaningless, generic, pseudo-rational statements. They can be (and are) posted in pretty much any thread, regardless of the actual topic.

    Why does ZF controller have 40 classes? Should it really be provided as a component? What does it do? Do all of its functions are reasonably necessary for a controller in general? Can the necessary functionality it provides be achieved without having so many classes/code?

    These are the kinds of questions that should be answered here.

  10. #85
    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 Gambler Z View Post
    People in software industry are usually biased towards heavyweight, bloated solutions. Job security and "natural selection," I guess. If you write a templating class that's 20 lines long, you're a dilettante. If you write a templating library that does the same stuff, while being 1.5 megabytes in size, it is assumed to be a sign of "professionalism."
    With all respects due: non-sense. I think we programmers as a group don't value clutter and bloated solutions, quite the opposite is true. We tend to value things that make our jobs easier and less stressfull, the size of a library is irrelevant to me if it succeeds in being easy to comprehend and use. If a library is 1.5Mb in size, and makes my life easier, I'd definitely use it.

    Quote Originally Posted by Gambler Z View Post
    Especially if you can create a commotion around it. You see, it's not possible to write a book about a 20-line class. It's very difficult to write an article about it, or make a presentation on a conference. You can't pose as a guru with it either.
    You can if the 20 lines offer extremely useful functionality. Anyway, I think you know that this claim is just wrong: the Zend Framework wasn't created for fame, it wasn't created for writing books on it, and it certainly wasn't created to pose as a guru with it. It was created to make lifes simpler. Now is the time that much developers come to the conclusion that I have had for a while: in trying to make every life simpler, it actually makes itself harder to understand and grasp. I do however think that there is a gain in the Zend Framework when and if you invest enough time in researching it's endless possibilities. It's just that it takes too much time to research to justify the results, at least in my case.

    Quote Originally Posted by Gambler Z View Post
    You know what this thread shows? It shows that many developers don't really think about libraries they use. Because there isn't a single real argument in favor or ZF here. [...] These are meaningless, generic, pseudo-rational statements. They can be (and are) posted in pretty much any thread, regardless of the actual topic.
    I think being flexible is pseudo-rational nor meaningless. It is generic though. Yes, those statements are posted in pretty much each thread, and yes, they do bother me from time to time. That doesn't mean that people who opted to use the Zend Framework don't know what they are using, or that they didn't think about it. They have thought about it, they have invested time to learn it and now they are using it. You, on the other hand, seem to disregard a library purely based on size. If you ask me, the number of bytes it uses is not an argument to disgard a complete library. The time you have to invest to learn how to use it and the time you have to invest while using it, is.
    Yes, I blog, too.

  11. #86
    SitePoint Evangelist
    Join Date
    Aug 2005
    Location
    Winnipeg
    Posts
    498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    f you ask me, the number of bytes it uses is not an argument to disgard a complete library. The time you have to invest to learn how to use it and the time you have to invest while using it, is.
    It's useless, unless your comparing apples to apples. Not all code is created equal, some people write very simple code, others write convoluted, obfuscated code that is overly complex.

    While Zend code is clear and cohesive, it is IMHO overly complex at times, because it has been over engineered. A fault that many developers suffer, where 20 lines do not satisfy them, they look for additional problems to solve in a class that would probably be left as is.

    I understand the hate towards Zend, but I don't understand the love for CI either. Zend appeals to a more design savvy audience, whereas CI clearly appeals to those who are less interested in best practices, design, etc and more interested in just writing code quickly and effectively. Something of a interesting disconnect (between architects and engineers), considering you can't write good software without focusing on the design, at the same time, all the good design, best practices and principles in the world won't result in usable software if they are not put into action.

    Cheers,
    Alex
    The only constant in software is change itself

  12. #87
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by PCSpectra View Post
    It's useless, unless your comparing apples to apples. Not all code is created equal, some people write very simple code, others write convoluted, obfuscated code that is overly complex.

    While Zend code is clear and cohesive, it is IMHO overly complex at times, because it has been over engineered. A fault that many developers suffer, where 20 lines do not satisfy them, they look for additional problems to solve in a class that would probably be left as is.

    I understand the hate towards Zend, but I don't understand the love for CI either. Zend appeals to a more design savvy audience, whereas CI clearly appeals to those who are less interested in best practices, design, etc and more interested in just writing code quickly and effectively. Something of a interesting disconnect (between architects and engineers), considering you can't write good software without focusing on the design, at the same time, all the good design, best practices and principles in the world won't result in usable software if they are not put into action.

    Cheers,
    Alex
    AF does nto use best practises! I have explained this and given examples many times now in this thread! Using 41 files when one is only required is good pratise?

    As for the "design savvy audience" ZF just creates spaghetti code when ever its used.

    You seem to think other frameworks don't use design patterns or best practises. You just say anything to try to prove your point but there is no evidence to show ZF uses good programming.

  13. #88
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    What's the obsession with file counting?

    You can take any framework mentioned and paste the contents of all its files into one file. Now they're all one file, but do exactly what they did before.

    The Symfony sandbox contains over 2,000 files. Loading them whole framework and handling a request from start to rendering takes less time than a round trip to the database for a single query.

    Plus with an opcode cache in front, they don't even need to be reinterpreted.

    The number of files or number of lines of code isn't a practical issue... isn't the only thing that matters whether the framework accomplishes its goals and whether those goals align with yours?

  14. #89
    SitePoint Evangelist
    Join Date
    Aug 2005
    Location
    Winnipeg
    Posts
    498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    AF does nto use best practises! I have explained this and given examples many times now in this thread! Using 41 files when one is only required is good pratise?
    OK whats with the fixation on file count.

    Do you not understand that in many of those cases you provided, the extra files are injected implementations, which is a best practice in the world of OOP. Its called inversion of control or dependency inversion principle:

    http://en.wikipedia.org/wiki/Depende...sion_principle

    This is perhaps the greates distinguising factor between Zend and many other frameworks, in that Zend adheres to the practice of injecting so called providers into the adapting interfaces, which results in:

    1. More flexible code
    2. More testable code

    Providing individual classes like

    CMySQL
    CMSSQL

    Is a less than ideal practice, at least when compared to the IoC alternative

    http://www.martinfowler.com/articles/injection.html

    Those extra classes are usually nothing more than implementation drivers (for lack of a better word). They are NOT included at runtime and slow down or bottle neck the execution of the application.

    As for the "design savvy audience" ZF just creates spaghetti code when ever its used.
    Its almost technically impossible for PHP to allow spaghetti code, that is a term used to describe code that heavily favored constructs like GOTO, which often results in code that jumps unconditionally all over the place.

    http://en.wikipedia.org/wiki/Spaghetti_code

    With the exception of 'exceptions' (no pun intended) or recursive functions there is little chance of PHP allowing spaghetti code.

    The code is a mess in some places, I agree, but it's not impossible to decipher. Besides who cares if the implementation is a mess, so long as it's bug free and it's interfaces are stable, consistent and sufficient for accomplishing the task at hand.

    Your worrying about the implementation details of a framework, which shouldn't even concern you as a client developer, but I also understand the curiosity of a developer looking at the code; That is a fault of open source not ZF. :P

    You seem to think other frameworks don't use design patterns or best practises. You just say anything to try to prove your point but there is no evidence to show ZF uses good programming
    Zend favors dependency injection, whereas I don't think the engineers over at CodeIgnitor even know what that is. A lot of developers don't, but it's a very important principle to understand if your serious about OOP.

    You can implement design patterns in any language, object, procedural or not, it doesn't matter, this much I know. However everyones interpretation will differ from the next, and many developers have a tendancy to read one article on a front controller and go off and implement one. When you compare that to a front controller implemented by someone who has read several books on the subject of design patterns, the implementation will differ greatly.

    Zend also is far more pattern centric than CI. While CI might have a loose interpretation of MVC, they miss out on dozens of other patterns which would help to make the code more readable by someone who was familiar with patterns.

    That being said, they miss the most important principle of all in it's implementation, KISS. But again, who cares about the implementation, let them (core developers) worry about fixing bugs and making it work.

    The interface is easy to follow, well documented what more do you want?

    More complete examples would probably help, but if you have worked with MVC frameworks in the past ZF is fairly straight forward.

    Cheers,
    Alex
    The only constant in software is change itself

  15. #90
    SitePoint Enthusiast
    Join Date
    Jan 2009
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stop feeding the troll, fellas

  16. #91
    SitePoint Evangelist
    Join Date
    Aug 2005
    Location
    Winnipeg
    Posts
    498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Whose the troll?

    I am not learning anything from this discussion though, I have my reservations on Zend and others already, so I'm not hearing anything new. :P

    Cheers,
    Alex
    The only constant in software is change itself

  17. #92
    SitePoint Enthusiast
    Join Date
    Jan 2009
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I thought that'd be obvious...

    Regardless, it's not you, PCSpectra, you've brought a lot to the discussion

  18. #93
    SitePoint Enthusiast
    Join Date
    Apr 2007
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have used CI for a long time. I prefer it to any other framework I've seen. However, I don't make that preference based on how many files it has or does not have. While having a lot of files can be considered bloat if you don't use them it is not bloatware if it is well written code. The way the OP uses the term 'bloated' is a misuse of programming vernacular.

    The reason why I like CI is that I have a lot of libraries that are implemented well for their intended purpose, I can add libraries if I want to extend it in an OOP way ( or wrap another OOP/non-OOP script into CI ) while having the ability to do plugins and helpers for quick procedural code.

    It supports PHP 5.3 now so you can start to write code that supports namespaces. It might not be the best OOP framework out there but PHP isn't exactly the best OOP platform around either. If I wanted that I'd go to `back` to python and ruby.

    Now, this is not to say CI is the best and PHP is the end all. Symphony is pretty nice and built for PHP5+ and Yii is certainly nifty. If I was wanting to write code on a deadline and it needed to use SQLite 3 then I would use the latter two frameworks since SQLite 3 in PHP is PDO based, which CI doesn't have the best support for natively ( although their are community libraries to support it. )

    Zend looks to be more suited to more community based projects where I'd want ACL and all the other features without having to write wrapper libraries. To each their own. They all fit someone's list of requirement and that is really all that matters.

  19. #94
    SitePoint Enthusiast
    Join Date
    Oct 2009
    Location
    in the eyes of a madman
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @blueyon
    What exactly are you trying to prove?
    If you don't like the Zend Framework then ignore it, like any mature adult would. Sure to a some people the zend framework is bloated hype, I happen to agree with that, but to make your opinion open to everyone, though valid in your mind, is like a child who needs attention of any sort.
    If you think you are god's gift to the php OOP world, then you need to step back and look at what you are saying and realize how immature it is.
    Someday, my friend, you will grow up and realize that your opinion only matters to yourself and people who ask for it. To let your opinion be known to others is just asking for criticism ( good or bad ) from others, because opinions are like ***holes everyones got one and they all stink.
    I guess I'm not a mature adult either because I am replying to this thread.

  20. #95
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dsims,

    why have you brought this thread up again?

    I only say it because it teaches people bad OOP practise. I want to warn people away from it rather than get sucked into it thinking this is the right way to program.

    ZF is really just hype and there is no cleaver thinking behind it. it does nothing that other frameworks don't do. all the argmuents I have heard so far is rubish and people make things up to prove their point.

    I'm just glad that there is a large enough CI community that is on the right track to coding properly.

  21. #96
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    *holy thread revival Batman*

    Let's leave the thread alone people, some of us still have nightmares...
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  22. #97
    PHP Guru lampcms.com's Avatar
    Join Date
    Jan 2009
    Posts
    921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With all the excitement I navigated over to codeignitor website and before downloading anything I read their manual.

    Without even looking at the code, I can say, I don't think they got it right. Yes, it may be lightweight, because it's not all that capable. It seems to impose many limitations, not using classes where objects would be more appropriate, not using any type of event dispatcher/observer pattern for custom plugins and modules,
    not using PDO for database, not use any type of logging class to log anything throught any script.

    Zend has more classes but because they offer you alot more choice, you pick the one that would work on your server and the just pick the ones you need.
    I don't want to offend CodeIgnitor fans, but CodeIgnitor is NOT a cutting edge framework. It may be good, it's not great, it's not any type of breakthrough.

    If I had to choose, I would go with Zend and then if I am not satisfied with any of Zend classes I can always extend or even change them to make them better and maybe faster.

    I personally like the Zend coding style, it's clear, it's professional, it could include more comment blocks, that would not hurt. I like when developers explain their code like why something is done a certain way.
    My project: Open source Q&A
    (similar to StackOverflow)
    powered by php+MongoDB
    Source on github, collaborators welcome!


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
  •