SitePoint Sponsor

User Tag List

Page 2 of 5 FirstFirst 12345 LastLast
Results 26 to 50 of 112

Thread: Zend Framework

  1. #26
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The database code really looks like Rails:

    1st example in Rails (untested):

    Code:
    require_gem 'activerecord'
    
    ActiveRecord::Base.establish_connection(
      :adapter  => 'mysql',
      :host     => 'localhost',
      :username => 'user',
      :password => 'pass',
      :database => 'test'
    )
    
    class Person < ActiveRecord::Base; end
    
    Person.create(
      :firstname     => 'Andi',
      :lastname      => 'Gutmans'
      :favoritecolor => 'blue'
    )
    But this is different. I wonder why they introduced a select object?

    Code:
    result = Round.find_all_by_noble_title('Sir', 
       :order => 'first_name', 
       :limit => 20, 
       :offset => 10)

  2. #27
    SitePoint Guru
    Join Date
    Jun 2004
    Location
    Finland
    Posts
    703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I understand that this is a preview release but after a quick check I'm just not convinced. Some of the things I spotted:

    They have messed up some method names. You'd expect them to be in camelCase, right? Sure, you have loadClass, loadFile and so on.. but then you have loadinterface. Yes, I am aware of the case-insensitiveness of method names in PHP, but it bothers me

    What is isReadable() doing in Zend?


    Nearly every method in the Filter class, for example isDate, isAlnum, isAlpha etc, returns the given value if it is valid, false otherwise. I don't know about you but I'd expect a is-method to return a simple boolean. I can't understand why they're not doing it but I guess there might be a reason for it.


    I really, really recommend avoiding the Filter class for now..
    PHP Code:
        public static function isBetween($value$min NULL$max NULL$inc TRUE)
        {
            if (
    $value $min &&
                
    $value $max) {
                return 
    TRUE;
            }

            if (
    $value >= $min &&
                
    $value <= $max &&
                
    $inc) {
                return 
    TRUE;
            }

            return 
    FALSE;
        } 
    Why make $max and $min optional when they aren't?
    PHP Code:
    var_dump(Zend_Filter::isBetween(5,0)); // false
    var_dump(Zend_Filter::isBetween(5)); // false 
    Same with isLength, isGreaterThan, isLessThan..

    PHP Code:
    public static function isRegex($value$pattern NULL)
        {
            if (
    preg_match($pattern$value)) {
                return 
    $value;
            }

            return 
    FALSE;
        } 
    I guess a small E_WARNING won't matter..

    PHP Code:
        /**
         * Returns value if it is a valid format for a person's name,
         * FALSE otherwise.
         *
         * @param mixed $value
         * @return mixed
         */
    public static function isName($value)
        {
            if (!
    preg_match('/[^[:alpha:]\ \-\']/'$value))
            {
                return 
    $value;
            }

            return 
    FALSE;
        } 
    Ok I'm not even going to comment that one

    PHP Code:
        public static function isDate($value)
        {
            list(
    $year$month$day) = sscanf($value'%d-%d-%d');

            if (
    checkdate($month$day$year))
            {
                return 
    "$year-$month-$day";
            }

            return 
    FALSE;
        }

    var_dump(Zend_Filter::isDate('01-01-01')); // 1-1-1 .. wha..? 
    PHP Code:

        
    public static function isFloat($value)
        {
            if (
    floatval($value) == $value) {
                return 
    $value;
            }

            return 
    FALSE;
        }

        public static function 
    isInt($value)
        {
            if (
    intval($value) == $value) {
                return 
    $value;
            }

            return 
    FALSE;
        }

    var_dump(Zend_Filter::isFloat('me no float')); // me no float
    var_dump(Zend_Filter::isInt('i am a string')); // i am a string 
    I'm sure you can find even more Filter-WTFs, I didn't bother checking any more of the methods.

    PHP Code:
            // done!
            
    return $buffer
    I liked that one

    Ok, that's enough for now. Feel free to shoot me if you really need to

  3. #28
    SitePoint Enthusiast siteartwork's Avatar
    Join Date
    Jan 2005
    Location
    Germany
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow it's good to see it's finally up!

    Can anyone tell me where I can find the ZF mailing list? It doesn't show up under http://www.zend.com/lists.php...

    TIA!

  4. #29
    SitePoint Guru thr's Avatar
    Join Date
    Jun 2003
    Location
    Sweden
    Posts
    664
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To subscribe: fw-general-subscribe-USER=HOST.TLD@lists.zend.com (like: fw-general-subscribe-thrthr=gmail.com@lists.zend.com)

  5. #30
    SitePoint Wizard Ren's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    1,060
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by siteartwork
    Wow it's good to see it's finally up!

    Can anyone tell me where I can find the ZF mailing list? It doesn't show up under http://www.zend.com/lists.php...

    TIA!
    Bottom of http://framework.zend.com/

  6. #31
    SitePoint Enthusiast siteartwork's Avatar
    Join Date
    Jan 2005
    Location
    Germany
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by thr
    To subscribe: fw-general-subscribe-USER=HOST.TLD@lists.zend.com (like: fw-general-subscribe-thrthr=gmail.com@lists.zend.com)
    Quote Originally Posted by Ren
    Thanks guys, quite early for a sunday in germany, should have looked closer

  7. #32
    SitePoint Addict
    Join Date
    Mar 2004
    Location
    Grand Junction, CO
    Posts
    292
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dr Livingston
    From a business point of view, considering that how far Zend has come, and importantly, where they're going, the framework in time will not so much carry it's self, but the brand will; That is how I look at it anyways.
    That's a very interesting, and I think valid point. I for one would be wary of basing my business on the framework's name rather than its quality.

  8. #33
    SitePoint Enthusiast siteartwork's Avatar
    Join Date
    Jan 2005
    Location
    Germany
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sorccu
    I understand that this is a preview release but after a quick check I'm just not convinced. Some of the things I spotted:

    They have messed up some method names. You'd expect them to be in camelCase, right? Sure, you have loadClass, loadFile and so on.. but then you have loadinterface. Yes, I am aware of the case-insensitiveness of method names in PHP, but it bothers me
    I hope this is just a typo, as I have seen quite a few in the sources yet. I'm sure they will fix it up since the source comes with a coding-standard guide.


    Quote Originally Posted by Sorccu
    What is isReadable() doing in Zend?
    I was asking myself the same question. I'm missing a File-Object in the Framework anyway, or at least the use of the SPL File-Object.
    looks like a "time-went-out"-solution to me.

    Quote Originally Posted by Sorccu
    Nearly every method in the Filter class, for example isDate, isAlnum, isAlpha etc, returns the given value if it is valid, false otherwise. I don't know about you but I'd expect a is-method to return a simple boolean. I can't understand why they're not doing it but I guess there might be a reason for it.
    Agreed, this sucks pretty much. This looks like a PEAR-hack to me. I don't hope they took some PEAR-Classes as a quality-guide for the ZF... I'll jump over to the mailing lists and see if this was already mentioned...

  9. #34
    SitePoint Addict
    Join Date
    Apr 2005
    Posts
    274
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by thr
    Except for the fact that it's the first MVC framework for php that's backed by Zend, and that guarantess you (almost) that the project won't stop in 1 month after you invested all your business using the framework, which could happend with "hoby" projects.
    Considering that usually current PHP professionals have all pretty much built their own framework they can use (which is why there are so many frameworks around for PHP), I fail to see it being too much of a problem. I fail to see anything really new, revolutionary, different, or even interesting here that would make a professional even consider this.

  10. #35
    SitePoint Zealot Overunner's Avatar
    Join Date
    Mar 2004
    Location
    Sweden
    Posts
    180
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    While the framework certainly seems interesting, I haven't found ANY kind of access control. Or should I use the Plugin-thing to implement my own?

    Has anyone figured out how the Action <-> View <-> Template should be used?

  11. #36
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    > I fail to see anything really new, revolutionary, different, or even interesting here that would make a
    > professional even consider this.

    What is new and revolutionary about the Zend Framework is that one of it's core adjectives is colaboration from within the community, and from those who are at a higher level, ie Those that develop with PHP and who are in a position within some of the larger businesses to actually make concrete business dicisions.

    Bringing those poeple on board says a lot for Zend and their Framework in my view - proberly even more so than the quality of the actual framework it's self, as it stands at the moment it's not a bad piece of programming.

    Don't so much take the view point of the framework from a developers point of view, but from a business point of view, and what returns you may get from investing time and money - training developers to use the framework for example - into it.

    It's early days yet, and to be honest with you, it's still too early to say anything constructive either way, about it just now. No one for certain will know if it's a good or bad thing until they've actually developed not one, but several applications with it.

    Be patient.

  12. #37
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    > Has anyone figured out how the Action <-> View <-> Template should be used?

    Going to spend some time looking at it tomorrow, let you know what I think once I've digested it all

  13. #38
    What a twist! Kings's Avatar
    Join Date
    Jul 2002
    Location
    The Netherlands
    Posts
    954
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Overunner
    Has anyone figured out how the Action <-> View <-> Template should be used?
    http://wiki.cc/php/Zend_Controller has some information.
    Dennis Pallett - NoCertainty - My Personal Weblog
    The Web Network: ASPit | PHPit | WebDev-Articles
    Blogs: TalkFones | Holidayzer | PHPit Blog

  14. #39
    SitePoint Wizard dreamscape's Avatar
    Join Date
    Aug 2005
    Posts
    1,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dr Livingston
    What is new and revolutionary about the Zend Framework is that one of it's core adjectives is colaboration from within the community
    What? That is typically a core philosophy of any open source project.

    Getting major players involved, that is something a bit new to PHP. I'm already pretty excited about IBM's Service Data Object extension for PHP (which is a collaboration between Zend and IBM), and its still at an early stage. I really hope they, Oracle, and others bring some of their best minds to collaborate on the framework too.

    But I'd not really say that's revolutionary. Just look at some of the more highly regarded Java open source projects, or hop over to IBM's open source developerWorks site. Enterprises have been involved in open source for years, but now we are starting to see them get involved with the PHP community and Zend, which is wonderful, but hardly revolutionary.

  15. #40
    SitePoint Guru
    Join Date
    Jun 2002
    Posts
    617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I better get used to this Zend framework stuff, am used to writing everything myself, which is why I could never get on with asp.net.

    I guess this sort of thing is the future of business related web dev?

  16. #41
    SitePoint Zealot TheTank's Avatar
    Join Date
    May 2003
    Location
    Houston, TX
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    another new framework: code igniter Seems like a smaller footprint but I haven't gotten any further tha looking through the documentation.
    I think sometimes I dream in code.

  17. #42
    SitePoint Zealot
    Join Date
    Oct 2004
    Location
    Worcester
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Overunner
    Has anyone figured out how the Action <-> View <-> Template should be used?
    I've written up my ideas on my site (www.akrabat.com)

    I've stuck up my example code too, which I think works...

  18. #43
    SitePoint Zealot
    Join Date
    Oct 2004
    Location
    Worcester
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Archives of the fw-general list are now available at http://www.zend.com/lists/fw-general/, though they say that they'll be integrated into http://framework.zend.com at some point.

  19. #44
    SitePoint Addict timvw's Avatar
    Join Date
    Jan 2005
    Location
    Belgium
    Posts
    354
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ticksoft
    I better get used to this Zend framework stuff, am used to writing everything myself, which is why I could never get on with asp.net.
    So you wrote your own operating system and webserver too?

    Quote Originally Posted by ticksoft
    I guess this sort of thing is the future of business related web dev?
    Afaik, this is not only valid for web dev.. It has always been like this, and i don't see it changing in the near future (if ever).

  20. #45
    SitePoint Guru Nick Carlson's Avatar
    Join Date
    Aug 2003
    Location
    Denver
    Posts
    644
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dr Livingston
    Wow...

    That's very constructive of you to make that comment, not

    I certainly can't comment on ZF as it's too early but I would wager a bet that for the long haul, Zends framework has more potential that Cake PHP has.
    Sorry, that was a little rude of me now that I think about it.
    ncarlson.net - a programmer's dystopia

  21. #46
    I &lt;3 Internet Tekime's Avatar
    Join Date
    Dec 2003
    Location
    Maine
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure I'll have a chance to dabble with this anytime soon, but I'll be keeping an eye on this thread. I really enjoy using and developing my own framework, but it's an absolutely different approach than this.
    Scriptalicious SEO Scripts
    Save 20% with coupon code SPROCKS


  22. #47
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    Shorewood, IL
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by thr
    ...CakePHP is supported by.. eh... hmm..*looks at black void*
    Thr,
    Without knowing who or what is backing CakePHP you are a little out of place with this comment.

    Quote Originally Posted by Dr Livingston
    ...but I would wager a bet that for the long haul, Zends framework has more potential that Cake PHP has.
    Dr Livingston,
    While I do not agree with using the POS comment above, I will take that wager with you, contact me and we will make one.

    I can guarantee you that CakePHP will be around much longer then some here think. Our community grows daily as can be seen on the google groups site which as of this post is sitting around 1020 (http://groups.google.com/group/cake-php/about)

    We will have our first stable release within the next week if we do not have anymore bug reports, then our roadmap takes us to 1.0.
    And it is obvious people are downloading the framework (http://cakeforge.org/frs/?group_id=23&release_id=65)

    Also many large corporations are adopting CakePHP as their PHP framework of choice. So you can attempt to push us aside all you want, but we will continue to support the community that has been supporting us.

    No big hype with our project, we let it speak for itself.
    /**
    * @author Larry E. Masters aka PhpNut
    * @url CakePHP Rapid Development Framework
    */

  23. #48
    SitePoint Guru thr's Avatar
    Join Date
    Jun 2003
    Location
    Sweden
    Posts
    664
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by 1PhpNut
    Thr,
    Without knowing who or what is backing CakePHP you are a little out of place with this comment.
    Well I've been reading some on your site, etc. and I couldn't find any link to any major company suporting you - care to point me in the right direction if I've missed something, but I doubt you got partners that can match IBM and Oracle.

    Quote Originally Posted by 1PhpNut
    Also many large corporations are adopting CakePHP as their PHP framework of choice. So you can attempt to push us aside all you want, but we will continue to support the community that has been supporting us.
    Name one then?

  24. #49
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    > So you can attempt to push us aside all you want, but we will continue to support the community that
    > has been supporting us.

    Not so much of an attempt - I actually did push it aside

    But seriously though, I was only making a valid comparison between the two, the fact that Zend have gone and got some heavy weights makes more of an inpact, that's all;

    But it's an inpact that you can't simply ignore

  25. #50
    SitePoint Guru
    Join Date
    Jun 2002
    Posts
    617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by timvw
    So you wrote your own operating system and webserver too?
    Nah, just I never use stuff like Pear/Cpan and write all my own systems for PHP like sessions, image uploading/manipulation, database layer, caching, form handling etc... never done it any other way. It's a control thing, don't feel responsible for code when it relies on third parties and my experience of frameworks so far have been annoyance at restrictions or system overhead.

    Quote Originally Posted by timvw
    Afaik, this is not only valid for web dev.. It has always been like this, and i don't see it changing in the near future (if ever).
    Well I guess I better get learning them.


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
  •