SitePoint Sponsor

User Tag List

Page 4 of 4 FirstFirst 1234
Results 76 to 86 of 86

Thread: UML, PhP 5, MVC

  1. #76
    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 photo312
    I would like to direct all to this article where Joe Stump talks about implementing a MVC solution for a php 5 project.

    The link to the article series is here:

    http://www.onlamp.com/pub/a/php/2005...mvc_intro.html

    I am curious as to the reason why he put this code in the class FR_Object

    I dont understand the toArray function. What is that used for?
    Just seems like what other frameworks call a DataSpace, toArray() is just for casting the collection of "stuff" into an array, useful for using PHP array_* functions to merge/diff collections. Though that specific implementation does seem rather odd, as it recurses as it goes along. Haven't read enough of the article to see why it does that.

  2. #77
    SitePoint Guru dagfinn's Avatar
    Join Date
    Jan 2004
    Location
    Oslo, Norway
    Posts
    894
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mikehowell
    ...I would not hire the agile over an equally qualified turtle because agile has more chance more chaotic.
    With all due respect, I'm not sure I would hire someone who has as much chaotic in one sentence as you do.
    Dagfinn Reiersøl
    PHP in Action / Blog / Twitter
    "Making the impossible possible, the possible easy,
    and the easy elegant"
    -- Moshe Feldenkrais

  3. #78
    SitePoint Addict
    Join Date
    May 2003
    Location
    The Netherlands
    Posts
    391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by photo312
    And what do you think of that article series?
    I've read it rather quickly and I think you'll find much better examples of MVC implementation in PHP. Take a look at Advanced PHP Resources; specially the frameworks could help you understand what different approaches are out there.

    As for the article, and without wanting to start a rant about it, I'd say I personally (you have to be carefull these days) don't like using PEAR and/or Smarty and I'm not fond at all of deriving all my objects from a base one either.
    There’s more than one way to skin a cat.

  4. #79
    ********* Victim lastcraft's Avatar
    Join Date
    Apr 2003
    Location
    London
    Posts
    2,423
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi...

    Quote Originally Posted by mikehowell
    I think advocates of agile programming just look at things on an old, "If it works" mentality that was/is a dirty habit made very popular by Visual Basic 5/6.
    You don't know anything about it, do you? How old are you?

    It works for them but I wouldn't hire one of them for a private sector job with benefits.
    If I were you, I wouldn't apply to Thoughtworks, BP, Egg, Yahoo...

    yours, Marcus
    Marcus Baker
    Testing: SimpleTest, Cgreen, Fakemail
    Other: Phemto dependency injector
    Books: PHP in Action, 97 things

  5. #80
    SitePoint Evangelist
    Join Date
    Mar 2004
    Location
    Fort Lauderdale
    Posts
    522
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which OOP patterns would you most likely use with MVC and PHP5. I know there are many, but which ones stand out mostly?

  6. #81
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Depends really on implementation, but...

    1) Visitor ~ Composite (These two patterns go hand in hand with each other, marriage made in heaven)
    2) Decorator
    3) Factory
    4) Strategy
    5) Bridge

    Are the more common, and in my view, are the importantly influential patterns, but not to forget about the Observer as well

  7. #82
    ********* Victim lastcraft's Avatar
    Join Date
    Apr 2003
    Location
    London
    Posts
    2,423
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi...

    Quote Originally Posted by photo312
    Which OOP patterns would you most likely use with MVC and PHP5. I know there are many, but which ones stand out mostly?
    Do you have "Patterns of Enterprise Application Architecture" by Martin Fowler? It answers exactly this question. Though not just for PHP5 obviously.

    yours, Marcus
    Marcus Baker
    Testing: SimpleTest, Cgreen, Fakemail
    Other: Phemto dependency injector
    Books: PHP in Action, 97 things

  8. #83
    SitePoint Evangelist
    Join Date
    Mar 2004
    Location
    Fort Lauderdale
    Posts
    522
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have picked up the book "Advanced PHP Programming" by George Schlossnagle. It jumps into object patterns in the first chapters !

  9. #84
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PoEAA (Fowler) covers more of the domain patterns though - I have the same book myself, and generally a good read but it doesn't go far enough into patterns in my view

    There is a free PDF download of a book which covers several other patterns, PHP5 Power Programming I think it's called? Worth looking for it, or buy the print version from Amazon instead.

  10. #85
    SitePoint Evangelist
    Join Date
    Mar 2004
    Location
    Fort Lauderdale
    Posts
    522
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    where can I find that free PDF download? I saw that book at Borders - its good!

  11. #86
    SitePoint Evangelist
    Join Date
    Mar 2004
    Location
    Fort Lauderdale
    Posts
    522
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey I just did a search and I found it:
    http://www.phptr.com/content/images/...7149X_book.pdf


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
  •