Roundtrip development #451
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#451
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
feature request
My typical workflow is to start with JCP and do significant customisations using an IDE (php storm).
For exmple (but not limited to ) the getForm method in the model
It is a PITA to manually copy back changes into the GUI in all the different places. And for true roud trip development i would like to see this automated.
JCB has the
/***[INSERTED$$$$]***//*34*/
(and others) which will automagically loads changes back into thespecified
custom codes upon compilation and outputs the afterwards. This feature request could be based on the same/similar mechanism to update those code snippets like getForm.I would suggest an explicit action to reload/sync up the gui. This should be relatively straight forward if no
placholders
are used in the snippits. Should place holders be used the will be expanded upon compilation and thereafter are not updated when the placeholder gets "updated". This is an aspect that would require attention. On could consider "tagging" placeholders so they could be "imploded" when reading back?I think we can add this, it does seem very close to the original request that caused custom-code to be added in the first place.
There are some very serious issues here, like the one mentioned, when there is custom code placheloder in the getForm php block. There is also the next evolution of JCB where we are having placeholders all over, local to a component and global to all components.
So to solve this, we simply have the restriction that if any of the above is found in the code block, just like in custom-code at this time, we do not do round-trip, so those code blocks can only be updated in the GUI of JCB.
So lets say we add a new placeholder that looks like this
Then to update we add this
<>
between the ID and the $$$$'sThis does nor require code positioning as we know where and when it must always be added back, but it cannot take customcode placeholders or the new placeholders, just code!
I think I can get this to work very easy.
I may still change the placeholder implementation.. but the idea can work.
That seems great !
I started out, and found this will take more then I initially thought, since we now will need the
table
field
andid
every time we add any code from the GUI... this is not how JCB worked... but I am almost finished with a few new functions and conventions that will add that layer... This idea is going to really be a great step forward for JCB!Okay so this feature is nearly done.
I will have to make tutorial of how it works, but before I do... here is some guidelines:
.
with<>
in in the top placeholder like this:So it will be that simple, I will push the changes up for testing later tonight 🎆
Thanks.. awaiting commits/push
Okay it is out... let me know. There is a few areas that we can't target, like all custom code added in subforms like the dashboard area and other. But the rest should work as long as it does not have customcode placeholders, these two can not work together for now.
Okay so since so many lines changed, the file to look at is the a_Get.php since it is all that changed to add this functionality.
You will see a few new functions:
These form the foundation of the new feature, if you wanted to understand how is done, and give suggestion to improve 👍