Learn Designing and Creating an Application (CAD) with Interactive Flashcards
Master key concepts in Designing and Creating an Application through our interactive flashcard system. Click on each card to reveal detailed explanations and enhance your understanding.
Application Fitness Assessment for ServiceNow
Application Fitness Assessment in ServiceNow is a critical evaluation tool used during the design and creation of applications on the ServiceNow platform. It helps developers and architects assess whether their application adheres to best practices, platform standards, and organizational requirements before deployment.
The Application Fitness Assessment evaluates several key areas:
1. **Performance and Scalability**: It analyzes whether the application is designed to handle expected workloads efficiently without degrading platform performance. This includes reviewing database queries, script execution times, and resource consumption.
2. **Security Compliance**: The assessment checks for proper access controls, role-based permissions, data encryption practices, and adherence to security policies. It ensures that sensitive data is protected and that the application follows the principle of least privilege.
3. **Maintainability and Upgradability**: It evaluates whether the application is built in a way that supports future upgrades and maintenance. This includes checking for proper use of update sets, avoidance of hard-coded values, and adherence to modular design principles.
4. **Best Practice Adherence**: The assessment reviews coding standards, naming conventions, proper use of platform APIs, and avoidance of anti-patterns such as synchronous AJAX calls, excessive business rules, or unnecessary global scripts.
5. **User Experience**: It examines the application's interface design, ensuring it aligns with ServiceNow's UI standards and provides an intuitive experience for end users.
6. **Integration and Dependencies**: The assessment identifies external dependencies and integration points, ensuring they are properly documented and managed.
For Certified Application Developers, understanding the Application Fitness Assessment is essential because it directly impacts application quality and platform health. Developers should proactively run these assessments during the development lifecycle rather than waiting until deployment. ServiceNow provides tools like Instance Scan and App Engine Studio checks to automate portions of this evaluation.
By leveraging the Application Fitness Assessment, organizations can reduce technical debt, improve application reliability, ensure compliance with governance policies, and deliver high-quality applications that align with ServiceNow platform standards.
ServiceNow Studio IDE
ServiceNow Studio IDE (Integrated Development Environment) is a powerful, browser-based development environment designed specifically for building, customizing, and managing applications on the ServiceNow platform. It provides developers with a centralized workspace that streamlines the entire application development lifecycle.
Studio IDE offers a unified interface where developers can access and manage all application artifacts in one place, including tables, forms, scripts, business rules, UI pages, client scripts, script includes, and more. This eliminates the need to navigate through multiple modules in the standard ServiceNow interface.
Key features of ServiceNow Studio IDE include:
1. **Application Explorer**: A hierarchical tree view on the left panel that displays all files and components associated with the current application, organized by type for easy navigation.
2. **Code Editor**: A robust code editing environment with syntax highlighting, code completion, IntelliSense, and real-time error detection, supporting JavaScript, HTML, CSS, and other languages used in ServiceNow development.
3. **Source Control Integration**: Built-in integration with Git repositories, enabling version control, branching, merging, and collaborative development. Developers can link applications to source control and manage code changes directly from Studio.
4. **Application Creation Wizard**: A guided process to create new scoped applications, allowing developers to define application scope, tables, and basic configurations quickly.
5. **Search and Navigation**: Global search capabilities to find files, records, and code across the application efficiently.
6. **Debugging Tools**: Tools for testing and debugging scripts directly within the IDE.
7. **Team Development**: Support for collaborative development, allowing multiple developers to work on the same application simultaneously.
Studio IDE enforces application scoping, ensuring that development artifacts are properly contained within their designated application scope. This promotes modular development and prevents conflicts between applications.
To access Studio, developers navigate to the Application Studio URL or through the System Applications module. It is an essential tool for any ServiceNow Certified Application Developer, as it provides the primary environment for designing, building, and deploying custom applications on the platform.
Table Design and Creation
Table Design and Creation is a fundamental aspect of application development in ServiceNow, forming the backbone of how data is structured, stored, and managed within the platform.
**Table Design** involves planning the schema before creation. Key considerations include:
1. **Identifying Data Requirements**: Determine what data your application needs to store. Analyze business processes to define entities, their attributes, and relationships between them.
2. **Choosing Table Types**: ServiceNow offers several table options:
- **Base Tables**: Standalone tables for unique data structures.
- **Extended Tables**: Tables that inherit fields and configurations from a parent table (e.g., extending the Task table to leverage task-specific functionality like assignments, SLAs, and approvals).
- **Many-to-Many Tables**: Used to define complex relationships between records.
3. **Field Design**: Define appropriate field types (String, Integer, Reference, Choice, Date/Time, etc.), set field lengths, mandatory constraints, default values, and unique constraints to ensure data integrity.
4. **Relationships**: Plan reference fields and related lists to establish one-to-many or many-to-many relationships between tables, ensuring proper data normalization.
**Table Creation** in ServiceNow can be accomplished through:
- **Application Studio**: A guided interface within the Studio IDE where developers can create tables as part of a scoped application.
- **Table Module**: Navigate to System Definition > Tables to manually create and configure tables.
- **Auto-creation**: Importing data via spreadsheets can auto-generate tables.
During creation, developers configure important properties such as:
- **Label and Name**: Define user-friendly and system names.
- **Access Controls**: Set ACLs to control who can read, write, create, or delete records.
- **Application Scope**: Assign the table to the appropriate scoped application.
- **Extensible**: Determine if other tables can extend it.
Best practices include extending existing base system tables (like Task) when possible, using proper naming conventions, planning for scalability, and applying the principle of least privilege for access controls. Proper table design ensures efficient queries, maintainability, and seamless integration with platform features.
Field Types and Attributes
In ServiceNow, field types and attributes are fundamental concepts when designing and creating applications, as they define how data is stored, validated, and displayed within tables.
**Field Types** determine the kind of data a field can hold. ServiceNow provides a wide range of field types, including:
- **String**: Stores text values with a configurable maximum length.
- **Integer/Long/Decimal/Float**: Numeric types for whole numbers or decimal values.
- **True/False (Boolean)**: Stores binary true or false values.
- **Date/Date-Time**: Stores date or date-time values for scheduling and tracking.
- **Reference**: Creates a relationship to a record in another table, enabling relational data modeling.
- **Choice**: Allows users to select from a predefined list of options.
- **Journal/Journal Input**: Used for activity logs and work notes, storing multiple entries over time.
- **HTML/URL**: Stores formatted HTML content or web addresses.
- **Glide List**: Stores multiple reference values in a single field.
- **Document ID**: A dynamic reference that can point to records in different tables.
- **Conditions**: Stores encoded query conditions used in filters and workflows.
Choosing the correct field type is critical because it affects data validation, UI rendering, and query performance.
**Attributes** are additional configurations applied to fields that modify their behavior beyond the default field type settings. Attributes are set as key-value pairs and can control aspects such as:
- **max_length**: Defines the maximum character length for string fields.
- **no_sort**: Prevents sorting on that column in list views.
- **ref_auto_completer**: Customizes the auto-complete behavior for reference fields.
- **edge_encryption_enabled**: Enables encryption for sensitive data.
- **is_searchable**: Controls whether the field appears in search results.
- **default_rows**: Sets the default number of visible rows in journal fields.
Attributes provide granular control over field behavior without requiring custom scripting. They are configured through the dictionary entry for each field. Understanding field types and attributes ensures proper data integrity, optimal user experience, and efficient application design within the ServiceNow platform.
Reference Fields and Relationships
Reference Fields and Relationships are fundamental concepts in ServiceNow application development that enable you to create meaningful connections between tables, ensuring data integrity and efficient data modeling.
**Reference Fields:**
A Reference field is a field type in ServiceNow that creates a relationship between two tables by storing the sys_id (unique identifier) of a record from another table. When you define a reference field on a table, it essentially creates a foreign key relationship. For example, an Incident table has a reference field called 'Assigned to' that points to the User (sys_user) table. Instead of duplicating user data, it simply stores the sys_id of the referenced user record.
Reference fields provide features like:
- Auto-complete lookup functionality for users
- Dot-walking, which allows you to traverse relationships to access fields on related tables (e.g., incident.assigned_to.email)
- Reference qualifiers to filter which records can be selected
- Display values that show a human-readable value rather than the sys_id
**Relationships:**
ServiceNow supports several types of relationships:
1. **One-to-Many (1:M):** Created through reference fields. One record in a parent table can relate to many records in a child table. Example: One user can have many incidents assigned to them.
2. **Many-to-Many (M:M):** Created using M2M relationship tables that act as intermediary junction tables between two tables. Example: Users can belong to multiple groups, and groups can contain multiple users.
3. **One-to-One (1:1):** A special case of one-to-many where you enforce uniqueness on the reference field.
4. **Database Views:** Allow you to join tables for reporting purposes without creating traditional relationships.
**Related Lists:**
Related lists display related records at the bottom of a form, showing child records linked via reference fields. These are configured through the relationship definitions and provide contextual visibility.
Understanding these relationships is critical for designing normalized, efficient applications that leverage ServiceNow's relational data model effectively while maintaining data consistency and enabling powerful querying capabilities.
Table Inheritance and Extensions
Table Inheritance and Extensions are fundamental concepts in ServiceNow's database architecture that allow developers to build efficient, hierarchical data models when designing applications.
**Table Inheritance** refers to the parent-child relationship between tables in ServiceNow. When a table extends another table, the child table inherits all fields, business rules, client scripts, ACLs, and other configurations from the parent table. This follows an object-oriented programming paradigm, promoting reusability and consistency across the platform.
The most common example is the **Task [task]** table, which serves as a base table for many ServiceNow tables such as Incident [incident], Problem [problem], Change Request [change_request], and others. Each of these child tables automatically inherits fields like Number, State, Priority, Assigned To, and Short Description from the Task table while adding their own unique fields.
**Table Extensions** are the mechanism by which you create these child tables. When you extend a table, ServiceNow creates a new table that shares the same underlying base record with the parent. The child table's unique fields are stored in a separate database table, and ServiceNow joins them seamlessly at runtime. This means:
1. **Shared Fields**: Parent table fields are stored in the parent's database table.
2. **Extended Fields**: New fields specific to the child are stored in the child's database table.
3. **Dot-walking**: You can traverse relationships across the hierarchy.
**Key Benefits:**
- **Reusability**: Common configurations are defined once at the parent level.
- **Consistency**: Ensures standardized fields and behaviors across related tables.
- **Scalability**: New tables can be created quickly by extending existing ones.
- **Reporting**: You can query the parent table to retrieve records across all child tables.
**Best Practices:**
- Extend existing base tables (like Task) when your application involves workflow-driven processes.
- Create standalone tables when no logical parent relationship exists.
- Avoid deep inheritance chains, as they can impact performance and complexity.
Understanding table inheritance is essential for designing well-structured ServiceNow applications that leverage the platform's built-in capabilities effectively.
Many-to-Many Relationships
Many-to-Many Relationships in ServiceNow allow two tables to be related in a way where multiple records from one table can be associated with multiple records from another table. Unlike one-to-many relationships where a single parent record links to multiple child records, many-to-many relationships enable flexible, bidirectional associations between records across tables.
In ServiceNow, many-to-many relationships are implemented using an intermediary table, often called a relationship table or junction table. This intermediary table contains reference fields pointing to both related tables, effectively breaking the many-to-many relationship into two one-to-many relationships.
For example, consider a scenario where you have a 'Users' table and a 'Projects' table. A user can work on multiple projects, and a project can have multiple users. To model this, ServiceNow creates a many-to-many (M2M) relationship table that stores pairs of references — one to the User record and one to the Project record.
To create a many-to-many relationship in ServiceNow, you navigate to System Definition > Many to Many Relationships and define the relationship by specifying the two tables involved. ServiceNow automatically generates the intermediary table with the appropriate reference fields. Once created, related lists appear on both tables' forms, allowing users to easily associate and view related records from either side.
Key characteristics of many-to-many relationships include:
1. **Bidirectional visibility** — Related lists are available on both tables' forms.
2. **Junction table** — An automatically created intermediary table manages the associations.
3. **Flexible associations** — Records can be linked and unlinked without modifying the core table structure.
4. **No hierarchy** — Neither table is considered the parent or child.
When designing applications, many-to-many relationships are essential for modeling real-world scenarios where entities have complex, non-hierarchical associations. They are commonly used in scenarios involving skills and users, categories and items, or groups and roles. Understanding and properly implementing M2M relationships is critical for building robust, scalable applications in ServiceNow.
Application Menus and Modules
In ServiceNow, Application Menus and Modules are fundamental components used to organize and navigate applications within the platform. They form the navigational structure that users interact with in the Application Navigator (left sidebar).
**Application Menus** serve as the top-level containers or categories in the navigation pane. They represent the main application grouping and act as parent entries under which related modules are organized. When you create a new application in ServiceNow, an application menu is typically generated automatically. Key properties of an application menu include its title, order (which determines its position in the navigator), roles required to view it, and its active status. Application menus can be customized to control visibility based on user roles, ensuring that only authorized users can access specific applications.
**Modules** are the individual navigation items nested beneath application menus. They function as links that direct users to specific pages, lists, records, or content within the platform. Modules can point to various types of content, including list views of tables, filtered record lists, URLs, content pages, scripts, homepages, and more. Each module has properties such as its title, order within the menu, link type, roles required for access, and optional filter conditions.
When designing an application, developers configure application menus and modules through the **Application Navigator** or via **Studio**. You can create modules by navigating to System Definition > Modules and specifying the link type and target content.
Key considerations when designing menus and modules include:
- **Role-based access**: Assign appropriate roles to restrict visibility.
- **Ordering**: Use numeric ordering to arrange menus and modules logically.
- **Naming conventions**: Use clear, descriptive names for easy navigation.
- **Filter conditions**: Apply conditions on list-type modules to display relevant records.
Proper organization of application menus and modules ensures a seamless user experience, enabling users to efficiently navigate and interact with the application's features and data within the ServiceNow platform.
Application Scope
Application Scope in ServiceNow is a fundamental concept that defines the boundaries and namespace for an application, ensuring logical separation and protection of application resources within the platform. When you create an application in ServiceNow, it is assigned a unique scope that acts as a container for all its components, including tables, scripts, business rules, UI pages, and other artifacts.
Every application scope has a unique namespace identifier, typically following the format 'x_<vendor_prefix>_<app_name>'. This naming convention prevents naming conflicts between different applications, even if they have similarly named components. For instance, two different scoped applications can each have a table called 'tasks' without conflicting because their fully qualified names will differ based on their scope prefix.
Application Scope provides several key benefits:
1. **Protection**: Scoped applications protect their resources from being modified or accessed by other applications unless explicitly allowed. This ensures that one application cannot inadvertently alter another application's behavior.
2. **Portability**: Scoped applications can be easily published, shared, and installed across different ServiceNow instances through the ServiceNow Store or Update Sets, maintaining their integrity.
3. **Access Control**: Developers can configure cross-scope access policies to determine whether other applications can read, write, or execute resources within their scope. This is managed through Application Cross-Scope Access settings.
4. **Runtime Protection**: Scripts running within a scope are restricted to accessing only the resources within their own scope by default, preventing unintended interactions.
There are two types of scopes in ServiceNow: **Global Scope** and **Private (Application) Scope**. The Global scope is the default scope where legacy and platform-level resources reside, accessible to all applications. Private scopes are dedicated to specific applications and enforce strict access boundaries.
When designing an application, choosing the correct scope is critical. Best practice recommends using a scoped application rather than the Global scope to leverage all the protection and portability benefits that Application Scope provides, ensuring clean development practices and maintainability.
Update Sets
Update Sets in ServiceNow are a critical mechanism for tracking and migrating customizations and configuration changes between different instances (e.g., from Development to Testing to Production). They serve as a container that groups all changes made to an instance, allowing developers to move those changes systematically through the development lifecycle.
When a developer makes changes in ServiceNow—such as creating or modifying tables, scripts, business rules, UI policies, workflows, or other application artifacts—those changes are automatically captured in the current active Update Set. Each change is recorded as a Customer Update, which contains the XML representation of the modified record.
Key concepts of Update Sets include:
1. **Local Update Sets**: Created on the source instance where development occurs. Developers can create multiple update sets and switch between them to organize changes logically by feature or project.
2. **Default Update Set**: Every instance has a Default Update Set. If no specific update set is selected, changes are captured here. Best practice is to always use a named update set rather than the default.
3. **States**: Update Sets progress through states—In Progress, Complete, and Retrieved. Only one update set can be active at a time per user, and it must be in the 'In Progress' state to capture changes.
4. **Retrieval and Preview**: When migrating, the target instance retrieves the update set from the source. During preview, the system checks for conflicts or issues such as missing dependencies.
5. **Commit**: After resolving any preview problems, the update set is committed, applying all changes to the target instance.
6. **Batch Update Sets**: Multiple related update sets can be grouped into a batch for streamlined migration.
Best practices include using descriptive naming conventions, keeping update sets focused on specific features, avoiding cross-contamination between projects, and thoroughly testing before committing to production. Update Sets are essential for maintaining governance, traceability, and controlled deployment in ServiceNow application development, ensuring that changes are predictable and reversible when necessary.
Application Properties Configuration
Application Properties Configuration in ServiceNow refers to the process of defining and managing custom properties that control the behavior and settings of a scoped application. These properties act as configurable variables that administrators and developers can adjust without modifying the underlying code, providing flexibility and maintainability.
When designing an application in ServiceNow, developers can create application properties through the System Properties module or by navigating to the application's settings. Each property consists of a name, type, default value, and description. Properties can store various data types including strings, booleans, integers, and choice lists.
Application properties are scoped to the specific application, meaning they are encapsulated within the application's namespace. This prevents naming conflicts with other applications on the same instance. The naming convention typically follows the format 'x_<vendor>_<app_name>.property_name' for scoped applications.
Developers can access these properties programmatically using the gs.getProperty() method in global scope or the System Properties API in scoped applications. This allows scripts, business rules, and other server-side logic to dynamically retrieve configuration values at runtime.
Key benefits of Application Properties Configuration include:
1. **Separation of Concerns**: Configuration is separated from code logic, making applications easier to maintain and update.
2. **Environment Flexibility**: Properties can be set differently across development, testing, and production environments without code changes.
3. **User Accessibility**: Administrators can modify application behavior through a user-friendly interface without requiring developer intervention.
4. **Security**: Properties can be marked as private to restrict visibility and access to authorized users only.
Developers can also create Application Property Categories to group related properties together, improving organization and usability. These categories appear in the application's configuration module, providing a centralized location for managing all application settings.
Proper configuration of application properties is essential for building robust, scalable, and maintainable applications on the ServiceNow platform, aligning with best practices for the Certified Application Developer exam.
Dictionary Overrides
Dictionary Overrides in ServiceNow allow developers to modify the behavior and attributes of a field that has been inherited from a parent table, without altering the original field definition on the parent table itself. This is a critical concept in ServiceNow application development, particularly when designing applications that leverage table inheritance.
When a child table extends a parent table, it inherits all the fields defined on the parent. However, there are scenarios where the child table requires different field behavior than what the parent defines. Dictionary Overrides enable developers to change specific field properties at the child table level while keeping the parent table's definition intact.
Key attributes that can be overridden include:
1. **Default Value** – You can set a different default value for the field on the child table.
2. **Mandatory** – A field that is optional on the parent can be made mandatory on the child table, or vice versa.
3. **Read Only** – You can make a field read-only on the child table even if it is editable on the parent.
4. **Reference Qualifier** – For reference fields, you can apply a different reference qualifier to filter the available options differently on the child table.
5. **Dependent Field** – You can change dependent field relationships.
6. **Calculation** – Override the calculated value for the field.
Dictionary Overrides are managed through the sys_dictionary_override table or accessed via the dictionary entry form. To create an override, navigate to the child table's dictionary entries, select the inherited field, and modify the desired properties.
This mechanism supports the principle of inheritance while providing flexibility. It ensures that customizations on child tables do not break or impact the parent table or other child tables sharing the same parent. This is especially useful in applications built on common base tables like Task, where Incident, Problem, and Change all inherit fields but may require different field behaviors. Dictionary Overrides are essential for clean, maintainable application design in ServiceNow.