We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7575
    • 85 Posts
    Hi,
    I have a growing site (personal project in my free time) and am always renewing it, looking for a better way to manage it.
    I came from pure html php coded over joomla 1.0 to joomla 1.15 and now I am verry interested in MODX,
    Because I find that the cms needs to do just what I want and not load or do all kinds of other stuff.

    I decided to go for revolution (I only plan to switch in a year or so...)
    And really get to know this CMS for future use.

    I will be coding a lot of functionalities myself.
    I get the pure PDO calls but I don’t really see why I should use xPDO (or understand XPDO for that matter)

    I have read a part of the documentation of xPDO but I can’t get my head around it.

    My site is based on a database of events (mostly tournaments in all kinds of disciplines) added/edited by users.
    It is a kind of database/calendar for everyone that is looking for tournaments.


    Now finally my question,
    DO I need xPDO or not?

    If I need to give more information feel free to ask.
    (oh yes, I can use php,sql,css,html,javascript,...)
      www.tornooi.net online database for (sport) events in dutch.
      To be redesigned, rewritten to modx with multiple languages...
      ANY help appreciated, I cannot offer money but I can offer free advertising on the site. just message me.
      • 22827
      • 129 Posts
      No you don’t need it.

      Should you use it? Yes.

      Why? Because it will make your life easier. Because it will ensure consistancy is maintained.

      Don’t worry, if you are coming from Joomla, you will get everything done in about 25% of the time it would normally take if you use modx, so that leaves plenty of time to figure out xPDO.

      Welcome to modx, I think you are really going to like it.

      Cheers,

      Paul
      (Ex Joomla PoW)
        • 1169
        • 312 Posts
        The reasons I have read:-

        Code will be able to use other db’s

        Code will be easier to maintain.

        xPDO is a wrapper (hides all the complexeties of PDO)

        See :-
        http://modxcms.com/forums/index.php/topic,47278.msg278875.html#msg278875

        for elegance of xPDO.
          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
          • 6437
          • 157 Posts
          Will ModX ever be upgraded to use a more common data mapper solution such as Doctrine 2.0? The concept behind xPDO is great, but ultimately I feel it’s a little limiting.

          DM
            • 28215
            • 4,149 Posts
            Quote from: DangerMouse1981 at Apr 22, 2010, 04:28 PM

            Will ModX ever be upgraded to use a more common data mapper solution such as Doctrine 2.0? The concept behind xPDO is great, but ultimately I feel it’s a little limiting.
            No; the core of MODx is built upon xPDO.

            You can feel free to use Doctrine, but MODx will not be based on other solutions. If you have percieved limitations, please state them here and list them as feature requests in our bugtracker. Thanks.
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
              • 3749
              • 24,544 Posts
              You might find this useful: http://bobsguides.com/revolution-objects.html. smiley
                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
                • 6437
                • 157 Posts
                Please don’t see it as a complaint - I didn’t mean it like that.

                I just don’t see the justification for devleoping bespoke solutions when there are servicable, if not better solutions available elsewhere - to a degree this goes against open source collabouration principles. If ModX embraced other frameworks and made use of the best practice they adopt development could move along more quickly and become specialised in the CMS area rather than "reinventing the wheel".

                Is this because of plans to add a more commercial element to ModX in future?

                DM
                  • 4971
                  • 964 Posts
                  OpenGeek will definitely be here to answer you better but...
                  I think he tried a lot of ORMs like Prado, Propel, QCodo, etc
                  (dont know if Doctrine existed when he did all these) and he
                  found that none of them were flexible enough or good enough
                  for what he envisioned that MODx could do in the future.

                  So he wrote xPDO!!

                  I am also starting to learn xPDO in preparation for switching to
                  Revo... and it is a little intimidating for me... but I hope
                  that after Dallas all that will be gone and we all can develop
                  on top of xPDO...
                    Website: www.mercologia.com
                    MODX Revo Tutorials:  www.modxperience.com

                    MODX Professional Partner
                    • 17499 ☆ A M B ☆
                    • 872 Posts
                    +1 charliez


                    Over a year ago, I had the idea of recreating MODx as an OO framework. I explored the various PHP frameworks to see if any could help fast-track an implementation.

                    My attention was first captured by Propel1, which can help generate fairly complex OO data models from relational data structures. I soon found out though, that porting a project designed originally for Java was not the right approach for the performance goals I had in mind. Many PHP servers are not on enterprise-level hardware needed for acceptable user experiences with complex enterprise-driven design patterns, not to mention the countless shared servers in existence. The work done in creating this Propel-prototype of an OO MODx though helped refine my vision.

                    I continued searching but quickly concluded what I sought didn’t exist. At that point I began to design and construct the foundation of what has come to power the new MODx core: xPDO2. xPDO is my attempt at rethinking object-relational management, with the idiosyncrasies of PHP in mind.

                    Six months later, I deployed my first live xPDO project, a custom OO data model used inside a MODx site. Shortly thereafter, I rewrote my original Propel-prototype on top of xPDO (referred to as “the new core”). I recently deployed an actual site on the new core with exciting results: almost complete compatibility with existing MODx components, running on a totally new, OO core engine. This new core solidly lays a foundation for a future as an enterprise Content Management Framework, but maintains the user-friendliness and ease of development that people love about MODx.

                    The rest is on the blog: http://modxcms.com/about/blog/jcoward/transforming-modx-oo-mvc-orm.html

                    Now, i don’t know if he tested doctrine at the time or since.
                      • 24935
                      • 160 Posts
                      According to xpdo.org, Doctrine was considered, but it wasn’t PHP4 compatible:
                      "I’d like to extend a special thanks to Andrea Giammarchi for his PDO for PHP 4 implementation that inspired me to begin coding this project. If not for PHPClasses.org and the inspiration I found in Andrea’s work there, the OpenExpedio project would likely not exist, as I probably would have invested my time in working with PHPDoctrine."

                      Of course, now that time has gone by xPDO 2.0 is PHP5 only also. However, I think you will find xPDO to be a good tool. I am using xPDO in a sizable open source project (a CMDB that is still in alpha), and I may also use it in combination with AMFPHP for some Flex projects. I studied Doctrine and several others, but decided that xPDO was a better fit. Hopefully others will discover it and use it in os projects, since it really is a good piece of work.