Guidewire Best Practices Exam study guide
WITH COMPLETE SOLUTION
Avoid using internal path for your classes - com.guidewire.* should be avoided. These can always
b b b b b b b b b b b b b b
be potentially changed or replaced during an upgrade.
b b b b b b b b
When referencing typecodes, use the static property on the typelist class instead of the string
b b b b b b b b b b b b b b
representation - Use TC_TYPECODE instead of "typecode", example: LossCause.TC_REAREND
b b b b b b b b b
instead of "rearend"
b b b
Use the text for logical operators instead of the symbols - Use "and","or", and "not" instead of
b b b b b b b b b b b b b b b b
"&&", "||", and "!"
b b b b
Code placement - 1) Avoid placing code within the CODE tab of a PCF. Create a UI helper class
b b b b b b b b b b b b b b b b b b
instead
b
2) Avoid extending entity enhancements with code supporting UI operations
b b b b b b b b b
Avoid using deprecated classes and methods - Guidewire will eventually remove deprecated
b b b b b b b b b b b
classes and methods.
b b b
Turn on and run Studio Inspections - These analyze configuration resources
b b b b b b b b b b
Use whitespace effectively - Add spaces around operators
b b b b b b b
Do not add spaces between parentheses and operators
b b b b b b b
Indent logical blocks of code by two spaces only
b b b b b b b b
Add a blank line after code blocks
b b b b b b
Add two blank lines after methods, including the last method in a class
b b b b b b b b b b b b
,Comments and Annotations - Document new classes and functions with Javadoc-style comments
b b b b b b b b b b b
Use single-line comments within functions and methods when you need to clarify the intent of the
b b b b b b b b b b b b b b b
code
b
Use GoseDoc annotations which are included when generating GosuDoc
b b b b b b b b
"Upgrade-Safe" naming conventions: Add the suffix _Ext to - Columns added to existing entities
b b b b b b b b b b b b b b
Typecodes added to existing typelists b b b b b
The name of custom entities
b b b b b
The name of custom typelists
b b b b
New PCF files
b b
Script parameters b
Package naming conventions - Use the format customer.application.featurecategory.feature
b b b b b b b
Customer - company name abbreviation b b b b b
Application- InsuranceSuite application code (pc, bc, cc, suite)b b b b b b b
Feature Category - major feature (delinquency, configuration, integration)
b b b b b b b
Feature - feature (rating, catastrophe, authentication)
b b b b b
Example: si.suite.integration.authenticationb
Class naming conventions - Use UpperCamelCase
b b b b b
Do not add _Ext to classes within customer package spaces
b b b b b b b b b
Function naming conventions - Use lowerCamelCase
b b b b b
Use a verb that describes that the function is doing i.e. verifyAddress
b b b b b b b b b b b
Do not add _Ext suffix to private functions or enhancements in customer package spaces
b b b b b b b b b b b b b
, Variable naming conventions - Member variable names use lowerCamelCase with a leading
b b b b b b b b b b b
underscore i.e. _pluginCallbackHandler
b b b
Local variable names use lowerCamelCase short names that describe the purpose i.e.
b b b b b b b b b b b
latestPolicyRevision
b
Display key naming conventions - Add suffix _Ext too all new display keys
b b b b b b b b b b b b
Do not modify automatically generated display keys
b b b b b b
Logging is - The process of recording application actions and state to a secondary interface
b b b b b b b b b b b b b b
Logging is used for - Application maintenance and troubleshooting
b b b b b b b b
Creating statistics relating to application usage
b b b b b
Auditing by capturing significant events
b b b b
Typical events to log are - Success / Failure - a transaction or action has succeeded or failed
b b b b b b b b b b b b b b b b b
Recovery - a system went down or connection failed, retried, and recovered
b b b b b b b b b b b
Identification - any large functional areas such as integration, rating, reinsurance, and rules
b b b b b b b b b b b b
Logging components - Logger - has a category and level, sends content to an Appender
b b b b b b b b b b b b b b
Logging components - Appender - is an output destination (server console or rolling file)
b b b b b b b b b b b b b
Logging components - Layout - defines the format of the content sent to an appender
b b b b b b b b b b b b b b
Logging Level - Trace - Description: Fine-grained informational events
b b b b b b b b
When to use: Log method entry and exit
b b b b b b b
Logging Level - Debug - Description: Detailed informational events
b b b b b b b b
WITH COMPLETE SOLUTION
Avoid using internal path for your classes - com.guidewire.* should be avoided. These can always
b b b b b b b b b b b b b b
be potentially changed or replaced during an upgrade.
b b b b b b b b
When referencing typecodes, use the static property on the typelist class instead of the string
b b b b b b b b b b b b b b
representation - Use TC_TYPECODE instead of "typecode", example: LossCause.TC_REAREND
b b b b b b b b b
instead of "rearend"
b b b
Use the text for logical operators instead of the symbols - Use "and","or", and "not" instead of
b b b b b b b b b b b b b b b b
"&&", "||", and "!"
b b b b
Code placement - 1) Avoid placing code within the CODE tab of a PCF. Create a UI helper class
b b b b b b b b b b b b b b b b b b
instead
b
2) Avoid extending entity enhancements with code supporting UI operations
b b b b b b b b b
Avoid using deprecated classes and methods - Guidewire will eventually remove deprecated
b b b b b b b b b b b
classes and methods.
b b b
Turn on and run Studio Inspections - These analyze configuration resources
b b b b b b b b b b
Use whitespace effectively - Add spaces around operators
b b b b b b b
Do not add spaces between parentheses and operators
b b b b b b b
Indent logical blocks of code by two spaces only
b b b b b b b b
Add a blank line after code blocks
b b b b b b
Add two blank lines after methods, including the last method in a class
b b b b b b b b b b b b
,Comments and Annotations - Document new classes and functions with Javadoc-style comments
b b b b b b b b b b b
Use single-line comments within functions and methods when you need to clarify the intent of the
b b b b b b b b b b b b b b b
code
b
Use GoseDoc annotations which are included when generating GosuDoc
b b b b b b b b
"Upgrade-Safe" naming conventions: Add the suffix _Ext to - Columns added to existing entities
b b b b b b b b b b b b b b
Typecodes added to existing typelists b b b b b
The name of custom entities
b b b b b
The name of custom typelists
b b b b
New PCF files
b b
Script parameters b
Package naming conventions - Use the format customer.application.featurecategory.feature
b b b b b b b
Customer - company name abbreviation b b b b b
Application- InsuranceSuite application code (pc, bc, cc, suite)b b b b b b b
Feature Category - major feature (delinquency, configuration, integration)
b b b b b b b
Feature - feature (rating, catastrophe, authentication)
b b b b b
Example: si.suite.integration.authenticationb
Class naming conventions - Use UpperCamelCase
b b b b b
Do not add _Ext to classes within customer package spaces
b b b b b b b b b
Function naming conventions - Use lowerCamelCase
b b b b b
Use a verb that describes that the function is doing i.e. verifyAddress
b b b b b b b b b b b
Do not add _Ext suffix to private functions or enhancements in customer package spaces
b b b b b b b b b b b b b
, Variable naming conventions - Member variable names use lowerCamelCase with a leading
b b b b b b b b b b b
underscore i.e. _pluginCallbackHandler
b b b
Local variable names use lowerCamelCase short names that describe the purpose i.e.
b b b b b b b b b b b
latestPolicyRevision
b
Display key naming conventions - Add suffix _Ext too all new display keys
b b b b b b b b b b b b
Do not modify automatically generated display keys
b b b b b b
Logging is - The process of recording application actions and state to a secondary interface
b b b b b b b b b b b b b b
Logging is used for - Application maintenance and troubleshooting
b b b b b b b b
Creating statistics relating to application usage
b b b b b
Auditing by capturing significant events
b b b b
Typical events to log are - Success / Failure - a transaction or action has succeeded or failed
b b b b b b b b b b b b b b b b b
Recovery - a system went down or connection failed, retried, and recovered
b b b b b b b b b b b
Identification - any large functional areas such as integration, rating, reinsurance, and rules
b b b b b b b b b b b b
Logging components - Logger - has a category and level, sends content to an Appender
b b b b b b b b b b b b b b
Logging components - Appender - is an output destination (server console or rolling file)
b b b b b b b b b b b b b
Logging components - Layout - defines the format of the content sent to an appender
b b b b b b b b b b b b b b
Logging Level - Trace - Description: Fine-grained informational events
b b b b b b b b
When to use: Log method entry and exit
b b b b b b b
Logging Level - Debug - Description: Detailed informational events
b b b b b b b b