Namespace and Class Utilities for Managed Package Instantiation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In managed packages, there are limitations in dynamically referencing namespaces and instantiating classes, particularly when developing software that needs to operate across different environments, such as from a QA environment to a production environment, and when trying to instantiate classes outside the managed package scope.

Innovation Solution

The introduction of namespace and class utilities that allow dynamic namespace identification and class instantiation from outside the managed package, enabling developers to reference namespaces and instantiate classes without requiring global access modifiers, by using utilities like utilNS for namespace management and utilInstantiator for class instantiation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If developers use managed packages with predetermined namespaces, then package security and control are improved, but dynamic namespace reference capability deteriorates

Engineering Contradiction:
Improvepackage securityVSAvoiddynamic namespace reference
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent introduces a namespace utility class as an intermediary between the managed package's predetermined namespace and the developer's code. This utility provides static methods that return the correct namespace string, allowing developers to dynamically reference namespaces without directly accessing or modifying package files. The intermediary maintains security while enabling adaptability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If only globally scoped classes are instantiated by clients, then package security is improved, but class instantiation flexibility deteriorates

Engineering Contradiction:
Improvepackage securityVSAvoidclass instantiation flexibility
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent introduces a class instantiation utility as an intermediary that sits between client code and the managed package's class instantiation mechanism. This utility provides static methods that handle the instantiation process, allowing clients to instantiate classes without directly accessing package files or using global access modifiers. The intermediary maintains security boundaries while enabling flexible class creation.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Stability of the object's composition

If package files are protected from modification, then managed package integrity is improved, but development flexibility deteriorates

Engineering Contradiction:
Improvepackage integrityVSAvoiddevelopment flexibility
Core Design Contradiction:
Stability of the object's compositionVSEase of manufacture

Solution Approach 1:

The patent segments the package into two distinct layers: protected package files that maintain integrity and cannot be modified by clients, and utility classes that provide controlled access to namespace and class instantiation functionality. This segmentation allows the core package to remain immutable while still enabling development flexibility through the exposed utility interfaces.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The utility classes act as intermediaries that bridge the gap between package integrity requirements and development flexibility needs. These utilities provide controlled access to namespace information and class instantiation capabilities without allowing direct modification of protected package files, thus maintaining integrity while enabling flexible development.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Reliability

If global access modifiers are required for class instantiation, then package security is improved, but ease of operation deteriorates

Engineering Contradiction:
Improvepackage securityVSAvoidclass instantiation ease
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The class instantiation utility serves as an intermediary that eliminates the need for global access modifiers. It provides static methods that clients can call directly without needing to access package files or use global keywords. This intermediary simplifies the instantiation process while maintaining security by keeping the actual class definitions protected within the managed package.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10789048B2Namespace and class utilities for managed packages
Publication Date: 2020.09.29 SALESFORCE INC
  • US10789048B2 patent drawing
  • US10789048B2 patent drawing
  • US10789048B2 patent drawing

AI summary

Embodiments regard namespace and class utilities for managed packages. An embodiment of one or more storage mediums include instructions for performing processing in a managed package; processing a call to a namespace utility for a class in the managed package; and, in response to the call to the namespace utility, identifying a namespace for the class, and returning the identified namespace. An embodiment of one or more storage mediums include instructions for performing processing in a managed package; receiving a request from outside the managed package for instantiation of a class, the request including a class instantiation utility; and, in response to the request, delegating instantiation of the class to a factory, and instantiating the class as a public, non-global class.