Wish Suggestion for Improvement: Automatic Integration of Modules in B4XPages Projects

Abdull Cadre

Active Member
Licensed User
Dear colleagues,

I would like to share an observation I made while working with B4X projects (B4A, B4i, and B4J) using the B4XPages mechanism. Although we are enjoying the benefits of code unification across platforms, I noticed an area that could be improved to make our workflow even more efficient.

When creating a module in a B4A project, for example, I noticed that it is not automatically replicated in the B4i and B4J projects. This means that as developers, we need to manually export the module to the other projects. This task, although seemingly simple, becomes laborious and consumes unnecessary time.

I believe it would be extremely beneficial if the B4XPages mechanism could automate the process of integrating modules between B4A, B4i, and B4J projects. Not only would this save precious time, but it would also ensure a more consistent synchronization across platforms.

Therefore, I propose that consideration be given to implementing a feature that allows for the automatic creation of modules in all associated B4XPages projects whenever a new module is created in one of them. This would certainly increase developers' productivity and improve the overall development experience.

Thank you for your attention, and I look forward to feedback and additional contributions on this matter.

Best regards,
Abdul Cadre
 

LucaMs

Expert
Licensed User
Longtime User
I agree and think (I didn't think much, to be honest πŸ˜„) that it should be done like this:

1706886294166.png


if you check "Add module to parent folder", the module will be saved in the parent folder, not in the project folder (correct, of course), in which a reference is inserted instead.
Well, in this case the reference should also be inserted into the other platforms, nothing more. This should be relatively easy.

In this B4J project file (.b4j):

Module1=|relative|..\B4XMainPage
 

Lucas Siqueira

Active Member
Licensed User
Longtime User
I agree and think (I didn't think much, to be honest πŸ˜„) that it should be done like this:

View attachment 150274

if you check "Add module to parent folder", the module will be saved in the parent folder, not in the project folder (correct, of course), in which a reference is inserted instead.
Well, in this case the reference should also be inserted into the other platforms, nothing more. This should be relatively easy.

In this B4J project file (.b4j):

Module1=|relative|..\B4XMainPage
This reference part could be automatic, or have an option to set it to automatic.
 

Alexander Stolte

Expert
Licensed User
Longtime User

klaus

Expert
Licensed User
Longtime User
A first step could be that when we open the UDE of a platform it automatically loads all module which are in the projects parent folder.
When I develop a cross-platform project I begin with B4J and the other platform IDEs are not open, therefore the modules could not de added there.

Be aware that the B4XPages module must be saved in the projects parent folder, you must check Add module to parent folder as already said.

1706890850979.png


And currently, when you load an existing module in another platform you must load the module in the projects parent folder and check Link - relative path.

1706891642874.png


Then, when you save the project in one platform the code is updated automatically in the other open IDEs.
 

Attachments

  • 1706891626587.png
    1706891626587.png
    12.3 KB · Views: 31

Lucas Siqueira

Active Member
Licensed User
Longtime User
This part of entering other platforms to add the relative link that we wanted was automatic or had a box to check, making it easier for new users.
A first step could be that when we open the UDE of a platform it automatically loads all module which are in the projects parent folder.
When I develop a cross-platform project I begin with B4J and the other platform IDEs are not open, therefore the modules could not de added there.

Be aware that the B4XPages module must be saved in the projects parent folder, you must check Add module to parent folder as already said.

View attachment 150275

And currently, when you load an existing module in another platform you must load the module in the projects parent folder and check Link - relative path.

View attachment 150279

Then, when you save the project in one platform the code is updated automatically in the other open IDEs.

This part of entering other platforms to add the relative link that we wanted was automatic or had a box to check, making it easier for new users.
 

klaus

Expert
Licensed User
Longtime User
I agree with you, but I do not always have all IDEs open, therefore the wish of my first step.
And I am not sure that all readers of this thread are aware of the second part. Therefore the complementary explanation.
 

LucaMs

Expert
Licensed User
Longtime User
A first step could be that when we open the UDE of a platform it automatically loads all module which are in the projects parent folder.
Good.

Be aware that the B4XPages module must be saved in the projects parent folder, you must check Add module to parent folder as already said.
True (and in this case the dialog should not show the checkbox, it should be implied, mandatory).
This also applies to other types of modules that need to be shared between the various projects (with the checkbox visible, because the IDE cannot know your intentions).

However, when you create a new B4XPage or other type of module that you save with "Add module to parent folder", the current IDE may:
1 - check which project types are inside the parent folder
2 - modify the main files of these projects, simply writing inside them (example):

Module1=|relative|..\B4XMainPage
Module2=|relative|..\MyNewModule
 
Top