Reusing components in a running application

Methods, systems, and apparatus, including computer program products, for reusing a component. In one aspect, a method includes executing a source application in an application environment; presenting a reusable component in a source application window corresponding to the source application, wherein the reusable component is visibly distinguishable from one or more non-reusable components displayed in the source application window; receiving input selecting the reusable component in the source application window and adding the reusable component to a target application window corresponding to a target application; and inserting one or more computer-readable instructions associated with the reusable component into the target application. Further, input can be received to activate a reuse function associated with the source application. Additionally, the reusable component can be visibly distinguishable from one or more non-reusable components displayed in the source application window only when the reuse function is active.

BACKGROUND

The present disclosure relates to identifying reusable components in an existing application, and to systems and methods for inserting a reusable component into a separate application, such as an application that is under development.

The development of software applications has seen many advances since the inception of computing. For example, low-level languages utilized constructs that were very closely related to the hardware of the computing system on which programs were executed. The creation of high-level programming languages provided tools that were more abstract than corresponding low-level programming languages and delivered greater portability across different platforms. High-level programming languages also permitted programmers to express operations in terms of variables, mathematical formulas, and Boolean expressions, rather than memory addresses and registers.

The development of object-oriented programming concepts and object-oriented languages, such as C++, further permitted programmers to modularize software applications. Object-oriented programming emphasizes concepts including encapsulation, inheritance, and modularity. Specific purpose modules can be created using object-oriented techniques, such that the modules receive input from and/or provide output to one or more other modules. Additionally, separate modules in a program can be configured to communicate by passing data organized in accordance with constructs, such as classes, subclasses, and objects. Once created, such specific purpose modules can be reused in other programs by copying the source code and associated definitions.

Java further expanded the principles of object-oriented programming by introducing the concept of a virtual machine, which makes it possible to execute an application in a platform-independent environment. Once configured, the virtual machine exists as an environment above the operating system and the computing platform in which an application executes. Because a virtual machine can operate on a variety of computing platforms, an application can be executed in the virtual machine on any of the supported platforms without requiring customization. Thus, an application can be generated for use with a virtual machine such that the application is reusable across a variety of separate computing platforms.

Programming tools, or integrated development environments (IDEs), still further enhanced the ability of programmers to efficiently develop software applications. A programming tool can be used to prototype, code, debug, and maintain one or more software applications. Further, IDEs often include a graphical programming environment, in which features can be at least partially configured through the use of graphical tools. IDEs also can include a palette of standard components, such as controls and displays, that can be inserted into an application without having to be independently developed. Additionally, IDEs provide the ability to analyze and modify an existing application for which the source code is available.

SUMMARY

This specification describes technologies relating to reusing one or more components included in an existing application. An existing application, such as an application executing within the context of an application environment, can be configured to identify one or more reusable components included in the application. For example, a reusable component can be displayed such that it is visually distinguishable from the non-reusable components of an application, including through highlighting, low-lighting, outlining, shading, or any other such visual indication. Further, a reusable component can be inserted into a separate application that is being executed within the same application environment. The application environment can be configured such that a reusable component included in an existing application, the source application, can be selected and transferred to a target application through a graphical user interface command, such as a drag-and-drop operation. Additionally, the reusable component can be automatically inserted into the target application in response to being “dropped” in a display space associated with the target application.

The present inventor recognized the need to permit switching a running application into a mode that facilitates reuse of one or more components. Further, the present inventor recognized the need to automatically insert instructions associated with a reusable component into the code of a target application into which the reusable component is transferred. In order to facilitate reuse of components, the present inventor recognized that it was beneficial to permit an application developer to designate a component as reusable, such as by setting a flag or variable to a particular value.

The present inventor also recognized the need to permit a developer to retain some level of control over the reusability of a component, including the ability to restrict the degree to which a component can be modified and to require that a license be taken in order to use the component. Further, the present inventor recognized the need to prevent a component from being reused. Accordingly, the systems and apparatus described here can implement methods for identifying and sharing one or more reusable components between a plurality of applications.

In general, in one aspect, the subject matter can be implemented to include executing a source application in an application environment; presenting a reusable component in a source application window corresponding to the source application, wherein the reusable component is visibly distinguishable from one or more non-reusable components displayed in the source application window; receiving input selecting the reusable component in the source application window and adding the reusable component to a target application window corresponding to a target application; and inserting one or more computer-readable instructions associated with the reusable component into the target application.

The subject matter also can be implemented such that the received input comprises a drag-and-drop operation. The subject matter further can be implemented to include receiving input activating a reuse function associated with the source application. Also, the subject matter can be implemented such that the reusable component is presented in the source application window only when the reuse function is active. Additionally, the subject matter can be implemented such that the reusable component is visibly distinguishable from one or more non-reusable components displayed in the source application window only when the reuse function is active.

The subject matter also can be implemented to include determining that a data input included in the reusable component is unassigned; identifying a second component in the target application window that includes an unassigned data output; and establishing in the target application a connection between the data input included in the reusable component and the data output included in the second component. The subject matter further can be implemented to include receiving input from a user confirming the connection between the data input included in the reusable component and the data output included in the second component. Additionally, the subject matter can be implemented such that the reusable component is visibly distinguishable from one or more non-reusable components based on a display attribute associated with the reusable component comprising at least one of highlighting, shading, an enhanced border, and a glow effect.

In general, in another aspect, the techniques can be implemented as a computer program product, encoded on a computer-readable medium, operable to cause data processing apparatus to perform operations comprising executing a source application in an application environment; presenting a reusable component in a source application window corresponding to the source application, wherein the reusable component is visibly distinguishable from one or more non-reusable components displayed in the source application window; receiving input selecting the reusable component in the source application window and adding the reusable component to a target application window corresponding to a target application; and inserting one or more computer-readable instructions associated with the reusable component into the target application.

Further, the subject matter can be implemented such that the received input comprises a drag-and-drop operation. The subject matter also can be implemented to be operable to cause data processing apparatus to perform operations comprising receiving input activating a reuse function associated with the source application. Also, the subject matter can be implemented such that the reusable component is presented in the source application window only when the reuse function is active. Additionally, the subject matter can be implemented such that the reusable component is visibly distinguishable from one or more non-reusable components displayed in the source application window only when the reuse function is active.

The subject matter also can be implemented to be further operable to cause data processing apparatus to perform operations comprising determining that a data input included in the reusable component is unassigned; identifying a second component in the target application window that includes an unassigned data output; and establishing in the target application a connection between the data input included in the reusable component and the data output included in the second component. Additionally, the subject matter can be implemented to be further operable to cause data processing apparatus to perform operations comprising receiving input from a user confirming the connection between the data input included in the reusable component and the data output included in the second component. The subject matter further can be implemented such that the reusable component is visibly distinguishable from one or more non-reusable components based on a display attribute associated with the reusable component comprising at least one of highlighting, shading, an enhanced border, and a glow effect.

In general, in another aspect, the subject matter can be implemented as a system including a source application stored on a computer-readable medium and a computing system including processor electronics configured to perform operations comprising executing the source application in an application environment; presenting a reusable component in a source application window corresponding to the source application, wherein the reusable component is visibly distinguishable from one or more non-reusable components displayed in the source application window; receiving input selecting the reusable component in the source application window and adding the reusable component to a target application window corresponding to a target application; and inserting one or more computer-readable instructions associated with the reusable component into the target application.

The subject matter also can be implemented such that the received input comprises a drag-and-drop operation. Further, the subject matter can be implemented such that the processor electronics are further configured to perform operations comprising receiving input activating a reuse function associated with the source application. Also, the subject matter can be implemented such that the reusable component is presented in the source application window only when the reuse function is active. Additionally, the subject matter can be implemented such that the reusable component is visibly distinguishable from one or more non-reusable components displayed in the source application window only when the reuse function is active.

The subject matter also can be implemented such that the processor electronics are further configured to perform operations comprising determining that a data input included in the reusable component is unassigned; identifying a second component in the target application window that includes an unassigned data output; and establishing in the target application a connection between the data input included in the reusable component and the data output included in the second component. Additionally, the subject matter can be implemented such that the processor electronics are further configured to perform operations comprising receiving input from a user confirming the connection between the data input included in the reusable component and the data output included in the second component. Further, the subject matter can be implemented such that the reusable component is visibly distinguishable from one or more non-reusable components based on a display attribute associated with the reusable component comprising at least one of highlighting, shading, an enhanced border, and a glow effect.

Particular embodiments of the subject matter described in this specification can be implemented to realize one or more of the following advantages. For example, the subject matter can be implemented to transfer or otherwise copy a reusable component from a source application into a target application without having to manually access the source code associated with the reusable component. Further, the subject matter can be implemented such that a reusable component can be dragged from a running application and dropped into an application that is being developed, including new applications and applications that are being revised. The subject matter also can be implemented to share both low-level components, such as controls, and high-level components, such as complex widgets and tools. Additionally, the subject matter can be implemented to permit restricting the degree to which a reusable component can be shared and modified, such as through licensing or “read-only” protections.

This subject matter can be implemented using an apparatus, a method, a system, a computer program product, or any combination of an apparatus, methods, systems, and computer program products. The details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of the invention will become apparent from the description, the drawings, and the claims.

DETAILED DESCRIPTION

FIG. 1Ashows an exemplary interface that can be used to share one or more reusable components between two or more applications. A reusable component is an element of a computer program, which includes one or more instructions that implement one or more functions, where the computer program component can be extracted from one application program and used again to construct a new application program. An application from which a reusable component is shared is referred to as a source application and an application into which a reusable component is inserted is referred to as a target application. Further, the one or more source applications and one or more target applications between which reusable components can be shared are associated with a common application environment. In an implementation, the application environment can be a cross-operating system runtime, such as Adobe® Integrated Runtime offered by Adobe Systems Incorporated of San Jose, Calif.

The interface can be presented in a graphical user interface (“GUI”) environment, such as a desktop100presented by an operating system or the application environment. The desktop100can be configured to permit launching one or more applications (or “computer programs”). Further, the desktop100can permit a user to interact with an application through one or more inputs and controls, including graphical controls. For example, a user can control a cursor102displayed in the desktop100through a physical input device, such as a mouse or trackball, and enter commands to perform one or more operations.

A source application executing in the application environment can be represented in the desktop100by a source application window105. The source application window105can include a command menu110that lists a plurality of commands associated with functions that can be performed by the source application. For example, the command menu110can include a plurality of menu titles, each of which corresponds to a list of one or more options and sub-menus. The command menu110also can include one or more command buttons associated with specific functions, such as minimizing or closing the source application window105. Further, the command menu110can be implemented as a reusable component.

The source application also can include a scroll bar115that allows for the selective display of the source application window105. The scroll bar115also can be implemented as a reusable component. Additionally, one or more other components associated with the source application can be displayed in the source application window105. For example, a weather monitor120can be configured to display the current weather conditions for a particular region of the terrestrial globe. The weather monitor120also can be configured to present other information, such as time, temperature, and forecast data. The information presented by the weather monitor120can be collected from one or more data sources, including remote data sources. Further, a stock ticker125can be configured to present quotes for one or more securities or indexes. Similar to the weather monitor120, the stock ticker125also can be configured to retrieve quote data from one or more data sources, including remote data sources. Additionally, a monitor130can be displayed in the source application window105. The monitor130can provide a graphical representation of the values associated with a data source. For example, the monitor130can provide a visual representation of sound being received through a microphone that is connected to the computing platform on which the source application is hosted or sound data stored in an electronic file.

A target application can be represented in the desktop100by a target application window135. The target application can be a newly created (or “blank”) application that is being developed. In an implementation, a blank application can be created by selecting a New Application option from a menu, such as a command menu140. A blank application also can be created by selecting a New Application option from a context menu, such as a menu displayed in response to right clicking in an existing application executing within the application environment or the desktop100. Further, the blank application can be configured in accordance with an application template and then launched within the application environment as an executing application. Alternatively, the target application can be an existing application that is being modified.

In an implementation, any existing application can be modified unless it has been locked to prevent further modifications. The command menu140can be configured to list a plurality of commands associated with functions that can be performed by the target application. If the target application is a newly created application, the command menu140can include standard functions, such as save, exit, and help. As functionality is added to the target application, such as through the addition of one or more components, the command menu140can be expanded to include options and sub-menus associated with the expanded functionality. In an implementation, the command menu140also can be modified through the use of an application development tool.

FIG. 1Bshows an example of selecting the reuse menu145in the command menu110of the source application window105. The reuse menu145can be selected by positioning the cursor102in proximity to the reuse menu145and entering a command through a physical control device, such as a button push on a mouse. Alternatively, the reuse menu145can be selected through entry of a predetermined command, such as a function key or key-combination on a keyboard. The reuse menu145is configured to permit a user to turn the reuse function of the application on and off. Further, the reuse menu145presents a visual indicator to identify the presently selected menu option, such as a marker displayed adjacent to the selected option or by visually distinguishing the text used to represent the selected option. Alternatively, the reuse menu can be presented such that only the current option is displayed and selecting the current option causes it to be toggled (e.g., from “OFF” to “ON”).

When the reuse function is turned off, the source application performs routine operations, such as executing the functions associated with one or more components included in the source application. When the reuse function is turned on, the source application identifies the components that are available for reuse. A reusable component included in the source application can be identified through a wide variety of cues, including visual and/or auditory cues provided through the interface. In an implementation, turning the reuse function on also enables the drag-and-drop functionality that can be used to insert a reusable component into a target application.

Further, a source application can be configured such that turning on the reuse function inhibits interaction with reusable components for functions other than insertion into a target application. For example, when the reuse function is turned on in a source application, command interfaces associated with a reusable component can be disabled. Thus, selecting a button included in a reusable component will not produce a button “click” event or initiate the corresponding functionality that results when the reuse function is turned off. Additionally, interaction with non-reusable components included in a source application can be inhibited when the reuse function is turned on. For example, a movie player can be configured to continue playing, but associated controls such as pause and rewind can be disabled so that the movie player is inert.

FIG. 1Cshows an exemplary interface presented in the desktop100when the reuse function is turned on. A visual indicator can be associated with one or more reusable components to distinguish them from other portions of the source application, including components that are not reusable. For example, a visible border can be display around a reusable component, such as the border150displayed around the weather monitor120or the border155displayed around the monitor130. The visible border can be displayed to create a defined border around a reusable component that includes a different color or texture than the presentation of a non-reusable component included in the same window. Alternatively, the visible border can be presented as a “glow” or “halo” effect that surrounds the reusable component.

Further, the visible border can be displayed persistently, or can be displayed intermittently in response to an interface event, such as in response to a cursor coming within a predetermined range of a reusable component. In an implementation, non-reusable components can be visually distinguished from reusable components by diminishing their visual presentation in the application window, such as by fading or graying the non-reusable components. Diminishing the visual presentation of non-reusable components can be performed in conjunction with or instead of enhancing the visual presentation of reusable components, such as through the use of a visible border. Interface components and controls also can include a visible border if they are reusable. For example, the scroll bar115can include a visible border160to indicate that it is a reusable component. Alternatively, interface components can be highlighted or shaded to indicate that they are reusable.

Additionally, reusable components that generally do not have an associated visual presentation can be represented by an icon when the reuse function is turned on. For example, when reuse is turned on through the reuse menu145of the source application, a database icon165can be presented in the source application window105. The database icon165can be used to represent a data source accessible to the source application that does not have a visual representation when the reuse function is turned off. Further, the database icon165can be presented with a visible border indicating that it is reusable. In some implementations, a reusable component can be identified by a audible indicator in conjunction with a visual indicator. For example, a distinctive sound can be presented to identify a reusable component in response to an interface event, such as a cursor coming within a predetermined range of the reusable component.

A reusable component can be “grabbed” in the interface, such as through the use of a cursor controlled by a mouse. Once grabbed, the reusable component can be inserted into another application through a drag-and-drop operation. For example, the weather monitor120can be grabbed in the source application window105and dragged170across the interface to the target application window135. By dropping the weather monitor120in the target application window135, a new weather monitor175is inserted into the target application.

The weather monitor175generated through the drag-and-drop operation incorporates all of the functionality of the weather monitor120in the source application, including all of the presently selected configuration settings. Thus, the weather monitor175inserted into the target application can be initialized to a state that corresponds to the state of the weather monitor120in the source application when the copy procedure began. For example, the weather monitor175inserted into the target application can be configured to present weather data for the same geographical area as the weather monitor120associated with the source application.

In some implementations, the functionality of the weather monitor175inserted into the target application also can be restricted in accordance with one or more limitations imposed by the developer of the reusable component. Unless restricted, however, the weather monitor175can be reconfigured in accordance with the requirements of the target application. In other implementations, a new component generated by inserting a reusable component into a target application can be initialized into a default state, either automatically or in response to input from a user. For example, all of the configuration settings associated with the reusable component can be initialized to default values.

Additionally, a reusable component can be manipulated after it has been inserted into the target application. For example, the weather monitor175can be resized, moved, or deleted once it is displayed in the target application window135. Further, a target application can be modified using one or more development tools, such as by opening or accessing the target application in an IDE. For example, a target application that has been populated with one or more reusable components can be opened as a project in an IDE. In an implementation, a menu item can be selected to generate a project from the target application that can be opened in an IDE.

Further, code corresponding to one or more components included in the target application can be converted, such as into a markup language or ActionScript, to generate a project. In some implementations, source code can be automatically retrieved for one or more components included in a target application when the application is opened as a project. For example, a source code pointer included in a component, such as a URL, can be accessed to retrieve corresponding source code. Alternatively, if a source code pointer is not available, the binary form of the component can be used in the IDE.

FIG. 2shows a flowchart describing an exemplary process for inserting a reusable component into an application. A reuse option can be selected in a running application to permit identifying and sharing the reusable components included in that application (205). In some implementations, a reusable component can be shared from a running application only when the reuse option has been selected.

Further, the reusable components included in the running application are identified (210). The application is configured to visual identify each reusable component and to permit each reusable component to be shared with a separate application, such as through a drag-and-drop operation. The components included in the running application can be polled to determine whether they implement reusability. Alternatively, a record of reusable components maintained by the application can be accessed. In an implementation, a component is identified as reusable through a class definition associated with the component. For example, a standard button can belong to the class Button. Further, a developer can create a new sub-class identified as MyButton that extends the class Button. Additionally, the sub-class MyButton can include an interface named Reusable. Thus, a component belonging to the sub-class MyButton can include a reference to the interface, such as “implement Reusable”, to indicate that the component is reusable.

Alternatively, the sub-class MyButton can include a reusability flag, such as a Boolean value that indicates the reusability status. A reusable component further can be identified to a user through the presentation of a visual identifier associated with the component, such as highlighting, shading, or a visible border. A reusable component also can be identified by an audible identifier. Further, a component that does not have an associated visual representation in the application window when reuse is not selected can be represented by an object, such as an icon that includes the visual identifier indicating reusability, when reuse is selected. Thus, a user can visually identify all of the reusable components included in an application when a reuse option corresponding to that application has been selected.

Additionally, both low-level components and high-level components can be identified as reusable. For example, low-level interface devices, such as buttons, panels, scroll bars, and text boxes can be reused. Further, high-level components, including specialized widgets and small applications, also can be reused. Thus, one or more components not typically available in the palette of a development tool, such as complex and customized components, can be reused from an existing application.

A copy operation associated with a reusable component can be identified while the source application is running (215). For example, a user can initiate a copy operation by selecting a reusable component included in the source application. Further, the reusable component can be transferred to a target application window through a drag-and-drop operation. Alternatively, one or more other transfer operations also can be performed, such as a copy-and-paste operation or a cut-and-paste operation. The target application can be polled to determine whether it is locked (220). For example, a target application can be set to read-only or can be configured to require authorization before it can be modified. If the target application is locked, the copy operation is canceled (225).

If the target application is not locked, the reusable component can be accessed to determined whether it includes a source code pointer (230). For example, the binary code associated with a reusable component can be copied from the source application during the copy operation. Further, the binary code can be analyzed to determine whether it includes an embedded pointer that identifies a location at which the full source code for the reusable component can be obtained, such as a web site. If a source code pointer is included, the source code can be retrieved (235). Otherwise, the binary code associated with the reusable component is utilized.

Any restrictions associated with the reusable component also are identified (240). If one or more restrictions are associated with the reusable component, the restrictions are implemented (245). The developer or owner of the reusable component can require that one or more conditions for reuse be met, which can be included in the code corresponding to the reusable component. For example, the reusable component can be classified as “read-only”, such that no further modifications to the reusable component can be made. A license also can be required before full use of the reusable component is authorized. For example, a reusable component can be licensed for use with a particular application. When the reusable component is invoked, it can determine which application it is operating in and whether it is licensed for use with that application. If a reusable component determines that it is not associated with a licensed application, the reusable component can operate in a trial or demonstration mode. A restricted reusable component also can identify instructions for obtaining a license, such as a source from which a full license can be purchased. Further, the reusable component can display a message indicating that it is in trial mode and/or provide only limited functionality.

If there are no restrictions, or once the restrictions have been implemented, the reusable component can be initialized in the target application (250). Thus, a copy of the reusable component included in the source application is created and initialized, to the extent permitted, in the target application. Additionally, a reusable component can be associated with a library file, which can be accessed by the target application. Thus, a reusable component can include a property that identifies the library file with which it is associated. Alternatively, if the reusable component corresponds only to the target application, the property can have a null value. Once initialized in the target application, the reusable component also can be executed. A reusable component is copied, to the extent permitted, as a complete component. Thus, the reusable component can be configured to be fully functional once it is inserted into the target application.

FIG. 3shows an exemplary interface that can be used to share reusable components included in two or more applications. A plurality of applications are presented in a GUI environment, such as a desktop300presented by an operating system or an application execution environment. A first source application window305associated with a first source application includes a bar graph interface310that is configured to present information in a graphical format. The first source application window305also includes a world wide web icon315, which represents a data source for the information presented in the bar graph interface310. The bar graph interface310and the world wide web icon315can be displayed in conjunction with visual indicators312and317respectively, to indicate that they are reusable components.

Further, a second source application window320associated with a second source application includes a meter interface325that is configured to present information in a graphical format. The second source application window320also includes a database icon330, which represents a data source for the information presented in the meter interface325. The meter interface325and the database icon330can be displayed in conjunction with visual indicators327and332respectively, to indicate that they are reusable components.

Additionally, a target application window335can be displayed in the desktop300. The target application window335can be associated with a new application or an existing application for which modification is permitted. The bar graph interface310included in the first source application window305can be inserted into the target application window335through a drag-and-drop operation340. Upon being dropped into the target application window335, a new bar graph interface350is created in the target application. Similarly, the database icon330included in the second source application window320can be inserted into the target application window335through a drag-and-drop operation345. Upon being dropped into the target application window335, a new data source355corresponding to the database represented by the database icon330is created in the target application.

Additionally, the target application can be configured to detect that the bar graph interface350includes an input for which a data source has not been specified. The target application also can determine that the data source355includes a data output that is not associated with a corresponding data input in the target application. Thus, the target application can prompt the user to indicate whether the output of the data source355is to be connected to the input of the bar graph interface350. Alternatively, the target application can be configured to automatically form a connection between a component that includes an unassigned data output and a component that includes an unassigned data input. Thus, the output of the data source355can be automatically connected to the input of the bar graph interface350. In another implementation, a user can specify a desired connection between a first component, with a data output, and a second component with a data input, such as by dropping the first component onto the second component.

FIG. 4shows a flowchart describing an exemplary process for associating two reusable components in a target application. A reusable component including an unassigned data input is received in the target application (405). A reusable component including an unassigned data output also is received in the target application (410). The reusable components including the unassigned data input and the unassigned data output can be received in any order. Further, one or more intervening components, or other items, can be received in the target application between receipt of the reusable component including the unassigned data input and receipt of the reusable component including the unassigned data output. Additionally, any period of time can elapse between receipt of the reusable components including the unassigned data input and the unassigned data output.

The target application detects the reusable component that includes the unassigned data input and the reusable component that includes the unassigned data output (415). The target application then queries the user to determine whether the unassigned data output should be connected to the unassigned data input (420). For example, the target application can be configured to present a prompt to the user asking whether output from a first reusable component should be provided as input to a second reusable component. If the user confirms, a connection between the reusable components is formed (425).

Otherwise, a connection is not made and the target application continues to operate until an additional reusable component is received (430). The target application then determines whether the additional reusable component includes an unassigned input or output (435). If the additional reusable component includes an unassigned input or output, the target application queries the user to determine whether a connection should be formed (420). Otherwise, the target application continues to operate until another reusable component is received (430).

Additionally, the target application can be configured to permit a user to reconfigure connections between two components and to form connections between two or more components. In other implementations, the target application can be configured to automatically form a connection between a reusable component that includes an unassigned data input and a reusable component that includes an unassigned data output. Further, the target application can be configured to prompt the user to confirm that the connection is correct.

FIG. 5shows a computer-implemented method of reusing a component. Initially, a source application is executed in an application environment (505). A reusable component is presented in a source application window corresponding to the source application, wherein the reusable component is visibly distinguishable from one or more non-reusable components displayed in the source application window (510). Input is received selecting the reusable component in the source application window and adding the reusable component to a target application window corresponding to a target application (515). Once the input has been received, one or more computer-readable instructions associated with the reusable component are inserted into the target application (520).