1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Getting Started with XenForo/MVC Frameworks

Discussion in 'XenForo Questions and Support' started by James, Feb 17, 2011.

  1. James

    James Well-Known Member

    OK so I know basic-intermediate PHP. I know functions, I know variables, I know arrays, I know classes.. blah blah.

    Where can I get started with creating add-ons for XenForo? I've got my XF locally set up via Zend Studio on my localhost, but I want to start tearing it apart.

    The problem I have is that I'm not used to MVC frameworks, I have no idea what's meant to be in a model, a view or a controller and the only definition I could give is a Google'd one.

    Any ideas on where I can get started, hopefully with some reference to XenForo?
     
    The1LT and Tigratrus like this.
  2. Tigratrus

    Tigratrus Well-Known Member

    Likewise. Really interested in any info anyone can provide along these lines.

    I've got most everything setup on my localhost, though I'm just starting to dabble with Zend/Eclipse. I'm really liking Coda as an alternative to Dreamweaver though.
     
  3. Ajaxboy

    Ajaxboy Active Member

    Model view controller, separates presentation from design and from the coding.. for example.. model is the dealings with database... and such.. view has to do with the templates.. and controllers are the handlers of actions/pages etc. Hope this definition makes it easier to understand.
     
  4. rEd86

    rEd86 Active Member

    I'm in the same boat. Experienced programmer that's new to the MVC model and wanting to get up to speed quickly so I can create some hard-core plugins so xenForo can replace our existing platform that's over 8 years old and showing its age. (forums would be a new feature we would introduce)

    --Ed
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

  6. Kier

    Kier XenForo Developer Staff Member

  7. Mikey

    Mikey Well-Known Member

    James and GofD like this.
  8. Kier

    Kier XenForo Developer Staff Member

    It's worth noting that MVC is not a hard-and-fast-set-in-stone approach when it comes to web application development. If you ask different people, they will give you different answers for what components belong in the model and which in the controller or the view. XenForo opts for a 'skinny controller' approach, where our controllers are very simple and push most of the work off to the model as it can be easier to reuse code like that.
     
  9. James

    James Well-Known Member

    So if MVC is interpreted differently depending on the project, how does XenForo approach it?

    What does XenForo store in the model, view and controllers?
     
  10. rEd86

    rEd86 Active Member

    That was the reason I asked about the XenForo approach to MVC in my tutorial request. I don't want to stray too far from the way the team here is approaching it so my plugins are aligned with the direction of future releases. (and other plugins)

    I was looking for a way to get up to speed quickly but it looks like good old fashion trial and error is going to be the best way to cut my teeth! :)

    --Ed
     
  11. James

    James Well-Known Member


    (Source: http://net.tutsplus.com/tutorials/other/mvc-for-noobs/)
    Would it be accurate to say XenForo uses the same structures?
     
    ninja-9 likes this.
  12. Tigratrus

    Tigratrus Well-Known Member

    For what it's worth, I'm getting some use out of David Powers' "PHP Object-Oriented Solutions". Not terribly far into it yet, but so far I'm liking his writing style and his focus on using actual code usage to explain concepts rather then getting bogged down in the typical car/fruit/etc analogies when discussing OOP concepts. I've always hated tech books that get so far afield with their attempts to make an explanation "accesible" that their analogy gets heavily in the way of understanding the actual concepts. ;)

    Anyway, I remember most of the OOP basics from years ago when I was working with Delphi II and III, but it's proving to be a good refresher as I bring myself back up to speed before diving into Xenframework/ZendFramework.
     
  13. Nasr

    Nasr Well-Known Member

    Maybe this might be of help in some way.
     
  14. ninja-9

    ninja-9 Member

Share This Page