Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

FileMaker Scripting Best Practices

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Nächste SlideShare
Addon Features FileMaker 13
Addon Features FileMaker 13
Wird geladen in …3
×

Hier ansehen

1 von 33 Anzeige

FileMaker Scripting Best Practices

Herunterladen, um offline zu lesen

Emory Brown, Application Developer at DB Services presents, FileMaker Scripting Best Practices. Emory will delve into what differentiates a well-written script from a poorly considered one. He will look at the thought process behind certain scripting practices that both speed up development and increase flexibility of code. Topics to be covered include: why good commenting of code matters, how to error-trap effectively, and how to speed up testing by only allowing scripts to run in their intended context.

Learn about the following

• Coding in a readable way
• Effective error-trapping
• Good commenting
• Ways to speed up testing

Emory Brown, Application Developer at DB Services presents, FileMaker Scripting Best Practices. Emory will delve into what differentiates a well-written script from a poorly considered one. He will look at the thought process behind certain scripting practices that both speed up development and increase flexibility of code. Topics to be covered include: why good commenting of code matters, how to error-trap effectively, and how to speed up testing by only allowing scripts to run in their intended context.

Learn about the following

• Coding in a readable way
• Effective error-trapping
• Good commenting
• Ways to speed up testing

Anzeige
Anzeige

Weitere Verwandte Inhalte

Diashows für Sie (20)

Andere mochten auch (20)

Anzeige

Ähnlich wie FileMaker Scripting Best Practices (20)

Anzeige

Aktuellste (20)

FileMaker Scripting Best Practices

  1. 1. SCRIPTING BEST PRACTICES Emory Brown Application Developer https://www.dbservices.com
  2. 2. Questions If you have a question, please typist it into the console. If we don’t get to your question, please send it to fba@dbservices.com
  3. 3. About You
  4. 4. About DB Services •We are a team of analysts, developers, and designers creating custom applications to make your organization more effective and efficient. Learn more about our FileMaker services on our website. •If you leave this presentation wanting learn more! Check out our FileMaker Blog where we post new content each month. •To learn more about DB Services, check out our website at www.dbservices.com
  5. 5. Background Work Read more on me on our website, https://www.dbservices.com/, in the About section • Application Developer at
 DB Services • Certified in 15, 14,13, 12, 11 • Working with FileMaker for 6 years • Sponsor at FileMaker Developer Conference • Member of FM Academy • Global presence (Canada, Europe, Africa, South America) • Team focused on adding value
  6. 6. Scripting When coding, choose two: • It works • Easy to read • Quick to write Conventions help make code that works, faster to read and write.
  7. 7. Time Saving Humans are the most expensive part of the application development cycle. • Template • Conventions • Scannable Code
  8. 8. Proper Context Ensure script is run from intended contexts • Saves time testing • Create fewer bugs • Generic scripts
  9. 9. Error-Trapping Scripts Three useful sub-scripts to consider in every script • Halt of not in browse mode • Halt if no records in found set • Commit record and halt if invalid*
  10. 10. Error-Trapping Why Error trap? • Empower users • Speed up troubleshooting • Create user trust **Don’t make generic error messages
  11. 11. Allow User Abort [Off] Doesn’t make sense for users to be able to escape a script.
  12. 12. Set Error Capture [On] Detailed error messaging empowers the user and helps the developer troubleshoot
  13. 13. Exit Script Step
  14. 14. Error-Trapping What to trap for • New Record • Delete Record • Set field • Go to related record* • Interacting with systems outside of FileMaker
  15. 15. Commenting Not all comments are created equal • Readability • Clarity • Scannability
  16. 16. Commenting Readability • Housekeeping • Section Headers • Spacing • Notations
  17. 17. No Comments
  18. 18. Minimal Spacing
  19. 19. Too Many
  20. 20. Clear Sections
  21. 21. Commenting Clarity vs Noise • Anything being used in a non- conventional way* • Stacked objects • Sort script steps*
  22. 22. Hidden/Stacked Objects
  23. 23. Commenting Most important thing is DOING IT • Update comments as you code • Create a template script with sections
  24. 24. Modular Code Pros & Cons • Can save time testing or updating • Can also add time to later updates • Don’t over-engineer
  25. 25. Too Much *Inconsistant
  26. 26. Too Much
  27. 27. Complex Code
  28. 28. Ziptastic API
  29. 29. Evaluate
  30. 30. Evaluate Dangers of Evaluate( ) • Tempts you to hardcode field names • Slower than native code • Security risks
  31. 31. Tips & Tricks Script Debugger • Step-Into debugger • Turn off script trigger button
  32. 32. Naming Code How to name variables well • Self-describing noun • Unique name • NO right answer
  33. 33. Q&A

×