LabWindows/CVI

Showing results for 
Search instead for 
Did you mean: 
Reply

Application Architecture

Application Architecture

Hello,

I am trying to design a small application using the tool Labwindows. I wanted to get some information to properly design the application. I have a basic GUI that uses theDLL. I want to adopt this architecture to make it easier to update future. One thing I do not know if I can add windows or GUI if I need without having to compile the program again.
Will you help me with a method that allows me to ensure easy update of the application (code level and interface) without having to uninstall the thing after previous.


Thank you for your help.

0 Kudos
Message 1 of 8 (395 Views)
Reply
0 Kudos

Re: Application Architecture

Hi Fishingman,

 

If I understand what you are trying to do then I think the best way to make your code modularized and easy to update would be to create the portions of your code that you anticipate might change within DLLs.  As long as the function prototypes in the dll do not change then you will be able to recompile a new dll and push this into your application folder without needing to recompile the executable.

 

Illustration:

I create a dll with a single function called 'Add(int x, int y)' but I accidentally set the return to 'return x;'.  I compile my exe that includes this DLL and calls Add(5, 5).  After a week, I notice that this behavior is returning 5 whichs is incorrect so I open the project my DLL was created in, change the return statement to 'return x+y;' and then replace the old dll with this new dll. I can then run my code and it returns 10 instead of 5 even though I haven't changed my executable.

 

As far as working with the GUI in specific - I can understand wanting to save what may be a potentially long compile time when changing the GUI; however, I would not suggest using a DLL to create and run your GUI.  If this would work, the modifications to the GUI functions in order to make this work would probably take more time and work than recompiling a few extra times.

 

Regards,

Trey C.

0 Kudos
Message 2 of 8 (374 Views)
Reply
0 Kudos

Re: Application Architecture

A small expansion on my original post:

 

If you are just looking to be able to modify the user interface in a dll then take a look at this link.  It explains how to set up dll function calls to modify a user interface.  Depending on the extent to which you want to modify your user interface, this can definitely be a valid approach.

 

Regards,

Trey C.

0 Kudos
Message 3 of 8 (355 Views)
Reply
0 Kudos
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
Highlighted
This widget could not be displayed.