- run the MODx api externally and just do development from files
This sounds like the most compelling option to me. Are there any examples or documentation which discusses how this is done? Are there drawbacks to this strategy? ie, do you lose out on any of MODx’s potential? Should I just leave this for now, and wait for Revo and its docs to get further along?
To be honest, it really depends on what you’re developing.
Can you elaborate on this, and perhaps describe some scenarios? Consistent with the theme of this thread - I’m wondering about the general workflow logistics of developing an application in MODx (whether it’s one snippet or 1000), without disrupting habits like version control and IDE use - particularly during early development where code changes are frequent. With the exception of building a 3PC for distribution (which is clearly not my orientation), it’s not clear to me how what one is developing would matter in the context of specific workflow.
The tip regarding testing outside MODx and then pasting code into the manager in the Revo docs was pretty specific with regard to suggested snippet development workflow. What would you suggest as a better tip to replace the one in the docs, and how would such a tip differ depending on what you’re building?
Well, hopefully the 3PC was written correctly so it’s extendable without modifications. But since that’s not always the case...
I’d argue that it’s very often not going to be the case, just based on my experience with the inherent limitations of "plug-and-play" website assemblage, which is perhaps limited. There seems to almost always be some little customization(s) that the site owner wants that the component developer didn’t anticipate...too many permutations to cover them all, even with pages and pages of properties...
Either:
A) Duplicate the snippet/3pc and work on it directly
B) Edit it directly and forego automatic upgradability
These are both viable *strategies* for approaching the modification an existing 3PC (although both would likely result in having to manually piece together an upgrade, depending on what was modified), but what I was asking about was *workflow*. For example, I’m using SPForm on my personal site, and the chunk to display the "thank you" message looks like this:
<div id="spf_response">
<h3>[[+spf-thank-you]]</h3>
[[+spf-came-from]]
[[+spf-back]]
</div>
I’m already using h3’s elsewhere in my site (and let’s assume I’m not willing to change the rest of my site to suit SPForm, or that my spf-thank-you note is longer than would be appropriate to put inside any Hn tag, semantically speaking), so regardless of the strategy I have selected, I assume my choices are:
1. Edit the chunk directly to contain the markup that I want
2. Create a new chunk with my preferred markup, then refer to it from the appropriate snippet
3. Any other choices?
In either case, I assume the workflow involves ultimately managing the HTML code from within the MODx manager, correct? Which, again, means version control is not an option for this bit of code, or is it? The other option I can envision is managing the chunk outside of MODx (under version control and via an IDE), and re-running the installer after every change. Is this the recommended workflow for packaged 3PC modification?
Still just trying to get a handle on how (or if) MODx can fit into an efficient, version controlled development workflow. I keep hearing that I can do this, but still mystified as to exactly how.