Droplets Platform Naming Conventions |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
A quick word about the naming conventions that Droplet, Inc. uses will clarify any questions you have about the naming of various classes, objects and functions in the code that is described throughout the Droplets SDK. We include these so you’ll understand the naming scheme used in the Droplets API and throughout the tutorials – you’re obviously free to use whatever naming convention you like when writing to the Droplets API. Internal Droplet Inc. file names consist of a two-letter prefix followed by a descriptive name. The two-letter prefix should refer to the application; hence for Hello World we have used the prefix Hw, and for Headline Feeder we use the prefix Hf. Class names include the two-letter file prefix, plus an additional “T” prefixed to it. So our Application Server file is named “HfServer”, while the Server class is named “THfServer”. The chart below lists other name-prefix conventions that we’ve applied to our tutorial demos:
A few simple rules are adhered to in the naming of methods as well: Get and Set functions begin with Get and Set, respectively; Functions with boolean return values begin with Is, Has Requires or Wants, as appropriate; Initialize and Finalize are used as names for all methods that are called to set up a subsystem and then clean it up, respectively.
|