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

Implementation Details

Discussion in 'XenForo Pre-Sales Questions' started by cakepie, Oct 5, 2010.

  1. cakepie

    cakepie New Member


    A couple questions:
    1. Does xenForo use "ORDER BY timestamp LIMIT ..., ..." for threads and forums?
    2. Does xenForo load all forum info and permissions on every page?
    3. Is it fully based on the MVC pattern?
  2. Jaxel

    Jaxel Well-Known Member

    What exactly is this MVC thing people talk about? And why is it so important?
  3. Brogan

    Brogan XenForo Moderator Staff Member

  4. Blandt

    Blandt Well-Known Member

    Zend's model view - controller

    Not your typical vanilla forum ;)
  5. Kier

    Kier XenForo Developer Staff Member

    1. There are some places where it does, but performance has been carefully tweaked.
    2. No.
    3. Yes.
    Nizar Meddeb likes this.
  6. cakepie

    cakepie New Member


    1. Could you elaborate on "some places"? In particular, is it used on ".../threads/...12345/page-1234" and ".../forums/...123/page-12"?
  7. Carlos

    Carlos Well-Known Member

    Its very important because its becoming a standard. Facebook started that trend, many companies are following suit - XenForo is one of them.
  8. Jaxel

    Jaxel Well-Known Member

    I dont understand how the MVC model is any different from the way we've been programming for years. User clicks something, program calculates stuff, results are displayed. This is standard stuff.
  9. Shadab

    Shadab Well-Known Member

    The MVC design pattern was conceived in 1979.
    That's way before you, me and even the world-wide-web were born. :)

    IMO, this has mostly to do with the separation of concerns. So you don't mix the business logic (ie, the processing part) with the presentation layer. If you keep everything cleanly separated and not tightly coupled, you can represent your data using multiple views quite easily. A good example is the "mini user stats" which supports html, xml and json views. (See Kier's post). And ideally, the controller and view don't have to know how the "data" is actually stored in the model. So for example, if you are caching something in the filesystem and you want to change it to save in a database, memcache, etc. you wouldn't need to modify the view and controller parts of your application that use the cached data since they don't care how & where it gets stored.

    I hope I didn't say anything wrong. (The tension & excitement is enormous.)
  10. Carlos

    Carlos Well-Known Member

    I didn't know that!

    But what I meant, was MVC has been getting a lot of attention lately because Facebook started to use them. I'm pretty sure that companies only just realized what you can do with the technology, so the rise of popularity has garnered more uses for it.
  11. Jethro

    Jethro Well-Known Member

    Wouldn't this simply be a reiteration of the three tiered approach to software design? UI, business logic, db processing.
  12. cakepie

    cakepie New Member

    Could you please leave my thread alone? Go troll somewhere else, please.
  13. Mike

    Mike XenForo Developer Staff Member

    No and yes, respectively.

    They're not really trolling. It's simply an expansion on MVC.
  14. feldon30

    feldon30 Well-Known Member

    You will once you look at the XenForo code.

    There's isn't a function which takes some data, formats it, and displays it. You won't find MySQL queries mixed in with code that handles the display of information. Everything is scattered out into hundreds of functions all linked together so that if I want to change how XenForo does *anything*, I can hook in and change it.

    vBulletin has what, 800 hooks? And many people say it's not enough, and often we have to do ugly hacks like add another SQL query because we couldn't just extend the existing one with 1 more column, or we have to wait until the HTML is generated, and then try to parse it and add to it. XenForo essentially has infinite hooks.

    Honestly, the first time people look at XenForo and say 'ok, how do I write mods for this?' they are going to be scared. But hopefully as documentation appears, and other plugins become available, we can learn from it. Also, it's been recommended to install an IDE (Integrated Development Environment) which actually reads in all the XenForo PHP files and understands the links and relationships between the files. You can view what XenForo is doing as a branching tree, instead of trying to cross-reference a stack of flat PHP files all including and extending each other.
    Kier likes this.
  15. cakepie

    cakepie New Member

    Does deleting the second post in a thread of 1'000'000 posts generate 999'999 queries to update their positions?

Share This Page