Visual Code Refactoring for Declarative Markup Languages

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Code refactoring in software development, particularly in declarative languages, can be repetitive and error-prone, especially for developers accustomed to working in design views, leading to delays and inefficiencies.

Innovation Solution

A method and system for visual code refactoring that allows developers to select interface elements in a design view, identify corresponding declarative expressions, generate new code segments, and store them for reuse, reducing the need to handle textual code directly.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If code refactoring is performed manually in textual code view, then code can be reorganized, but it becomes repetitive and error-prone

Engineering Contradiction:
Improverefactoring accuracyVSAvoidrefactoring complexity
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent introduces a visual designer as an intermediary tool between the developer and the textual code. The visual designer provides a graphical interface that maps to the declarative code structure, allowing developers to perform refactoring operations visually without directly manipulating textual code. This mediator translates visual operations into appropriate code modifications, reducing errors and complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the mechanical process of manual textual code editing with an automated system that operates on visual representations. Instead of developers manually editing declarative code text, the system automatically generates and applies refactoring transformations based on visual selections and operations in the designer interface.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Productivity

If developers work primarily in design view, then UI assembly is efficient, but code refactoring becomes difficult and time-consuming

Engineering Contradiction:
ImproveUI development efficiencyVSAvoidrefactoring time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The visual designer is designed to serve multiple functions: both UI assembly and code refactoring. The same visual interface used for creating and arranging UI elements also supports refactoring operations. Developers can select elements in the visual design and apply refactoring transformations without switching to code view, making the tool universal for both creation and modification tasks.

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

Solution Approach 2:

The patent adds a visual dimension to code manipulation. Instead of operating only in the textual code dimension, developers can perform refactoring operations in the visual design dimension. This dimensional shift allows for more intuitive and efficient refactoring by leveraging visual selection and manipulation capabilities rather than requiring textual code navigation and editing.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Adaptability or versatility

If declarative code is manually edited, then flexibility is maintained, but errors increase and productivity decreases

Engineering Contradiction:
Improvecode flexibilityVSAvoiddevelopment efficiency
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The visual designer provides self-service capabilities through automated code generation and transformation. When developers perform operations in the visual interface, the system automatically generates the corresponding declarative code or applies refactoring transformations. This self-service mechanism eliminates the need for developers to manually write or edit declarative code, reducing errors while maintaining flexibility through the visual interface.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS8910113B2Methods and systems for visual code refactoring
Publication Date: 2014.12.09 ADOBE INC
  • US8910113B2 patent drawing
  • US8910113B2 patent drawing
  • US8910113B2 patent drawing

AI summary

Embodiments include a method comprising providing a design interface that depicts a plurality of interface elements of an application under development, each element defined in source code accessible by the application development environment in a declarative markup language. The method can comprise receiving, through the design interface, data representing a selection of a plurality of the interface elements, identifying the declarative expressions corresponding to the selected interface elements, defining a new declarative expression, and generating at least one code segment using the identified declarative expressions. The method an comprise storing the generated code segment in a computer readable medium, with the stored code segment associated with the new declarative expression, so that the new declarative expression can be inserted into the source code in place of the identified declarative expressions and/or can used in a second application under development.