Metadata-Driven Settings UI Code Generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems for creating settings user interfaces are cumbersome, error-prone, and require significant code rewriting due to changes in UI technology or data sources, leading to inefficiencies and code defects.

Innovation Solution

A metadata-driven framework that generates settings user interfaces and associated code, allowing for the management of UI elements, user input, event handling, validation, and error management, while supporting custom actions and flexible updates without extensive code rewriting.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If code is manually written to implement UI controls, then the UI functionality is complete, but the code becomes bulky, repetitive, and error-prone

Engineering Contradiction:
Improvecode qualityVSAvoidcode size
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent uses templates to generate UI code automatically. Instead of manually writing repetitive code for each UI control, the system copies and adapts predefined template code structures, replacing placeholders with actual control-specific information. This eliminates manual code writing while maintaining completeness and reducing errors.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The code generation system is self-service in that it automatically generates UI code based on templates and configuration information without requiring manual programming. The system serves itself by using the template structure and control metadata to produce ready-to-use code, reducing both code size and error potential.

Inventive Principle:
Principle #25Self-service

2Adaptability or versatility

If code is written for each new UI control, then the control functionality is implemented, but additional code must be written for data retrieval, error handling, validation, and event handling

Engineering Contradiction:
ImproveUI control functionalityVSAvoidcode quantity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements a universal template structure that handles multiple functions (data retrieval, error handling, validation, event handling) in a single code generation process. The template is designed to be multi-functional, accommodating different UI control types while providing all necessary code structures uniformly, thus reducing overall code quantity while maintaining versatility.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The code generation process segments the UI implementation into distinct template sections (data retrieval, validation, error handling, events). Each section is independently defined in the template and automatically instantiated for each control, making the system adaptable to different control types without requiring additional manual code writing for each function.

Inventive Principle:
Principle #1Segmentation

3Reliability

If settings UI is implemented using a specific technology (e.g., MMC), then the UI works for that technology, but new code must be developed when UI technology changes

Engineering Contradiction:
ImproveUI functionalityVSAvoidtechnology compatibility
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent uses parameterized templates where technology-specific details are stored as configurable parameters rather than hard-coded structures. When UI technology changes, only the relevant parameters in the template need to be updated, while the overall code generation process remains the same. This maintains reliable UI functionality across different technologies while enabling easy adaptation.

Inventive Principle:
Principle #35Parameter changes

4Adaptability or versatility

If data source changes (e.g., from SQL to Active Directory), then new data storage is achieved, but existing settings page code must be altered

Engineering Contradiction:
Improvedata source flexibilityVSAvoidcode modification effort
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent introduces a data source abstraction layer as an intermediary between the UI code and actual data storage. The template code interacts with this abstraction layer through standardized interfaces, allowing data source changes (SQL to Active Directory) without modifying the UI code itself. The intermediary handles the complexity of different data sources while maintaining code consistency.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS8381113B2Metadata-driven automatic UI code generation
Publication Date: 2013.02.19 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8381113B2 patent drawing
  • US8381113B2 patent drawing
  • US8381113B2 patent drawing

AI summary

A framework for using metadata to describe user interface elements and for interactions of the user interface elements with an end user and/or with data source(s) that store configuration data. The metadata can be used to generate a settings UI and code that manages the UI such as gathering user input, handling UI events, validating collected data, handling errors and warnings, managing interactions between different UI controls, and the like. A computer-implemented system that facilitates a settings user interface can include a code generation component that employs the stored metadata to automatically generate the settings UI and code that manages the UI. The code generation component provides the generated code to a data source component that interacts with the data source(s). The settings UI is displayed to an end user via a user interface component.