Browse Prior Art Database

A Framework for Facilitating Rapid Command Line Interface Development

IP.com Disclosure Number: IPCOM000146819D
Publication Date: 2007-Feb-23
Document File: 3 page(s) / 90K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is a method for a framework that facilitates the rapid development of a small lightweight command line interface (CLI). Benefits include reducing the time and effort involved in overall application development.

This text was extracted from a Microsoft Word document.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 52% of the total text.

A Framework for Facilitating Rapid Command Line Interface Development

Disclosed is a method for a framework that facilitates the rapid development of a small lightweight command line interface (CLI). Benefits include reducing the time and effort involved in overall application development.

Background

Most embedded applications or systems provide a CLI for configuring and debugging the application. On large systems, full shells (offered by languages like TCL) are often employed. However, this type of solution is often overkill for smaller applications. The CLIs used on smaller systems tend to be fairly simplistic, and are usually handwritten in the native programming language of the application and then compiled into the application. The effort involved in writing these small lightweight CLIs can be quite significant when compared with the effort involved in writing the remainder of the application. Any reduction in the time taken to develop the CLI component of the application helps reduce the overall application development time.

General Description

The disclosed method creates a framework that facilitates the rapid development of a small lightweight CLI. The framework consists of two main aspects: the commands and the engine.

CLI commands represent the commands that users can invoke. They are generally application specific, but all command processing can be divided into distinct stages: one stage for the parsing of the commands and the basic validation of the command parameters, and one stage for performing the application-specific functionality associated with the command. The parsing and basic parameter validation is common across all commands, and the code to perform this processing can be easily generated (see Figure 1). The application-specific commands are described using a simple XML syntax, an example of which is illustrated in Figure 2. The code generation script reads the XML command definition and generates code to perform the parsing and validation of the commands. Some common parsing functions and utilities are provided by the CLI engine for use by the generated code. For each command, the following code is generated:

§         Parsing of command parameters.

§         Basic validation of command parameters.

§         Code to register the command with the command registry in the CLI engine.

§         A stubbed delegate function. This stubbed function is implemented as part of the application development to implement the application-specific parts of the command. All command parameters are passe...