Patent ID: 8296731

Claim:
A computer-readable storage medium, the computer-readable storage medium not consisting of a propagating signal, the computer-readable storage medium having computer-executable instructions for causing a computer to perform steps comprising: receive a request to select a most appropriate method that an application should call out of a plurality of available methods for handling a same operation, wherein each respective method of the plurality of available methods is operable to have a declarative definition based on a declarative feature, the declarative definition describes one or more feature requirements that must be satisfied in order for the respective method to be included as active in an interaction scope, wherein the declarative feature allows a new method to be added for performing a particular operation without requiring a particular application that calls a most appropriate method to be re-compiled to add the new method; at runtime, dynamically construct the interaction scope based on analysis of a user interface element containment hierarchy formed by parent-child relationships of user interface elements and at least one non-user interface element that provides data to be presented in a user interface element, the interaction scope further constructed based upon a current context of the user by analyzing various layers of user context that describe a current computing environment of the user; execute a sort process that uses the interaction scope in combination with a plurality of sort rules to generate a sorted list of the plurality of available methods into a particular order based upon appropriateness, wherein the sort process is operable to generate the sorted list without loading the plurality of available methods into memory, wherein the sort process is operable to generate the sorted list based on available comparisons, the available comparisons comprising a comparison based on inheritance, a comparison based on satisfied feature position in the interaction scope, and a comparison based on a number of satisfied features, with a method having satisfied features that are more specific in demands on a top most part of a user interface determined to be most appropriate; and return a result to the requesting application based upon the sorted list.