Defensive Coding with Objects

In the world of programming, the notion of code which breaks, especially as a solution grows and is used by an every increasing number of people, is known as 'software brittleness'. This is, obviously, something you don't want within your FileMaker solution.

What's cool about FileMaker is the fact that, by itself, the software is quite robust and flexible. You can easily develop a solution in an evolutionary way. As you learn new skills, and ways of doing things, your solution can accommodate these changes by allowing you to rename and move things around pretty easily.

FileMaker's notion of context is one of the things you really need to be worried about. If you opt to perform another script using the Perform Script step or you choose the Go To Layout step then selecting the standard options won't cause much future pain.

However, if your solution starts to use any degree of abstraction, then you need to make sure to code things defensively. When you starting using steps like Go To Layout [by Number], Set Field [by Name] and use other abstracted methods of doing things, you need to ensure your code will be up to the task.

This video is all about how to safely and defensively approach FileMaker's nuances. While the functionality was originally created for a totally different reason, the fact that it's there means we can take advantage of it.

AttachmentSize
DefensiveCodingObjects.zip160.14 KB