3 Replies Latest reply on Aug 12, 2016 2:17 PM by beverly

    Standards in naming objects in Filemaker

    beverly

      If you haven't been here, check it out:

       

      1. the Background (button) points you to this Standards Document (while referencing .fp7, has great merit today!)

       

      2. in this wondrous document, there is a recommendation on Scripts and Script Documentation (p. 53). The Screenshot shows "old style" when comments wrapped better. Now I propose this change (to single line comments):

       

      ====

      If

            

              1. Name: <<scriptname>> #####

           Set Variable 

           #

            

            1. HISTORY ####

            

      1. Created (date, by): 2016-08-12, bvoth

            

      1. Modifed (date, by): 2016-08-12, bvoth, comments inline on changes

           #

            

            1. PURPOSE ####

           #<<purpose of this script>>

           #

            

            1. DECLARED VARIABLES ####

            

      1. $var1 - <<details>>

            

      1. $var2 - <<details>>

           #

            

            1. REFERENCED VARIABLES ####

            

      1. $$var1 - <<details>>

            

      1. $$var2 - <<details>>

           #

            

            1. PARAMETERS ####

            

      1. Get ( ScriptParameter ) or Get ( ScriptResult )

           Set Variable

           Set Variable

            

      1. param1 - <<details>>

            

      1. param2 - <<details>>

           #

            

            1. IMPORTANT NOTES ####

           #<<add as needed>>

            

      1. for example, copy the script steps here and paste at the beginning of every script! make revisions as needed

      End If

      ====

       

      3. pay close attention to the NAMING for all the objects in FM.

       

      Anyway, I mostly wanted to point the newbies (and the oldies) to these great resources.

       

      beverly

       

        • 1. Re: Standards in naming objects in Filemaker
          beverly

          dang! munged again... don't use # at the start of a line when posting by email...

          see if this is better:

          If [ 1 // toggle and/or way to indent ]

            ##### Name: <<scriptname>> #####

            Set Variable [ $sn; Value:Get ( ScriptName ) ]

            #

            #### HISTORY ####

            # Created (date, by): 2016-08-12, bvoth

            # Modifed (date, by): 2016-08-12, bvoth, comments inline on changes

            #

            #### PURPOSE ####

            #<<purpose of this script>>

            #

            #### DECLARED VARIABLES ####

            # $var1 - <<details>>

            # $var2 - <<details>>

            #

            #### REFERENCED VARIABLES ####

            # $$var1 - <<details>>

            # $$var2 - <<details>>

            #

            #### PARAMETERS ####

            # Get ( ScriptParameter ) or Get ( ScriptResult )

            Set Variable [ $sp; Value:Get ( ScriptParameter ) ]

            Set Variable [ $sr; Value:Get ( ScriptResult ) ]

            # param1 - <<details>>

            # param2 - <<details>>

            #

            #### IMPORTANT NOTES ####

            #<<add as needed>>

            # for example, copy the script steps here and paste at the beginning of every script! make revisions as needed

          End If

          1 of 1 people found this helpful
          • 2. Re: Standards in naming objects in Filemaker
            David Moyer

            I've seen this before at NASA.

            I kid.  I kid.

            I know it's best practices and all.  But to me, like FileMaker itself, there's a trade-off between quick deployment and "rocket science".  I use the term Rocket Science to denote anything that absolutely positively must work perfectly from point zero; and everybody has to communicate properly with everybody else, without fail.

            On the other end of the spectrum is just pooping out some quick solution that turns out to be subversive.

             

            In the middle is a happy medium ($).  It all depends on what's at stake.  A former boss used to happily announce that "Dave just sh.. out a solution for us, overnight.  Awesome!"  Of course, those quick solutions didn't have a lot of commenting.  (I do use descriptive $variable names, always.)

             

            p.s. I'm not trying to discourage commenting, at all.

            • 3. Re: Standards in naming objects in Filemaker
              beverly

              If I use it as an "outline" prior to actually writing the script, I tend to make less bone-head errors when writing the script.

              Definitely a trade-off sometimes, but crucial in multi-developer environs.

               

              beverly

              1 of 1 people found this helpful