3 Replies Latest reply: Aug 12, 2015 2:41 AM by Frank Heuer RSS

    Best Practice for storing custom sub functions

    Frank Heuer

      Hello,

       

      I am just thinking about where to put script files with my custom functions within QDF. You know, each container has got the "..3.Include\4.Sub" folder. But isn't that folder an exclusive folder for the framework. So if I put a file there named i.e. "13.mysub.qvs" will it be replaced by an update procedure of QDF?

      Also: If I add my custom file to "99.LoadAll.qvs" I guess this adding will be worth nothing in respect to QDF updates.

       

      So is "..3.Include\6.Custom" a better location for placing custom sub scripts? I miss an advice from the QDF team in the documentation. So could you give an advice? Could you tell how QDF updates handle this use case?

       

      Regards

       

      Frank

        • Re: Best Practice for storing custom sub functions
          Rumen Vasilev

          Hi Frank,

           

          I had the same issue last week. I have just stored my own files with a bigger number e.g. "101.mysub.qvs", "102.mysub.qvs", "103.mysub.qvs" and so on.

          • Re: Best Practice for storing custom sub functions
            Damian Waldron

            My approach to date has been to place custom sub routines in

             

            99.Shared_Folders\3.Include\4.Sub\Custom

             

            - I place them in Shared as then all containers will automatically have access to the routines. Note that Shared is automatically loaded as part of init.

             

            - I create a Custom Folder to ensure that it is clear that these are not standard for the QDF.

             

            _ Although i haven't done it to date I am thinking of prefixing custom sub routines with Custom_ therefore ensuring that there is no chance of a standard routine with the same name.

             

            If you have some useful routines it would be great to share them. These may lead to further standard routines being included in the QDF.

              • Re: Best Practice for storing custom sub functions
                Frank Heuer

                Hallo Damian (and Rumen),

                 

                thank you for sharing your knowledge. Until know there are no more advices so I will start with Damians approach. I will create a subfolder named "Custom" and store my files there. Maybe I also put a 99.LoadAll file into it as well.

                 

                I will prefix my function names as well so there will be a custom namespace for my functions.

                I will use the prefix "Custom." now.

                 

                What do you think about the functions within QDF. Should future versions of QDF also prefix their functions with i.e. "QDF." (watch the full stop at the end, dividing prefix and function name) so that they have there own namespace as well?

                 

                So if this is a "best practice" QDF team should add a named prefix and a "Custom" folder to the QDF standard and documentation.

                Let me know what you think about.

                 

                Regards

                 

                Frank