We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26495
    • 4 Posts
    Hi, I am new to MODx and have been developing many applications in Jetbox and contributing to the code base. Jetbox is dead and the burden of maintaining all the security and tweaks that I have made to the core is getting burdensome to say the least.

    However, Jetbox is incredibly unique and uber customisable. So I was wondering would it be possible for MODx to do these things that I currently do with Jetbox?

    I have a client that uses Jetbox to manage over 3,000 records and each of these records has many to many and many to one relationships with other tables of information. It is a movie history application where for example a film can have many people involved with it. I have implemented a multi column sortable paging grid to manage the records with plans to add a ajax drop down filter as well.

    The other client has a site that sells seminars - basically Jetbox allows the client to add seminars with some core data and then assign venues with pricing for each venue. The public are then able to register and pay for each seminar at a particular venue and at checkout time they can register additional people and the total cost is calculated accordingly. Payment is made through a payment gateway and the admin and user is emailed a receipt and details of the seminar. The record is also inserted in the database and can be managed through the back-end Jetbox interface.

    If these types of functionality requirements are possible with MODx then I will be a dedicated convert. Even if they are not then I will be getting on the bandwagon as this looks like an excellent framework. (I program in ASP.Net C# for a day job but I can’t see it’s value for small clients)..

    Any advice guidance welcome

    Cheers Tim
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: seah0rse at Jan 30, 2007, 06:45 PM

      Hi, I am new to MODx and have been developing many applications in Jetbox and contributing to the code base. Jetbox is dead and the burden of maintaining all the security and tweaks that I have made to the core is getting burdensome to say the least.

      However, Jetbox is incredibly unique and uber customisable. So I was wondering would it be possible for MODx to do these things that I currently do with Jetbox?

      I have a client that uses Jetbox to manage over 3,000 records and each of these records has many to many and many to one relationships with other tables of information. It is a movie history application where for example a film can have many people involved with it. I have implemented a multi column sortable paging grid to manage the records with plans to add a ajax drop down filter as well.

      The other client has a site that sells seminars - basically Jetbox allows the client to add seminars with some core data and then assign venues with pricing for each venue. The public are then able to register and pay for each seminar at a particular venue and at checkout time they can register additional people and the total cost is calculated accordingly. Payment is made through a payment gateway and the admin and user is emailed a receipt and details of the seminar. The record is also inserted in the database and can be managed through the back-end Jetbox interface.

      If these types of functionality requirements are possible with MODx then I will be a dedicated convert. Even if they are not then I will be getting on the bandwagon as this looks like an excellent framework. (I program in ASP.Net C# for a day job but I can’t see it’s value for small clients)..

      Any advice guidance welcome

      Cheers Tim

      Tim, you may want to check out xPDO, an object/relational mapping tool and Active Record implementation that is being used to rewrite the MODx core. It features the PDO database layer, as well as emulated support for PDO API when PDO is not available on the PHP platform, reverse-engineering of existing databases into xPDO schemas (an XML file representing the data structures), and forward-engineering of scaffolding classes that take care of simple persistence tasks. But it allows you to utilize SQL to then fine-tune your model with relationship definitions and additional domain or business logic, above and beyond the generated scaffolding, to create a usable, object-oriented API for your database tables.

      I’m using it to run a variety of different database intensive web applications and sites, and we’re working towards making a visual model editor/management interface for future releases...there is now a dedicated forum here for discussing xPDO stand-alone or as it relates to MODx. And you can download packages and see some additional information at http://www.xpdo.org/. The documentation is still weak, but I am doing my best to alleviate that as soon as possible.
        • 26495
        • 4 Posts
        Thanks for that. Looks promising similar to Hibernate, nHibernate, Castle Project etc a database agnostic datalayer with persistence. So is that already in ModX or up and coming? I guess my need is really about is ModX able to manage custom recordsets for the purpose of storing and maintaining the data and/or being able to present that to registered users or to the public? I guess what it would mean is having a tab in the manager section with say "Payments" as a heading and then the ability to page or search through records in a grid below that.... Can this kind of think be done without hacking the core of ModX?

        Sorry if I am sounding like a total noob (I guess I am) shocked

        Thanks Tim
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          I have a three-part article and a demo of a simple database management module added to the MODx Manager on my sottwell.com site, see my sig for links and the guest Manager login. It uses Ajax. That site is running on the new core, by the way, but the Manager itself hasn’t been ported over yet.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 26495
            • 4 Posts
            Susan, This looks like the ticket. Many thanks. Do you have paging in your grids? Anyway, it looks great and shows that there is a place and a mechanisim within ModX to do these types of things. Thanks a lot - the number of posts proves that this project is alive and thriving... I also like your shopx and will be going for that. Cheers Tim
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: seah0rse at Jan 31, 2007, 07:27 PM

              Thanks for that. Looks promising similar to Hibernate, nHibernate, Castle Project etc a database agnostic datalayer with persistence. So is that already in ModX or up and coming? I guess my need is really about is ModX able to manage custom recordsets for the purpose of storing and maintaining the data and/or being able to present that to registered users or to the public? I guess what it would mean is having a tab in the manager section with say "Payments" as a heading and then the ability to page or search through records in a grid below that.... Can this kind of think be done without hacking the core of ModX?

              Sorry if I am sounding like a total noob (I guess I am) shocked

              Thanks Tim
              It’s part of MODx 0.9.7 alpha, which is circulating through the testing team at the moment, but should be available as a public beta shortly. In the meantime, Susan’s approach is perfectly valid and if it meets your needs, great. I was just trying to demonstrate that in the future, we are planning to add a Model management interface that will allow end-users to define and generate xPDO scaffolding classes to represent just about any kind of data they need stored to a database, and it will take care of the details of creating the tables, managing table structure changes, etc.

              But you can also use xPDO now, within existing MODx deployments, and it includes helper classes for forms and tables for use with MODx, as well. Just an alternate, object-oriented approach using the new PDO database layer that is a standard part of PHP 5.1+. For example, I’ve created several custom web applications from scratch with it, I’ve reverse-engineered osCommerce databases with it which were used to create Smarty views that replace the internal rendering system, and I’ve taken other existing custom web applications and easily transformed them into xPDO API’s, which typically reduce the amount of code in those existing applications by a significant factor.
                • 1828
                • 137 Posts
                Quote from: OpenGeek
                ...we are planning to add a Model management interface that will allow end-users to define and generate xPDO scaffolding classes to represent just about any kind of data they need stored to a database, and it will take care of the details of creating the tables, managing table structure changes, etc.
                This sounds very promising! cool I really like the idea of using MODx as a RAD tool myself, although I don’t envisage the end-users that I deal with ever making use of such features. wink

                Anton
                  • 26495
                  • 4 Posts
                  This sounds more than excellent. I have been playing with xPDO and it really is very good, still working out how to get many to many by joining the objects... but I saw a post in the forum that answers the problem. Anyway, the Model Management Interface sounds very really good for speedy custom data management. I hope it will create the forms too like jetbox then I can spend more time on the front-end and doing design work.. smiley

                  I look forward to getting a copy of the new modX once out of alpha.

                  PS I have even toyed with using xPDO to replace jetbox data access code and may run it in parrallel with existing code - unfortunatly there are many other things to fix besides adding an object orientated datalayer...

                  Thanks again.