Wish Improved Project Structure for Enhanced Portability

Filippo

Expert
Licensed User
Longtime User
So a couple of weeks later, you start a new project and you forgot you used an old one. If you're lucky you notice it right away. If not you have a problem. So you created a new problem and your suggestion would not change a thing. Always use the latest versions is the only good solution.
I do not think you have understood correctly.

I have written:
A few months later I have to implement changes in another project and I don't think that the library has changed.

and not:
So a couple of weeks later, you start a new project and you forgot you used an old one.

That's totally different.
 

alwaysbusy

Expert
Licensed User
Longtime User
Nope. Understood you well and clear. Just reversed your reasoning to demonstrate you created a new problem for future projects instead of archived ones. It is equally valid. Again, always use the latest versions is the only good solution. Fix and upgrade your old one to the latest versions if you have to make changes to it.
 

Filippo

Expert
Licensed User
Longtime User
Nope. Understood you well and clear. Just reversed your reasoning to demonstrate you created a new problem for future projects instead of archived ones. It is equally valid. Again, always use the latest versions is the only good solution. Fix and upgrade your old one to the latest versions if you have to make changes to it.
Alright! I didn't want to answer like this, but now I have to.
Change your license policy and there will be no more problems with this wish.

Erel, please write your opinion, otherwise there will be no end to it.
In any case, I will no longer answer.
 

Spavlyuk

Active Member
Licensed User
Nope. Understood you well and clear. Just reversed your reasoning to demonstrate you created a new problem for future projects instead of archived ones. It is equally valid. Again, always use the latest versions is the only good solution. Fix and upgrade your old one to the latest versions if you have to make changes to it.
This is an interesting take, considering other major IDEs and package managers let you specify the version of the libraries you include in your project, such as Android Studio, Visual Studio and Npm. Always using the most recent version of a library means that any breaking changes in them, will also break your project and depending on what changes the library made it could mean rewriting large parts of your project.

Also, I'm not sure I understand your argument about license compatibility. If copy & paste didn't exist and Microsoft were to add it to their OS, would you tell them they shouldn't because the license of your files isn't compatible with such a feature?
 

josejad

Expert
Licensed User
Longtime User
Erel, please write your opinion, otherwise there will be no end to it.
 

carlos7000

Well-Known Member
Licensed User
Longtime User
It is clear now that some of you do not care for the work that library makers on this forum make, the support they give or any fair play licensing system. Cool...



It is not because you CAN do something that you SHOULD, that is not how the law works.

I've experienced cases where my free BANano library (but with this restriction in its license) was suddenly available on github as part of another payable library. I had to give the authors a slap on the wrist and they elegantly solved it by removing it and just putting a link to the original download place on this forum which was alright for me.

At the very least as a library maker I should have the ability of his library being excluded from such a system. Since you both don't use my libraries, that shouldn't be a problem for you. That would at least prevent the more novice developer of breaking any license unwillingly. In this scenario, those who do copy and distribute manually are mostly well aware they are doing something fishy and are just a$$holes (pardon my french ;) ).



Again, for personal archiving I understand your case (somewhat, see further). What I talk about is of people selling source code on this forum and distributing some restricted libraries with it. This distinction is essential to understand my point.

But even in the case it would be implemented, it doesn't even solve the problem! You have an archived project, what do you do then? Overwrite your existing 'last' updates of the libraries so you can compile your old project? Probably make a copy first of the 'updated' ones so you can put them back later for your newer projects? Seems like a lot of manual labor too. Or even worse. Someone downloads a 5 year old project from this forum to check something out and overwrites his updated libraries. Hope he has a backup somewhere...

Users should always work with the latest libraries and fix the problems that may arise because of a newer version. If they don't, other problems will come up that are now fixed in the newer versions. And the only way to make sure of that is by having one central place where you can download them. As a dev, I always document where I got my libs from, be it for B4X, Java or any other one I use in a project. Seems like common sense to me. And I agree that this 'central' point could be better in B4X. We now have the google document Erel made where library makers can put in the info for the latest updates and it is a good start. The IDE even shows you if your library is outdated. Another good addition. But I do feel this could be even better.

B4X is build in such a way you can easily keep copies of the whole environment next to each other, although my previous statement of always using the latest versions stands.

I 'm under the impression most B4X library makers do a pretty good job of making their libraries backward compatible. And if it breaks, they probably have a very good reason because Google, Apple or any other vendor has depreciated something so you shouldn't use that old one anyway.

Maybe a compromise could be that, when exporting a project, a list with links to the download place on the forum of all the libraries used in the project is included? This info is available in Erels Google document and it would assure you are using the latest versions. Even a 'quick' download 'all new or newer' versions in the library manager could be nice.

Alwaysbusy

I think it's a good idea that b4A includes a link instead of including the libraries. A #LibraryUrl tag or attribute can be added to the library so that when opening a project that we have received from a collaborator, it shows us a link as you suggest.

With respect to the fact that the bookstores are the most recent. I guess B4A can keep the updated libraries in the folder.

As I suppose it is unlikely that this feature will be added. I suggest to those who read these posts to save the libraries that the project uses, inside a folder inside the project. Avoid headaches.
 

alwaysbusy

Expert
Licensed User
Longtime User
As long as some libraries (like mine) are exported as a link to this forum instead of physically copied, I have absolutely no problem with it.

Suggestion: Although this information is already in Erels Google document, maybe a simple file (with e.g. the link to it so you do not have to search for it) next to the library for such libraries can make it easier for you to implement it in your tool. Or an extra column in the Google document 'can be distributed') that you can check and according to this setting you either can copy it or provide the link to where it can be downloaded.
 

carlos7000

Well-Known Member
Licensed User
Longtime User
The idea of including links in B4a so that recipients of the exported file can access the additional libraries seems excellent to me.

However, it's important to clarify that the feature I propose doesn't involve any "exporting" per se. The goal is to create a copy of the required libraries and files within the same project, stored in a folder called 'Additional Libraries' or 'Additional Files' or something similar, located within the project folder.

The question is: "When exporting the project, would B4A also export that folder? Is B4A configured to compress everything within the project folder?" If that's the case, I understand the concerns. However, if B4A only exports the files that it recognizes as integral parts of the project, without including unknown folders or files that B4A doesn't recognize, I don't see any issues.

In my own projects, I have manually copied the additional libraries within each project. Many times, when exporting projects, the 'Additional Libraries' folder is not included in the exported file. Therefore, I don't see any problem if B4A follows a similar approach and only exports the standard files without including unknown folders or files that are not integral parts of the project.
 

Sandman

Expert
Licensed User
Longtime User
Let's suppose that the feature I propose is not implemented. Would there be any legal issue if I create a program that implements the feature?
Not at all.

Would there be any problem if I make it known so that anyone who wishes to use it can do so?
Not at all. I'd include a note in the program that the user should only include libraries where they have the right to do so.
 

MrKim

Well-Known Member
Licensed User
Longtime User
Something along these lines definitely gets my up vote. I, too, have spent a lot of time hunting down libraries for old projects and as mentioned, sometimes having NO idea what lib is missing, all I know is something is missing.
My suggestion: Under File - export as zip, add Archive. Archive would do export as zip PLUS a separate folder containing all non-standard libraries.

I don't care if the app automatically uses them - it is an archive file. But at least if the app doesn't run I know where to find them.
 

Cableguy

Expert
Licensed User
Longtime User
Some Of the answers I found here are one of the reasons I'm not as active in the forum as I once was.
External libraries was one of the most important feature brought by EREL to the B4X suite, allowing many developers to bring functionalities other wise not available to our apps.
It amazes me that most developers are willing to pay up to a few hundred bucks for a license to develop on a less friendly IDE, but don't care about the time and effort spent in creating some of the libraries that have the potential to make them more money than they cost.
A bought library gives you the right to use it, not to distribute it!

this thread started as a simple feature request and quickly escalate to " then you just need to change your licensing".
About 70% to 80% of very active users in this forum have been here for many years, well before B4A was free.
You would never read one of us tell someone to give up their hard work for free.

I would suggest @Erel to close this thread.
 

AnandGupta

Expert
Licensed User
Longtime User
A very good wish/suggestion turned into free/paid argument.
Both side are right in their own space.

But to solve the problem of "Are you missing a library ?", which started this thread, I use simple advise I got here long ago.
I open the "MyProject1.b4a" file in a text editor.

D64_gatEZBMRg0.png

I search for the missing "Library<n>" in the Forum, sometimes using google. Download and compile.
In rare case I found the library but it does not work due to Android / Java version etc.
 

carlos7000

Well-Known Member
Licensed User
Longtime User
Something along these lines definitely gets my up vote. I, too, have spent a lot of time hunting down libraries for old projects and as mentioned, sometimes having NO idea what lib is missing, all I know is something is missing.
My suggestion: Under File - export as zip, add Archive. Archive would do export as zip PLUS a separate folder containing all non-standard libraries.

I don't care if the app automatically uses them - it is an archive file. But at least if the app doesn't run I know where to find them.

If it just happened to me. I had a project that can read qr codes. But I did not find. Look in a folder that I have examples of different things. But the libraries he used were lost. I can't find them. Now I have to look for them one by one and I don't know if I will find them.

I understand the concern that paid libraries will not be distributed without payment or authorization. I don't see a problem. The project has all the files necessary for its operation inside its project folder. But if the project is exported, those additional libraries are not exported.
 

carlos7000

Well-Known Member
Licensed User
Longtime User
A very good wish/suggestion turned into free/paid argument.
Both side are right in their own space.

But to solve the problem of "Are you missing a library ?", which started this thread, I use simple advise I got here long ago.
I open the "MyProject1.b4a" file in a text editor.

View attachment 144508

I search for the missing "Library<n>" in the Forum, sometimes using google. Download and compile.
In rare case I found the library but it does not work due to Android / Java version etc.

I didn't know that trick. I generally take a screenshot and search one by one. Unfortunately, almost always something is missing, and the project no longer works.

64346633.png
 
Top