Wish Libraries naming.

LucaMs

Expert
Licensed User
Longtime User
This is not a real "Wish", it's only a suggestion.


There are libraries compatible with different "b4x languages" (quotes because there is a unique language - maybe I should write "platforms"), like:

The B4J jMQTT library is fully compatible with B4A: https://www.b4x.com/android/forum/threads/59472/#content
In case it is not clear, the jMQTT is a B4A and B4J library.


I think that better prefixes could be:

xLibName - compatible with all;

aLibName - B4A only;
jLibName - B4J only;
iLibName - B4I only;

and all the combinations (in alphabetical order):

ajLibName (ajMQTT) - B4A + B4J;
aiLibName - B4A + B4I

...
...
 
Last edited:

Roycefer

Well-Known Member
Licensed User
Longtime User
There can be no such thing as an xLibName or an aiLibName library since B4A and B4J libraries are made out of compiled Java code which is useless to iOS or Arduino systems.

Right now, the preferred method for writing a "library" that will be compatible with all B4X platforms (save B4R, perhaps) is to write classes in B4X code and distribute the .bas files. However, if you were to create a large "library" this way, distribution becomes tedious and the developer must make sure they have properly included all the .bas files in their project. Updating becomes even more tedious.

It would be helpful if there was some mechanism by which the library developer could package all these .bas files into a zipped archive (say with a .b4x extension) and the IDE would recognize and properly parse the contents of that archive so that other developers could just treat it as a normal library.

For example, let us say that I am developing a machine learning library written in pure B4X. It would have a Vector.bas, Matrix.bas, Perceptron.bas, HiddenLayer.bas, Input.bas, etc.... I could zip them all into xMachineLearning.b4x and other developers could place it into a "Shared Libraries" folder. The IDEs would list it in the Libraries tab just like a normal library. When selected in a project, the B4X IDEs would recognize it and properly parse its contents just as if it were a bunch of .bas files added to the project. This would be a big step forward in cross-platformitude. This would also enhance the ease of building pure B4X stuff on top of XUI.
 
Top