We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9207 ☆ A M B ☆
    • 2,475 Posts
    I know several talented MODX devs have been working with some ways to simplify the workflow that's involved when creating or contributing to a MODX package, but this is my own take on it: RepoMan.

    Here's the overview in writing: https://github.com/craftsmancoding/repoman/wiki

    And here's a screencast of my prototype:
    http://screencast.com/t/TM3rTH3RQOiQ

    Currently, I have this working for Chunks and Snippets. Plugins + Events and Property Sets are soon to follow, as well as CMPs.

    The next step is to use this same engine to create packages. Instead of having to bang your head against the wall to get your code packaged, the goal here is to simply document your code as you go, and then not have to worry about it. In other words: the same build script could be used to package ANY MODX project.

    This makes it easy to edit all my code via my text editor and then commit it to my Git repo without having to copy and paste it into or out-of MODX. It's a much simpler workflow, perfect for developing. RepoMan could be used both for new projects and as a time-saving retrofit on existing projects that would make it easier for other devs to contribute to them.

    Just thought I'd share.
      • 27708 MODX Staff
      • 2,502 Posts
      Brilliant Everett. I can't wait to play with this.
        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
        • 3749
        • 24,544 Posts
        I love the name (I wish I'd thought of it) and the slick user interface. Do you see this as complementing or competing with MyComponent?
          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
          • 42049 ☆ A M B ☆
          • 250 Posts
          Absolutely brilliant, cant wait for this to go live. If you want some alpha/beta testers sign me up.
            GEL STUDIOS
            MODX Professional | MODX Ambassador

            Website | Email | Twitter | Facebook
            • 40045
            • 534 Posts
            This is awesome, great work!!!

            In combination with this http://modx.com/extras/package/modxrepository and maybe Packman?? (or MyComponent???), I see me finally get out some useful stuff to the community (which is lying around for quite some time in my filesystem^^)...just a few questions (forgive me if they are noobish, but I'm not experienced with building transport packages...):

            1) How (besides using Packman) are the actual transport .zip files generated, Packman seems to be somewhat limited, for most purposes its fine I think but I'd always loved to package some Resources, System settings, users whatever and that doesn't seem to be possible with Packman...so would this be possible with RepoMan?

            I think (at least some of it, like Resources) is possible with MyComponent, but I have never looked at it (maybe scared of the pure code approach, ie. no GUI style, even if it's way more powerful than packman)

            So in short, how do you build a .zip out of the repo folder? Manually (locally)? Is everything in _build is done automatically with RepoMan and then the installation would work?

            If I knew this can be done manually, i would just clone the github repo of RepoMan, zip it, rename it (with appropriate formatting) and install it?

            2) Love the GitHub integration! Was a missing piece for me... As I could see from the video you directly cloned the repo to your repos/ folder right? Via SSH? What if git is not installed? Clone to local filesystem and upload via FTP?

            I just checked and surprisingly noticed that my shared hosting server has installed git *yeey*, so this would work...

            I think it would be crazy nice if CLONING (or even managing) github repos could be done trough RepoMan CMP...the simplest way I can think of is to use php system() (or one of it's siblings that are able to run terminal commands) and then just have a section like "create repo", have an input for the git url (required that git is installed on the server...) and then just clone the repo directly to the repos/ folder directly from the CMP... I also could think of using one of the available php wrappers for the github API, which would make the functionality probably available to more users (not only the lucky ones with the ability to enable php system() and having a server with git installed):

            Option 1: The Official one (seems very bloated and complex to me^^, but that's maybe just me...=D): https://github.com/KnpLabs/php-github-api
            Option 2: https://github.com/diversen/simple-php-github-api
            Option 3 (I would probably try this one first =D, EDIT: I just see it's using passtru() function, which is probably also disabled in most shared hostings =/): https://github.com/ornicar/php-git-repo

            EDIT 2: After a short research (through official and Option 2), I'm not even sure if the github API allows to clone a repository^^...a lot of things are possible but I couldn't find something about cloning, but maybe I'm just not searching at the right place???
            If cloning through API is not possible that would lead to a return to system(), exec(), passtru() functions of php and then should only be available in RepoMan if one of these (or only passtru() if Option 3 is used) is available...will definitely limit the use for a lot of users, but the ones with access to these functions would have a lot of power at their fingertips =)...

            I have not even thought about managing github repos remotely (but I really hate to do it locally... =P), so this means none of the above Options was ever touched or tested by me, no idea if they work like I think...

            If somehow possible I would love to not even have a local copy of my repos but a simple GUI to just clone a repo, commit the remotely made changes to the repo and/or sync my forked repo with the original one (through a button =D)

            I'm I just thinking that this is too easy (or possible at all) or would this be a nice addition? =) [ed. note: exside last edited this post 13 years, 7 months ago.]
              • 25663 MODX Staff
              • 12,272 Posts
              Quote from: BobRay at Mar 05, 2013, 11:52 PM
              I love the name (I wish I'd thought of it) and the slick user interface. Do you see this as complementing or competing with MyComponent?

              I think it's a complement. In speaking with Everett, it's not meant to solve problems for every type of custom add-on. He's just looking for more of a baseline, best practices approach to get day-to-day stuff done fast and efficiently. MyComponent can do pretty much anything if my understanding of it it correct! smiley

              (And both please feel free to correct me if I'm off base.)
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 9207 ☆ A M B ☆
                • 2,475 Posts
                @Ryan Yes, I'm aiming for something that's simple to use and can be used as-is for *MOST* packages (i.e. those with Snippets, Chunks, Plugins, CMPs, and more?).

                The whole schtick here is based around sticking to logical conventions, so as long as there's an agreed on convention of where to store your objects and how to document them (via a documentation block), then RepoMan (or any other system) should be able to figure out how those pieces fit together. Following a convention can be confusing to noobs, but it can speed things up immensely -- MODX typically offers configuration over convention (and configs are usually easier to follow), but it can be slower. RepoMan aims to strike a good balance there AND it encourages better documentation

                Bob: I'm afraid this might compete with MyComponent. RepoMan has many of the same goals, but I didn't want to drive it via a configuration file: I wanted it to be driven by in-line comments. I don't think RepoMan will compete with MyComponent's flexibility, however: MyComponent can work with packages far more complex than what I'll be able to tackle with RepoMan.

                @exside: Git ships on Macs, but anyone can download a Git client (Github has a free one), and you can even download public repos as zip files, so it's easy to get source code. As you do more development stuff, you'll get really familiar with this. It may seem daunting at first, but it's simple. Cloning from the GUI... interesting idea. I'm a command-line junkie (so much more efficient down there), so I often find it easier to do what I need to do from the command line and bypass a limited (and often clunky) GUI approximation, but a GUI option might be nice. Certain options (like forking requests) will probably always have to be done on 3rd party sites.

                Creating packages can be such a painful learning curve -- this alone has prevented simple packages from being released, and it's a shame. I know Bob's MyComponent extra, for example, can automatically create a package without the developer having to modify the build script. That's absolutely golden.

                Generally, I think everyone who's worked on MyComponent, Packman, modxrepository, etc. has strived to simplify the development process, so yes, RepoMan is jumping on the same bandwagon. Ultimately the goals are the following:

                * Make life easier for MODX developers
                * Encourage MODX development
                * Make it easy to contribute patches to existing projects
                * Make it simple to create packages.

                For one of these packages to be adopted, I think it needs to meet those goals. It's also got to be well-documented so noobs can jump in without skinning their knees. I'm hoping RepoMan fits that bill.

                If anyone would like to be alerted of upcoming releases, I created a simple newsletter:

                http://eepurl.com/wn7BX

                I think this would be 1 email per month at most.
                  • 40045
                  • 534 Posts
                  Quote from: Everettg_99 at Mar 06, 2013, 10:26 AM
                  @exside: Git ships on Macs, but anyone can download a Git client (Github has a free one), and you can even download public repos as zip files, so it's easy to get source code. As you do more development stuff, you'll get really familiar with this. It may seem daunting at first, but it's simple. Cloning from the GUI... interesting idea. I'm a command-line junkie (so much more efficient down there), so I often find it easier to do what I need to do from the command line and bypass a limited (and often clunky) GUI approximation, but a GUI option might be nice. Certain options (like forking requests) will probably always have to be done on 3rd party sites.

                  I work already with the GitHub client for os x but for example the syncing of my forked repo (for example revo) and the original repo has to be done over the command line as far as I know (ie. git fetch upstram or whatever alias is set for the remote/original repo, then merge with my fork and so on) and that sucks because I always forgot the alias I gave the last time I set it up =D...just an example. So it's not that I'm completely lost with github/git but as I like to develop directly on the server the site runs later on (yeah, I know, also there are different opinions...) it would be very convenient to have some of the more common github actions right at my fingertips inside the manager (not forking...but at least cloning =D)...if I finde some time I'll probably play around with this idea and if I get somewhere I'll make a PR to your repo...

                    • 3749
                    • 24,544 Posts
                    Quote from: exside at Mar 06, 2013, 06:36 AM

                    I think (at least some of it, like Resources) is possible with MyComponent, but I have never looked at it (maybe scared of the pure code approach, ie. no GUI style, even if it's way more powerful than packman)

                    I don't want to hijack Everett's thread, but I don't want to let people get the impression that MyComponent has no GUI (see attached image).

                      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
                      • 40045
                      • 534 Posts
                      Sorry @Bob, didn't know that!!

                      OK, then let's turn it like this: No CMP for MyComponent (is there actually a reason for it?)... =)