Good alternative to a DLL

In past projects I managed, we used DLLs to separate sensor specific things. Pretend I have a level sensor, ph sensor, and a flow sensor as an example. Each sensor shares the same logger guts. You plug in one sensor, download firmware to the logger and start the communications via a DLL specific to that sensor.

  1. The main components of the software (charting, reports, analysis, editing, etc) do not change, just the communications with the sensor, and the data acquired.
  2. The logger setup does not change (site id, location, logging intervals, etc.)
  3. The communications to the different sensors DOES change (i.e., comm protocol, command set, data acquired, etc.)

Question: What would you guys recommend as a general approach to this while staying completely inside of XOJO for development? I would like to keep the program modular in design and would rather not have mounds of code for all sensors in one program. And, of course, I would rather not recreate an app over and over, changing only the code for the sensor interface.

Thanks,

John

In your request there is a partial reply to your question: " I would like to keep the program modular in design and would rather not have mounds of code for all sensors in one program".

With this assumption you basically needs external helper apps developed with Xojo where each one manage communication with a single kind of sensor: you get Xojo apps instead of dlls.
These apps can talk to the main app reporting data in an uniform way using IPC.

Regards.

This is a real necessity. Producing some kind of loadable modules or DLLs. https://forum.xojo.com/16953-modular-systems-for-large-projects/0

Personally (and this is 10000% pure personal opinion here), I would write it all in Xojo. Each sensor type be a different class. Now if the various sensors have come functionality and/or properties, I would create a sensor class with all the common elements in it, then each of the sensor types (PF, float, level, etc) would be subclasses of that sensor class.

The interesting part of modules is the possibility of creating things like plug-ins salable separately. Add those files near to the app and it finds, loads and use them. You sell the app and few of those plugins to enable new functionalities, like, for instance, different plugins for different sensors, and latter you can just update the plugin module code and alert just certain users owning them. Such kind of things.

well you COULD do it with DLL’s
http://great-white-software.com/rblibrary/index.php?main_page=product_info&cPath=11&products_id=70

It’d be nice to be able to write the dll’s themselves in Xojo but its not possible
Its been requested for a long time though

[quote=171074:@Norman Palardy]It’d be nice to be able to write the dll’s themselves in Xojo but its not possible
Its been requested for a long time though[/quote]

This is my entire point. I have tools enabling me to create DLLs and .so, but if choose them, I probably would keep using such tools to write the rest too in the same impulse. :stuck_out_tongue: