How to build "features" modules for an app ? advices needed

Hi all,

I’m building an raspi application which has the need to be « updatable » , adding extra features in a regular basis without having the need to recompile it ( main structure remains the same all the time ).

Let’s say that in this app there is one menu with 5 submenus.

Ex :m’y top menu is system and I have 2 submenus : 1 is show time, 2nd is show date .

3,4,5 are not assigned for now to anything, so they are not displayed .

I was thinking to have some « modules «

Which ca be Assigned to one ( or several ) submenu(s).

Each module will provide different type of feature(s). In my example , I have one module which display the time , second one display the date.

Now , let’s say in 6 months , I want to add a new feature : show IP address . So , idea would be to have to perform a search through a library ( in a centralized server as ex , but this is many another post subject , just to provide as much I sights here ) , select the « module « and get it . Then this module being available in the raspi will be available to be assigned to submenu#3 ….

Module is assigned , feature is now available as submenu #3

And so on for any new module .

Do anyone would have recommendations , do and don’t in this , how to do it the best way .

Thx in advance,

either software as service (web api) or command line tools.
you need a module description that it appear in the menü. a sqlite db entry?
maybe u can visualize the module result from returning xml or json data.

Hi Markus, as previously, Thanks for taking some time to help me.
I gave basic example here, but at the end, one of the module I’m sure to have in will be an “animals encyclopedia”.
The RASPI will be in a kiosk mode, this module will have a full page and will provide for ex :

  • display all the info on a specie
  • search by one criteria ( color , type …)
  • search by name
    For the menu, I have it working now ( in short, my menu structure is in sqlite , I do my request and build he menu accordignly ) .
    I named them “module” as it can be a full featured "sub application ".
    At the end, the Main application is just a menu manager from which I can run modules
    is it more clear ?

so it is just a information terminal for any kind of data with user interaction.
you have a static main application which could execute a sub application.
more or less a web application would be enough?
and module is some kind of data or table and images.

do you plan to have many of raspi in kiosk mode that you fear exe updates?

Thanks @MarkusR
Most likely yes ,

"you have a static main application which could execute a sub application. "

→ yes

more or less a web application would be enough?

in that case I would rely on your advice . I need something very stable, low ressources consuming and which can not be messed up by peoples who would like to help if there is any crash or what so ever, ( that’s why I put aside a CMS like wordpress or Joomla )

and module is some kind of data or table and images.

The idea is that I want to initiate the project and give opportunity to some other to add their own modules. I would say that the modules can be like some apps which are in googleStore/AppleStore

do you plan to have many of raspi in kiosk mode that you fear exe updates?

We will start with somehting around 50 , if adopted it can go to much more … but let’s say for now 50.
The peoples who will do the udpates will be non tech at all ( really not at all )

somehow a open source project.
i see the risc of malware here if others can push a executable into your enviroment.

linux have usually package manager to handle a install with all dependencies.
(myself never published something there.)
especially if you speak about a exe modul it need for sure some other librarys and each library have other dependencies.

i think you need declare/define/restrict what the scope of a module is.

That is called Plugins. You have to define the scope and the mechanics, see for example this answer.

In xojo, therer is the option to use Xojoscript

1 Like

@Ivan_Tellez @MarkusR sounds that there are a lot of contraints . Let me do a team meeting and share with all your insights …. Will keep posted

I am unshure about your finished product. So, I will give you an example of what I understand:

a kiosk application who is able to add new data (when some gal/guy add them).

I build some kind of data reader that display Table of Contents with a scan of the cover.

The target magazine description / cover is in a folder.

At reboot time, the application load the contents of the Master directory (all actually described issues) and the user is able to look at them.

Add the updater people have to do is to create a new folder and add two files: a description and the cover, then move that folder into the master directory.

Once the Reader Project is build, no more code is needed (only descriptive folders).

Is it that you want to do ?

Plugins for executable apps are just usually Dynamically Loadable Libraries (or Shared Objects, in the Uni/Linu-x world) that your main app loads and uses features found there using some established protocol/interface, like after loading the library call init_features() and then you can get a list of some “x” calling something like get_list_of_functionx(), draw_representation(component, x,y, w,h), call_functionx(name, args…), get_plugin_version(), get_min_host_version(), etc.
On every start an app finds and loads such modules that were put in a “plugins” folder.
I would love that Xojo could build DLLs but it currently doesn’t.
Maybe as Xojo now uses the LLVM capabilities, they will make it possible as “plugins” are #9 in the roadmap?

for #9 i wait for years, unfortunately nothing happen and it always move down and other new ideas appear above.
same for easy database access and android (wip). a real pity.

1 Like

@Rick_A @MarkusR @Ivan_Tellez , Thanks to you for your insights.
We did a meeting with the “Team” yesterday and agreed that we were aiming was a very long term goal .
To be more pragmatic, we will put aside this idea of plugins / module as for now, we have identitied all the peoples who wil lcontribute to the project and, an even more restriction set of people who will code ( 2 …).
So we will stick to the standard application , with a way to activate / desactivate some features , but they will be all in from the build.
hopefully, if our project is a success from adoption point of view, we will advise to re-dev the way I presented or maybe by that time , Xojo will provide plugin.
Thanks to all again for your contribution and help.

1 Like