SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Guru rageh's Avatar
    Join Date
    Apr 2006
    Location
    London, Formerly Somalia
    Posts
    612
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    what is the best book on Model-View-Contoller architecture

    Hello everybody,

    Can someone tell me the best book explaining Model-View-Contoller architecture?

    Thanks in advance

    Mohodn
    Last edited by rageh; Apr 10, 2009 at 20:13.
    ------------------

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    MVC is a design pattern, an idea, a general guideline. It's not language specific and there's not a single way to do something MVC-like in PHP. If you want to learn it, read the description of the pattern online, and pick a PHP framework that's based on the MVC pattern, and look through some of their sample apps.

  3. #3
    PHP Guru lampcms.com's Avatar
    Join Date
    Jan 2009
    Posts
    921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's not such a difficult subject that it would need its own book.

    The best book on design patterns is this:
    Design Patterns: Elements of Reusable Object-Oriented Software

    Look for it on amazon.com
    it will help you understand many design patterns.

  4. #4
    SitePoint Guru rageh's Avatar
    Join Date
    Apr 2006
    Location
    London, Formerly Somalia
    Posts
    612
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    MVC is a design pattern, an idea, a general guideline. It's not language specific and there's not a single way to do something MVC-like in PHP. If you want to learn it, read the description of the pattern online, and pick a PHP framework that's based on the MVC pattern, and look through some of their sample apps.
    Thanks Dan. I know it is not a language but rather a design pattern. There are many articles on the web about this. But their explanation find you wanting. Some of the articles are written by newbies. So they just leave you more confused than before. I have seen MVC application that is totally confusing the way they have written. So I don't want to follow any example. I want a good examples.

    I want to get a good grap of the issue. Any example stuff more complex than the customary, I hasten to add stupid, "hello world" which is childish to begin with because nobody want to write that crap. I like a good application example that has all the intricacies of a web application.i.e login, registeration, database connectivity issues, session handling ans so on and so forth. I have seen the examples by the codeignite but I don't like Codeignite anyway. So I am looking for other resources or books on the issues.
    ------------------

  5. #5
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,047
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    You should also be looking for a book that explains it in terms of web architecture. The implementation of a MVC pattern between web and software development is very different. So different that I don't really even consider them to one of the same. People just like to term it MVC, but really its not a true MVC. So reading software app books in terms of MVC will probably make you even more confused. The web app implementation of the controller acting as the bridge between the view and model isn't a true application of MVC in terma of software architecture. However, it seems to be the common implementation when it comes to the web realm. So look for something that explains it in terms of the web.

  6. #6
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    There was only one book which explained the concept of application layers to me in a way I finally understood.

    Patterns of Enterprise Application Architecture (POEAA) by Martin Fowler.

    Hard back, expensive but well worth it. Half of the book is meant to be read word for word like a novel. In this he explains the different application layers. This certainly explained the necessity for MVC but also sent me away the mental building blocks (descriptions and handles) to appreciate when not to use MVC.

    The other half of the book contains a lookup of design patterns each with a narrative explaining how one pattern is similar to others, and yet how they differ. There are numerous cross links between patterns and it is very easy to browse your way through the pattern library in a way which reminded me a lot of hypertext.

    Most of the code examples can easily be followed because they are in Java and are not too dissimilar to PHP5 now.

    About half of these patterns deal quite thoroughly with the model layer.

    This was the only book I ever came across that fully explained MVC to me, in a way where I went *ding* I get it.

    But we are all learn differently.
    Last edited by Cups; Apr 11, 2009 at 03:35. Reason: tried to make hypertext ref more logical

  7. #7
    SitePoint Enthusiast
    Join Date
    May 2009
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is anyone building their own? And if so.. what might be good practices?

  8. #8
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Common practices are documented in the PHP Application Design forum, discussions go back for years ... search there - there is plenty of argument. What is best practice for one coder is not best practice for another.


Tags for this Thread

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
  •