03-05-2021 07:10 AM
Hello !
I am new to the DQMH coding style. I used to develop projects based on the actor framework and today I want to change. DQMH appears to be a real alternative.
I want to create my own model with an object like dataClass used in MHL. What is the best practice?
- Use a separate object from scratch
- or override the module admin class and maybe put the main.vi in this new class to have full access to the dataClass properties in the main VI
Maybe you have some examples or template to share.
Thanks 😉
Marc R.
03-05-2021 11:56 AM
Hello Marc,
Nice to hear you try to use DQMH.
My way to use classes with DQMH, is to add them to the Module Data cluster. It works fine and avoids modifying the way modules are built and prevents pain when there is a DQMH update.
That being said, my first advice (probably valid for any framework you could use for the first time) if you are really new to DQMH, before trying anything else, try to use it as the framework architect as defined it should be used. That not easy for a developer with many years of experience because we all have habits, but it worth the effort 😏
Once you will have your experience with DQMH, and if you hit some architecture problem you can't solve, that will be time to "trying things".
Welcome to DQMH!
03-11-2021 12:02 PM
Marcraggi,
I second what Olivier suggested.
Once you are ready to make changes. In the past, we have overridden the Module Admin for adding information such as module identification. But that has been very rare.
A more common override is for the DQMH Queue. You can see an example on the generic networking DQMH module that Hampel Software created .
We talked about some ways to use classes with DQMH here, specifically on tip 5.