Best way to re-use code

I’ve explained the approach we’re using in this Xojo Guest Blog Post: Xojo Projects in a MonoRepo

However, I don’t know if there is a “best practice”… I guess that depends on your project(s) and needs, as all possibilities have their pros and cons.
There is quite some information in this topic, and also the Blog shows both (dis)advantages of that approach.

The MonoRepo approach could also be used without a Version Control system.

An advantage of the MonoRepo approach is that everything is contained in a single folder (containing sub-folders of course; all files referenced relatatively), and can be moved around and to other Operating Systems without issues.

Not with what the Blog Post is showing - that’s using just the xojo text project format. All (even shared) code is considered an “internal item” for the Xojo IDE, while parts of the code/files (all in xojo’s readable text format; not binary or xml) are shared between several projects.

That works just fine with the MonoRepo approach described in the Xojo Guest Blog Post: Xojo Projects in a MonoRepo.
One example is Aloe Express (which consists of Modules with nested Classes in there) - works fine for us to share between multiple projects.

Sure… a MonoRepo is not ‘the’ solution for every collection of projects - but maybe something to consider.

I’m curious if we’re the only ones that are using “shared code” with Xojo Text Projects using a MonoRepo - at least I’m not aware that this approach has been explained on the forum before… So I hope this Blog Post has been helpful to some, food for thought to others.

1 Like