A business object is a logical representation of related business information. Examples may include customer, item and sales order. Physically, the data for any business object may be stored in several different formats and organized for efficiency. A business object instance is unique. In order to perform a behavior against a business object instance, the key to the business object must be known. Accordingly, the business object key must be exposed.
Some designers will expose a unique physical key. This approach places information into the business object that has no logical meaning. A sales order for customer “x984.5%” does not make sense. Some designers will expose the unique logical key, but will re-use key types (string key, date time key, string date time key . . . ) that describe these keys. This approach brings logical meaning into the business object, but only from a data perspective. It is not possible to programmatically understand what the customer is for a given sales order. One solution to the problem is to expose a unique logical key with a unique key type that corresponds to the business object (customer and customer key). The drawback to this approach is an explosion of types because every business object will need its own key type.
To solve the complexity of the explosion of key types, the base business object key may be used to create business object keys. The base business object key may contain the data for the business object key variations and the ability to perform certain behaviors against that data, including comparison functions. Business objects will have their own concrete key and they will expose logical property names that correspond to the business object. Child business object keys will include the parent business object key. Business objects will reference other business objects using the concrete keys.
Although the following text sets forth a detailed description of numerous different embodiments, it should be understood that the legal scope of the description is defined by the words of the claims set forth at the end of this patent. The detailed description is to be construed as exemplary only and does not describe every possible embodiment since describing every possible embodiment would be impractical, if not impossible. Numerous alternative embodiments could be implemented, using either current technology or technology developed after the filing date of this patent, which would still fall within the scope of the claims.
It should also be understood that, unless a term is expressly defined in this patent using the sentence “As used herein, the term ‘______’ is hereby defined to mean . . . ” or a similar sentence, there is no intent to limit the meaning of that term, either expressly or by implication, beyond its plain or ordinary meaning, and such term should not be interpreted to be limited in scope based on any statement made in any section of this patent (other than the language of the claims). To the extent that any term recited in the claims at the end of this patent is referred to in this patent in a manner consistent with a single meaning, that is done for sake of clarity only so as to not confuse the reader, and it is not intended that such claim term by limited, by implication or otherwise, to that single meaning. Finally, unless a claim element is defined by reciting the word “means” and a function without the recital of any structure, it is not intended that the scope of any claim element be interpreted based on the application of 35 U.S.C. § 112, sixth paragraph.
The steps of the claimed method and apparatus are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments, and/or configurations that may be suitable for use with the methods or apparatus of the claims include, but are not limited to, personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The steps of the claimed method and apparatus may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The methods and apparatus may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
With reference to
Computer 110 typically includes a variety of computer readable media. Computer readable media can be any available media that can be accessed by computer 110 and includes both volatile and nonvolatile media, removable and non-removable media. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by computer 110. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of the any of the above should also be included within the scope of computer readable media.
The system memory 130 includes computer storage media in the form of volatile and/or nonvolatile memory such as read only memory (ROM) 131 and random access memory (RAM) 132. A basic input/output system 133 (BIOS), containing the basic routines that help to transfer information between elements within computer 110, such as during start-up, is typically stored in ROM 131. RAM 132 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit 120. By way of example, and not limitation,
The computer 110 may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only,
The drives and their associated computer storage media discussed above and illustrated in
The computer 110 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 180. The remote computer 180 may be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 110, although only a memory storage device 181 has been illustrated in
When used in a LAN networking environment, the computer 110 is connected to the LAN 171 through a network interface or adapter 170. When used in a WAN networking environment, the computer 110 typically includes a modem 172 or other means for establishing communications over the WAN 173, such as the Internet. The modem 172, which may be internal or external, may be connected to the system bus 121 via the user input interface 160, or other appropriate mechanism. In a networked environment, program modules depicted relative to the computer 110, or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation,
At block 210, the method may create an abstract property class (Property) that implements the IComparable interface.
At block 220 (
At block 230 (
At block 240, the method may design the constructor to take a Type of T and hold this Type as a private instance variable (classValue). As the variable is private, it is exposed a public property (ValueOfProperty). At block 250, the method may implement the CompareTo method by delegating it to the IComparable interface on Type of T.
At block 260, the method may create an abstract key class (Key) that implements the IComparable interface. The abstract class may be intended to be used as a base class for derived key classes. The class Key may have another name so long as the name is used consistently.
At block 270, the method may create a protected generic list of property classes (protected List<Property> properties) field to allow derived Key classes to hold the data that makes up their concrete keys. The concrete key may assign implicit operators to derived classes. Again, the name may be varied so long as it used consistently.
At block 280, the method may implement the CompareTo method by looping over each property class (Property) in the protected generic property list delegating it to the IComparable interface on the property class (Property). Once the result from a property comparison is not equal, that result may be returned.
At block 290, the method may implement the equal operator (=) and the not equal operator (!=) by calling the CompareTo method, verifying the result and returning the correct Boolean result to make the key class easier to use.
As long as a Type of t implements the IComparable interface, it can become a property of the base business object key without any changes. For example, the Key Properties can hold any concrete type allowing child keys to contain their parent's key.
At block 310, the method may have the concrete business object key expose logical key property names (CustomerKey.PhoneNumber, for example) that correspond to the business object (Customer).
At block 320, when designing a concrete child business object key, (CustomerAddressKey), the method may include the parent's business object key in it (CustomerAddressKey.CustomerKey, for example) along with the properties that make it unique (CustomerAddressKey.AddressCode, for example).
At block 330, the method may have the base business object key hold the protected property data in its generic property list. At block 340, the method may create a business object (Customer) and have it contain the logical business object key class (Customer.Key where Key is the CustomerKey type).
Because the concrete business object key (CustomerKey) inherits from the base business object key (Key) and it (Key) implemented the comparison behavior, the derived business object key (CustomerKey) does not have to implement any comparison behaviors. This all works because the derived key keeps it data at the base level at which the comparison behavior is implemented.
The following may be code to implement a sample business object key.
The “Property id=String. Empty;” line of code takes an empty string and assigns it to the abstract property. The statement will invoke the implicit string operator on the abstract property which will create a concrete Property<string> type and assign it to the id variable. This variable is then added to the protected properties list. After the property list is initialized, each business object key property (SomePropertyName) may reference its backing field by a known index. As a business object understands its unique logical key properties, it may define the key property name(s) that have meaning (SomePropertyName) and their corresponding type(s) (string). Because the properties list is protected, it is not visible by any outside consumer. The property getter and setter will both invoke implicit string operators on the abstract property to translate from Property<string> to string and string to Property<string>.
As a result of the methods, a base business object key may have the ability to have properties that are made up of any type that implements the IComparable interface. In addition, the base business object key may have the ability to contain another business object key. The comparison behaviors may be implemented by utilizing the underlying type comparison behaviors.
Variations may include, but are not limited to, every business object having its own logical key, every business object exposing logical key property names that correspond to their business object, every business object's associations referencing other business objects by their concrete logical keys and every child business object key including its parents business object key.
Although the forgoing text sets forth a detailed description of numerous different embodiments, it should be understood that the scope of the patent is defined by the words of the claims set forth at the end of this patent. The detailed description is to be construed as exemplary only and does not describe every possible embodiment because describing every possible embodiment would be impractical, if not impossible. Numerous alternative embodiments could be implemented, using either current technology or technology developed after the filing date of this patent, which would still fall within the scope of the claims.
Thus, many modifications and variations may be made in the techniques and structures described and illustrated herein without departing from the spirit and scope of the present claims. Accordingly, it should be understood that the methods and apparatus described herein are illustrative only and are not limiting upon the scope of the claims.