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
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. 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. 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. Time Saving
Humans are the most expensive part of the
application development cycle.
• Template
• Conventions
• Scannable Code
8. Proper Context
Ensure script is run from intended contexts
• Saves time testing
• Create fewer bugs
• Generic scripts
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. Error-Trapping
Why Error trap?
• Empower users
• Speed up troubleshooting
• Create user trust
**Don’t make generic error messages
11. Allow User Abort [Off]
Doesn’t make sense for users to be able to escape
a script.
12. Set Error Capture [On]
Detailed error messaging empowers the user and
helps the developer troubleshoot