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

XF / Zend / PHP crash course for Ruby/Rails developers?

Discussion in 'XenForo Development Discussions' started by Razasharp, Jul 31, 2012.

  1. Razasharp

    Razasharp Well-Known Member

    Can anyone recommend any screencasts or books which would help a Ruby/Rails dev quickly pick up PHP for use with XF (and Zend)?

    Or does anyone have any tips?

    I've completely forgotten the little PHP that I knew so need to brush up on it, as everything looks gobbledygook to me :censored:
     
  2. Razasharp

    Razasharp Well-Known Member

    Ok I've gone through most of these which I found very helpful: http://www.youtube.com/playlist?list=PL5B130A55CD98BA59&feature=plcp

    And it seems these are the PHP/Ruby equivalents:

    PHP
    1. $this
    2. ->
    3. __construct
    4. static
    RUBY
    1. self (tho we generally don't need this unless it's ambiguous)
    2. .
    3. initialize
    4. (class variables or methods)
    And I started to go through the Zend documentation http://framework.zend.com/manual/en/learning.quickstart.create-project.html but it seems XenForo doesn't seem to have the same directory structure - so I thought I'd better hunt out some guides here first.
     
  3. Jeremy P

    Jeremy P Well-Known Member

    Knowing ZF doesn't actually help a ton because XenForo has pretty much created it's own wrapper/framework around it. What will help is understanding MVC, though it's my understanding Rails is an MVC framework for Ruby so you might be ahead of the game there.

    Just try to grasp PHP concepts and maybe go through some simple tutorials for XF working out how to handle each piece of an application, the model, the view, and the controller. XF views are usually just templates but addons can have view classes that change the default view behavior.

    There were some good beginning tutorials here but I haven't been able to find them. http://xenforo.com/community/threads/how-i-created-my-external-pages.14332/ this might be of some help with setting up routes to controllers and returning a view.
     
    Razasharp likes this.
  4. Razasharp

    Razasharp Well-Known Member

    Thanks Jeremy.

    Yeah, Rails is MVC, and I would imagine Zend shouldn't be too hard to pick up (as most frameworks seem to borrow heavily from Rails anyway). However like you said, XF seems to have done things a little differently so I need to work all that out. Jake has been a massive help already, and now that I know I can at least get the basic structure of the site done with XF, I can install the dev environment and have more of a play.

    Thanks again for your post :)
     
  5. Razasharp

    Razasharp Well-Known Member

    Anyone else have any more tips? Thanks in advance.
     

Share This Page