cgiustini Posted March 24, 2013 Report Share Posted March 24, 2013 Hi, I wanted to get people's opinions on the following idea. I am currently writing many lvlibs that we intend to reuse in many different applications we are developing. The interface of the lvlib needs to properly designed in order to avoid any problems down the road: if an interface needs to be redesigned, then many of the applications could have their structure modified. The rework could be extremely painful. If you do as much as remove one input terminal, you need to go through and fix all the places where that terminal was connected to. Now suppose the interface to every single vi becomes the following: typedef cluster in, error in, typedef cluster out, error out. If you remove one terminal in your input cluster, you may have places where you need to remove "Bundle by Names", but you may save yourself some time in places where that terminal did not matter. Has anyone experimented with this? Has this worked/not worked for anyone out there? Thanks, Carlo Quote Link to comment
LogMAN Posted March 24, 2013 Report Share Posted March 24, 2013 Typedes must be used with great care. It is easy to store entire typedef hierarchies to a single configuration file. Once you change your typedef the data could no longer be loaded from disk (this is true for binary files and sometimes for XML files). Searching for all 'Bundle' functions is munch more painfull than searching for a single VI. This is how I do it: 1) If I need to add an input, I extend the existing VI and give the input a default value and make it optional (if possible) -> No changes to existing code 2) If I need to make changes that are not compatible with the existing version (new connector pane pattern, required input, VI behaviour), I create a copy of the existing VI that must be used from now on (*_V2). The old VI gets a red background and propper documentation (depricated) -> Changes to existing code only if nessecary Notice: I provide the VIs on a seperate palette, so I can guide my collegues in that way. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.