We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35176
    • 193 Posts
    Why did ModX choose to store the documents in a database, instead of simply making modx a front-end to standard html, css, js, etc files?

    That way, developers could simply edit the back-end files if they wanted to. Seems there would be other advantages as well.

    True, we can accomplish that with the "static" document type on a one-by-one basis. But overall the system is not designed around the file architecture.
      jealousy<>love
      • 1169
      • 312 Posts
      Simple answer MODX uses a database to store most of its information but you can use files if you so wish.
      One way is to use an include snippet to reference your files.
      some developers use this only for development and deploy to a database.
      A database is safer than files in general.

      Checkout the various tutorials.

      If you really want a file system CMS I would try something else as the developers have chosen to work with a database.
        DEVELOPMENT ENV:- Ubuntu 12.04 | MODx Revolution 2.2.8 | LAMP 2i Apache 2.2.22 | Php 5.3.10 | Mysql 5.5.31 MySQL client version: 5.5.31
        • 3749
        • 24,544 Posts
        A database is also pretty handy when you want to search. wink
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 28215
          • 4,149 Posts
          Quote from: BobRay at May 02, 2011, 05:06 PM

          A database is also pretty handy when you want to search. wink

          *ding!*

          You ever tried searching files via filesys? Or iterating across aggregates of different collections of them? tongue
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 17499 ☆ A M B ☆
            • 872 Posts
            Quote from: splittingred at May 02, 2011, 05:08 PM

            You ever tried searching files via filesys? Or iterating across aggregates of different collections of them? tongue

            Revo absolutely needs files based chunks and snippets.
            Since it is not already there, i assume that it is a difficult feature to implement efficiently. And probably not a priority for you, the core team ? :p
              • 3749
              • 24,544 Posts
              I don’t think it would be that difficult to implement, but since an "include" snippet is an easy workaround for chunks and you can "include" code in snippets, I don’t think it’s a high priority.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 7253
                • 97 Posts
                One day, when I’m only working one job, I’m going to get the MODx FUSE Filesystem thing back up and running. Which will magically fix this (but only if you’re developing on Linux or Mac).
                  • 17499 ☆ A M B ☆
                  • 872 Posts
                  Quote from: dflock at May 02, 2011, 06:02 PM

                  One day, when I’m only working one job, I’m going to get the MODx FUSE Filesystem thing back up and running. Which will magically fix this (but only if you’re developing on Linux or Mac).

                  How sad! :’(

                  Quote from: BobRay at May 02, 2011, 05:57 PM

                  I don’t think it would be that difficult to implement, but since an "include" snippet is an easy workaround for chunks and you can "include" code in snippets, I don’t think it’s a high priority.

                  What about caching ?
                  What about converting users to MODx ?

                    • 3749
                    • 24,544 Posts
                    Quote from: lossendae at May 02, 2011, 06:04 PM

                    Quote from: BobRay at May 02, 2011, 05:57 PM

                    I don’t think it would be that difficult to implement, but since an "include" snippet is an easy workaround for chunks and you can "include" code in snippets, I don’t think it’s a high priority.

                    What about caching ?
                    What about converting users to MODx ?

                    I’m not sure what you mean about caching. You can already control whether a chunk or snippet is cached -- with or without it’s code in a file.

                    As for converting users, I think making the product bug free, updating the docs, making the install more reliable, converting Evo add-ons, and allowing you to update MODX from the Manager are more important for that. I didn’t mean to imply that doing files was a bad idea, just that there are other things that have a higher priority right now.
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 1169
                      • 312 Posts
                      @deflock

                      I took a look at modx fuse and found @shamblet has done some work on this and released an extra for Evo or Revo have not tried same but here is a link
                      http://modx.com/extras/package/modxfsphp

                      I have been using the ’include snippet’ with great success for dev work. To my knowledge your files could then be under a local or even remote Git or other version control system. I have personally not tried this yet but may be testing soon. At present I just comment out my changes till happy.
                        DEVELOPMENT ENV:- Ubuntu 12.04 | MODx Revolution 2.2.8 | LAMP 2i Apache 2.2.22 | Php 5.3.10 | Mysql 5.5.31 MySQL client version: 5.5.31