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

Xenforo codebase less plugin-friendly

Discussion in 'XenForo Development Discussions' started by Claudio, Oct 17, 2012.

  1. Claudio

    Claudio Well-Known Member

    I was reading an opinion of Ian (DBTECH):

    What do you think about this? Do they need to understand XF software first or his opinion is right?

  2. Cory Booth

    Cory Booth Well-Known Member

    bubbl3, kkm323 and David_ like this.
  3. Forsaken

    Forsaken Well-Known Member

    He's complaining about extra steps required to develop an add-on; XF is much more robust than vBulletin is, and much easier to develop for if you take the time to work with it.
  4. Claudio

    Claudio Well-Known Member

    I don´t know anything about programming.

    So he is right? is more difficult to develop plugins for XF than VB5?
  5. Forsaken

    Forsaken Well-Known Member

    It depends on who is doing the developing; for me and most developers I know, they prefer XF by far.
    Bob likes this.
  6. SchmitzIT

    SchmitzIT Well-Known Member

    If taking two extra steps equals more difficult, then sure.

    Let's put it this way. If you need something changed or added to your house. Would you prefer just starting to add new components together and hope the foundation supports it, or would you sleep easier knowing that a systematical approach and taking the time to ensure that your new additions meet the architecture ensures that your new addition conforms and is done properly?

    (Not the best analogy, perhaps. Even if you follow the methodical approach, a guy who doesn't know what he's doing might still mess things up, and a real professional handyman/coder could still do a great job without the architecture, but hopefully it gives you some kind of an idea).
    bubbl3, kkm323, jmurrayhead and 2 others like this.
  7. Jeremy P

    Jeremy P Well-Known Member

    More difficult? Sure.
    But it's worth going the extra mile.

    XenForo's architecture allows for powerful addons and third party apps to be developed.

    I used MVC before I used XenForo, so I picked it up pretty fast. I understand how it could be a bit more intimidating, but I am in favor of it. The code separation really helps with organization and makes projects easy to manage. I can only imagine the PHP behind vBulletin plugins are a bit more like spaghetti code. In fact, I'd say all vB5 code looks something like spaghetti code. :rolleyes:

    To ease setup time for developing XF Addons I created an "application skeleton" with a Listener file, Controller, Model, DataWriter, and Installer. It comes it handy to get going on new projects.

    So sure, with XF it's a bit more complicated, but that's on purpose, and with good reason. Their conventions encourage well-coded addons, imo. And you get used to it, and once you do, it is a dream to work with.
    bubbl3 and Chris D like this.
  8. Chris D

    Chris D XenForo Developer Staff Member

    I have no basis for comparison because before I used XenForo I'd never done any PHP development at all. But personally I find it a pleasure to work with. I actually try to take an interest in PHP code in general now so I have a habit of looking at other people's PHP scripts. And my head hurts and eyes bleed when I look at non MVC code.

    XenForo could be infinitely more difficult than vB5. But who cares, because it's infinitely better.
    Insy and Jeremy P like this.
  9. Insy

    Insy Well-Known Member

    He's right for small addons only (it takes longer to start if you don't have a skeleton), the development of new applications or complex addons in XenForo is much much nicer than in vBulletin :) DBTech has a long experience in vB development, it is clear that after the development of addons via hooks, developing using MVC framework takes longer to start. And it's faster then.

    I have developed several addons for vB 3.x/4.x (for internal use only, you will not find anything on vB.org) and I could do everything via the admincp, I still have difficulties with XenForo because I need to create a bunch of files as DBTech mentionned, but a developer may have fun to develop for a so well designed script.
    Jeremy P likes this.
  10. Digital Doctor

    Digital Doctor Well-Known Member

    dbtech hasn't been keen on Xenforo for a long time.
    It might be easier for certain experienced vB coders to keep with vB coding than to learn XF coding.
    I thought alot of vB coders were waiting to see vB5 stabilize before making any addons.
    Who knows when vB5 will be a stable platform ?
  11. Insy

    Insy Well-Known Member

    No ETA known.
  12. Rodrigo Farcas

    Rodrigo Farcas Active Member

    Let's not forget VB5 is pre alpha !
    Insy likes this.
  13. Insy

    Insy Well-Known Member

    Even not. An alpha release should have no more features and they still add new features according to the bug tracker.
  14. Robbo

    Robbo Well-Known Member

    Haha what a joke. Any good programmer will see the benefits of how XF works. It is properly structured and easily maintained (mostly). Having to do things in the ACP is a pain but hey, we made a CLI tool for that and for template I made DevTools for that... but hey amateurs will always like procedural style code more (just because something uses the word class doesn't make it OOP).
    Bob and Insy like this.
  15. Bob

    Bob Well-Known Member

    Insy and Jeremy P like this.
  16. Sadik B

    Sadik B Well-Known Member

    Point 1, creating a new route Prefix is only needed if you want a separate route. In most cases you could just extend the available routes, so step 1 and 2 he refers to are not mandatory. For instance, I can extend member or account route to extend or add any new member functionality. Same goes for thread, forum routes etc. New routes I believe should only be defined if you are developing a large addon, something like a shopping cart or a gallery etc. in which case 2 small steps doable within 5 minutes are no price to pay for the maintainability benefits which xenforo provides.

    Step 3, 4 and 5 are almost always required but they are laughably easy compared to VBulletin's hook system. Plus the lines of code required in XF is almost always comparatively less for the same function. Add to that the extensibility of core functions is very easy, so between VB 3, 4 and XF, Xenforo wins hands down.

    VB5 I have no idea... The HTML output was revolting... and I had no desire to see their code after what some very experienced professional devs had to say about it's code.
    Insy likes this.
  17. kkm323

    kkm323 Well-Known Member

    So as I recall vb3 add-on doesn't work for vb4, and vb4 add-on doesn't work for vb5...
    Now that's not a waste of time! interesting :unsure:
    Insy likes this.

Share This Page