-
2010-09-14
11/086,101
2005-03-22
US 7,797,688 B1
2010-09-14
-
-
Wei Y Zhen | Junchun Wu
2027-08-12
A method, system, and computer readable medium for integrating applications in multiple languages comprises receiving properties related to an application in an original language, importing source files related to the application, receiving classes related to the source files, mapping data types related to the classes, receiving properties related to an application in a target language, and generating integration classes related to the data types.
Get notified when new applications in this technology area are published.
The present application is related to U.S. patent application Ser. No. 11/086,121, entitled SYSTEM, METHOD, AND COMPUTER READABLE MEDIUM FOR INTEGRATING AN ORIGINAL APPLICATION WITH A REMOTE APPLICATION, U.S. patent application Ser. No. 11/086,211, entitled SYSTEM, METHOD, AND COMPUTER READABLE MEDIUM FOR INTEGRATING APPLICATIONS IN MULTIPLE LANGUAGES, U.S. patent application Ser. No. 11/086,120, entitled SYSTEM, METHOD, AND COMPUTER READABLE MEDIUM FOR INTEGRATING AN ORIGINAL LANGUAGE APPLICATION WITH A TARGET LANGUAGE APPLICATION, and U.S. patent application Ser. No. 11/086,102, entitled SYSTEM, METHOD, AND COMPUTER READABLE MEDIUM FOR NORMALIZING SOURCE FILES IN MULTIPLE SOFTWARE LANGUAGES, the disclosures of which are incorporated in their entirety by reference herein.
The present invention is related to integrating applications, and, more specifically to a system and method for integrating applications in multiple software languages.
Various limitations are associated with integrating applications such as difficulty in sharing the structure of application data and application programming interfaces (classes). As such, it is cumbersome for an application written in one language to access a functionality provided by an application written in a different language. It is currently tedious to integrate these applications because a common structure must be defined in a third language (such as Extensible Markup Language, Common Object Request Broker Architecture Event Definition Language, etc.).
The present invention overcomes these problems and limitations by providing a system and method for integrating applications in multiple software languages.
The present invention comprises a system, method, and computer readable medium for integrating applications in multiple software languages. In one embodiment, a method for integrating applications in multiple software languages comprises receiving properties related to an application in an original language, importing source files related to the application, receiving classes related to the source files, mapping data types related to the classes, receiving properties related to an application in a target language, and generating integration classes related to the data types.
In anther embodiment, a method for integrating applications in multiple software languages comprises receiving properties related to an application in an original language, importing source files related to the application, receiving classes related to the source files, mapping data types related to the classes, and generating integration classes related to the data types.
In a further embodiment, a computer readable medium comprises instructions for: importing source files related to an application in an original language, receiving classes related to the source files, mapping data types related to the classes, receiving properties related to an application in a target language, and integrating the original language application and the target language application.
In yet anther embodiment, a system for integrating applications in multiple software languages comprises a source language module comprising an adapter and a target language module adapted to: invoke a method on a proxy class and send a message indicating an intent to invoke the method on the source language module, wherein the adapter receives the message and invokes the method on the source language module.
FIG. 1 depicts a flow chart describing connecting a source language application with a target language application in accordance with an embodiment of the present invention; and
FIG. 2 depicts a flow diagram describing messaging between a source application and a target application in accordance with an embodiment of the present invention.
FIG. 1 depicts a flow chart 10 that describes steps involved in connecting a source language application with a target language application. A software program implementing the current invention is started and at step 12, it is determined if application files are loaded. In one embodiment, it is determined if application files in an original (source) language are loaded into the program. This determination is preferably performed by software of the present invention but can be performed by a user. If the files are not loaded, the software and/or user are prompted to load the application files at step 14. In one embodiment, a prompt to load the original source files into the program is received. The software program normalizes the definitions in the original source files that are loaded. Definitions include classes, methods, structures and other software program constructs. If the files are loaded, it is determined if any classes and methods are selected at step 16. In one embodiment, the software program checks to see if the user has selected any classes and/or methods in the original source files. The selected methods and classes will be exported to target language applications.
If they are not selected, the software and/or user are prompted to select the classes, methods, and other constructs in the program at step 18. If they are selected, it is determined if mapping for all complex user defined types is provided at step 20. In one embodiment, the software program verifies the selected constructs against all target languages. The software program identifies the mapping of the constructs in the original source language to the target language. If the mapping is not provided, the software and/or user are prompted to perform the mapping for all complex user defined types used in parameters, return types, and exceptions in step 22. In one embodiment, if the construct is complex in nature and has no equivalent in a target language, the software program prompts the user to provide a mapping for the construct. If the mapping is provided, it is determined if any target languages are selected at step 24. If they are not selected, the software and/or user are prompted to select the target languages at step 26. If they are selected, software is generated to connect the source language application with the target language application(s) at step 28. The generated code consists of adapters on the source language side to export existing source language application objects. The generated code consists of proxies on the target language side to provide access to source language application objects.
In one embodiment, a method for integrating applications in multiple languages comprises receiving properties related to an application in an original language, importing source files related to the application, receiving classes related to the source files, mapping data types related to the classes, receiving properties related to an application in a target language, and generating integration classes related to the data types, wherein the original language and the target language are at least one of a following language: a different language, a same language, and a related language, and wherein the generating includes integrating the original language application and the target language application. The method further comprises receiving a plurality of properties related to a plurality of applications in a plurality of original languages and target languages, wherein the data types related to the target language are equivalent to the data types related to the original language.
In the method, the importing includes normalizing the at least one language into a common representation, wherein the common representation includes a metadata structure. The method further comprises receiving methods related to the classes, wherein the methods are selected and wherein the classes are selected. The method also comprises providing mapping for fundamental types in the at least one language, wherein the mapping is provided for at least one of a following class: non-complex classes, and complex classes, wherein the mapping for the non-complex classes are provided by default, and wherein the mapping for the complex classes are provided by a user.
In the method, the integration classes includes at least one of a following element: adapter classes related to the original language, proxy classes related to the target language, data types related to the target language, streamers related to the target language, and streamers related to the original language. Also, the data types related to the target language are equivalent to the data types related to the original language.
The present invention also includes a method for integrating applications in multiple software languages, comprising: receiving properties related to an application in an original language, importing source files related to the application, receiving classes related to the source files, mapping data types related to the classes, and generating integration classes related to the data types.
The present invention further includes a computer readable medium that comprises instructions for importing source files related to an application in an original language, receiving classes related to the source files, mapping data types related to the classes, receiving properties related to an application in a target language, and integrating the original language application and the target language application.
FIG. 2 depicts a flow diagram 30 of the present invention. An input source file 32 in the original language, that includes a plurality of classes 33-36, is loaded into the software program implementing the current invention. Class 33 (or Class A) is a business class and classes 34 and 36 are data classes used by the business class. More specifically, Class A is an application class that is exported by the user. The application class consists of a method, for example, getB( ) and a member. Class B is a data class that is used as a result type by the method in the application Class A and Class C is a data class that is used as the type of a member in the application Class A. In this example, class 34 is used as a result of a method, class 36 is used as a public member, and class 33 is a class that is of interest to remote applications.
The input file 32 is imported into an application 38 (which is a software program implementing the current invention) that generates files or classes 44-48 on an original or source application side 40 and files or classes 50-58 on a remote or target application side 42. The streamer class 44 is generated for Class B which is used as the return type for the getB( ) method in Class A, while the streamer class generated for Class C is used as the type of the member in Class A. The Adapter class 48 is generated for Class A that provides target language applications to invoke the getB( ) method and access the member of original source application objects. The input file 32, the application 38, the source application side 40 and the target application side 42 may fully and/or partially reside on a client, a server, and/or a client and a server.
A proxy class 50 (related to the target language) sends a request 60 to an adapter class 48 (related to the original language), and a response 62 and an exception 64 are received by the proxy class 50. The request 60, the response 62, and the exception 64 are sent generally based on data types 52 and 54 related to the target language, streamers 56 and 58 related to the target language, and streamers 44 and 46 related to the original language. More specifically, the proxy class 50 is generated for the Class A to be used in the target language applications as a proxy for the original source application objects. The proxy class 50 contains a getB( ) method, an access for a member and a mutator for the member.
The Class B 52, is an equivalent class for Class B 34 in the original source language that forms the return type of the getB( ) method in the proxy, while the Class C 54 is an equivalent class for Class C 36 in the original source language that is used in the accessor and mutator for the member. The streamer classes 56 and 58 are streamer classes generated for the generated Class B and Class C, respectively.
The target language application 42 communicates with the source language application by invoking the getB( ) method on the proxy class. The method invocation causes the generated code to create a data packet 60 containing the intent of the target language application 42 to invoke the getB( ) method on the source language application 40 object. The packet 60 is transferred to the source language application 40. The source language application adapter 48 receives the packet 60 and invokes the method on the original source language application object. The return data of the method is returned as a response packet 62 to the target language application 42. If an exception occurs during the invocation of the method on the original source language application object, the exception data of the method is returned as a exception packet 64 to the target language application 42.
In one embodiment, a system for integrating applications in multiple software languages comprises a source language module comprising an adapter, and a target language module adapted to: invoke a method on a proxy class, and send a message indicating an intent to invoke the method on the source language module, wherein the adapter receives the message and invokes the method on the source language module, wherein the target language module is adapted to receive a response to the message, and wherein, if an exception occurs during the invocation of the method on the source language module, the target language module is adapted to receive an exception message.
Although an exemplary embodiment of the system and method of the present invention has been illustrated in the accompanied drawings and described in the foregoing detailed description, it will be understood that the invention is not limited to the embodiments disclosed, but is capable of numerous rearrangements, modifications, and substitutions without departing from the spirit of the invention as set forth and defined by the following claims. For example, the functionality performed by the input file 32, the application 38, the source application side 40 and the target application side 42, can be performed by one or more of the input file 32, the application 38, the source application side 40 and the target application side 42 in a distributed architecture and on or via any electronic device. Further, such functionality may be performed by depicted and/or un-depicted contents of the input file 32, the application 38, the source application side 40 and the target application side 42.
1. A method comprising:
receiving original language constructs related to an original language application written in an original language, the original language constructs including one or more classes associated with the original language application;
determining whether mappings are provided for mapping the original language constructs to one or more target language constructs related to a target language application written in a target language;
in response to determining that one or more of the mappings for the original language constructs to the one or more target language constructs are not provided, causing a prompt to be provided to enable the one or more of the mappings for the original language constructs to the one or more target language constructs to be provided; and
generating integration classes based at least in part on the one or more mappings for the original language constructs to the one or more target language constructs, the integration classes enabling the original language application to be integrated with the target language application, wherein the integration classes include a proxy class associated with the target language application and an adapter class associated with the original language application.
2. A method as recited in claim 1, wherein the original language and the target language are at least one of a following language:
a different language;
a same language; or
a related language.
3. A method as recited in claim 1, wherein the generating comprises integrating the original language application and the target language application.
4. A method as recited in claim 1, further comprising normalizing one or more properties of the original language into a common representation.
5. A method as recited in claim 4, wherein the common representation includes a metadata structure.
6. A method as recited in claim 1, wherein the original language constructs are adapted to be user-selected.
7. A method as recited in claim 1, further comprising mapping fundamental types in the original language.
8. A method as recited in claim 7, wherein the mapping is effective to map one or more user-defined types.
9. A method as recited in claim 8, wherein mapping for the one or more user-defined types is provided by default.
10. A method as recited in claim 8, wherein mapping for the one or more user-defined types is adapted to be user-provided.
11. A method as recited in claim 1, wherein the integration classes include at least one of the following elements:
data types related to the target language;
streamers related to the target language; or
streamers related to the original language.
12. A method as recited in claim 1, wherein the original language constructs include one or more original language data types.
13. A method as recited in claim 1, wherein generating the integration classes further comprises generating one or more proxies associated with the target language, the proxies being configured to request access to one or more objects associated with the original language.
14. A method as recited in claim 13, wherein one or more of the objects associated with the original language comprise an original language method.
15. A method as recited in claim 13, wherein generating the integration classes further comprises generating an adapter associated with the original language, the adapter being configured to receive a request from one or more of the proxies for access to one of the objects, and wherein the one of the objects comprises an original language method.
16. A method as recited in claim 15, wherein the adapter is further configured to invoke the original language method in response to the request from the one or more of the proxies.
17. A method comprising:
receiving original language constructs related to an original language application, the original language constructs including one or more classes associated with the original language application;
determining whether mappings are provided for mapping one or more of the original language constructs to one or more target language constructs related to a target language application written in a target language;
in response to determining that one or more of the mappings for the original language constructs to the one or more target language constructs are not provided, causing a prompt to be presented that enables the one or more mappings to be provided for the original language constructs to one or more target language constructs of the target language application;
receiving the one or more mappings for the original language constructs to the one or more target language constructs of the target language application;
generating integration classes related to the one or more mappings for the original language constructs to the one or more target language constructs, the integration classes enabling the original language application to be integrated with the target language application, the integration classes including a proxy class associated with the target language application and an adapter class associated with the original language application;
receiving at the adapter class a request from the proxy class to invoke a method associated with the original language application; and
invoking the method based at least in part on the request.
18. A system for integrating applications in multiple software languages, comprising:
a processor;
an application executable by the processor, the application being executable to:
receive a selection of one or more source language constructs associated with a source language;
determine whether one or more mappings are provided for mapping the one or more source language constructs to one or more target language constructs associated with a target language;
in response to determining that the one or more mappings for the one or more source language constructs to the one or more target language constructs are not provided, cause a prompt to be presented requesting that the one or more mappings be provided for the one or more source language constructs to the one or more target language constructs associated with the target language; and
generate code that is executable by the processor to connect an application in the source language with an application in a target language, the code being based at least in part on the one or more mappings for the one or more source language constructs to the one or more target language constructs, the code comprising:
integration classes comprising a proxy class associated with the application in the target language and an adapter class associated with the application in the source language; and
a target language module configured to:
invoke a method on a proxy class associated with the target language module; and
send a message to the adapter class indicating an intent to invoke the method on a source language module;
wherein the adapter class is configured to receive the message and invoke the method on the source language module.
19. A system as recited in claim 18, wherein the target language module is adapted to receive a response to the message.
20. A system as recited in claim 18, wherein the target language module is adapted to receive an exception message in response to an exception occurring during the invocation of the method on the source language module.
21. A computer-readable medium having stored thereon computer-executable instructions that, in response to execution by a device, cause the device to perform operations comprising:
receiving original language constructs related to an original language application written in an original language, the original language constructs including one or more classes associated with the original language application;
determining whether mappings are provided for mapping the original language constructs to one or more target language constructs related to a target language application written in a target language;
in response to determining that one or more of the mappings for the original language constructs to the one or more target language constructs are not provided, causing a prompt to be provided to enable the one or more of the mappings to be provided; and
generating integration classes based at least in part on the one or more mappings for the original language constructs to the one or more target language constructs, the integration classes enabling the original language application to be integrated with the target language application, wherein the integration classes include a proxy class associated with the target language application and an adapter class associated with the original language application.
22. The computer-readable medium of claim 21, wherein the original language and the target language are at least one of a following language:
a different language;
a same language; or
a related language.
23. The computer-readable medium of claim 21, wherein the generating comprises integrating the original language application and the target language application.
24. The computer-readable medium of claim 21, further comprising importing the source files related to the original language application by normalizing one or more properties of the original language into a common representation.
25. The computer-readable medium of claim 24, wherein the common representation includes a metadata structure.
26. The computer-readable medium of claim 21, wherein the computer-executable instructions, in response to execution by the device, enable the original language constructs to be user-selected.
27. The computer-readable medium of claim 21, further comprising mapping fundamental types in the original language.
28. The computer-readable medium of claim 27, wherein the mapping is effective to map one or more user-defined types.
29. The computer-readable medium of claim 28, wherein mapping for the one or more user-defined types is provided by default.
30. The computer-readable medium of claim 28, wherein the computer-executable instructions, in response to execution by the device, enable the mapping for the one or more user-defined types to be user-selected.
31. The computer-readable medium of claim 21, wherein the integration classes include at least one of the following elements:
data types related to the target language;
streamers related to the target language; or
streamers related to the original language.
32. The computer-readable medium of claim 31, wherein the data types related to the target language are equivalent to data types related to the original language.
33. An apparatus comprising:
a processor;
a memory, in which instructions are stored comprising an application configured to, in response to execution by the processor, cause the apparatus to:
receive original language constructs related to an original language application written in an original language, the original language constructs including one or more classes associated with the original language application;
determine whether mappings are provided for mapping the original language constructs to one or more target language constructs related to a target language application written in a target language;
in response to determining that one or more of the mappings for the original language constructs to the one or more target language constructs are not provided, cause a prompt to be provided to enable the one or more of the mappings for the original language constructs to the one or more target language constructs to be provided; and
generate integration classes based at least in part on the one or more of the mappings for the original language constructs to the one or more target language constructs, the integration classes enabling the original language application to be integrated with the target language application, wherein the integration classes include a proxy class associated with the target language application and an adapter class associated with the original language application.
34. The apparatus of claim 33, wherein the original language and the target language are at least one of a following language:
a different language;
a same language; or
a related language.
35. The apparatus of claim 33, wherein the application is further configured to, in response to execution by the processor, cause the apparatus to integrate the original language application and the target language application.
36. The apparatus of claim 33, wherein the application is further configured to, in response to execution by the processor, cause the apparatus to import the source files related to the application in the original language by normalizing one or more properties of the original language into a common representation.
37. The apparatus of claim 36, wherein the common representation includes a metadata structure.
38. The apparatus of claim 33, wherein the application is further configured to, in response to execution by the processor, cause the apparatus to enable the original language constructs to be user-selected.
39. The apparatus of claim 33, wherein the application is further configured to, in response to execution by the processor, cause the apparatus to map fundamental types in the original language.
40. The apparatus of claim 39, wherein the application is further configured to, in response to execution by the processor, cause the apparatus to map one or more user-defined types.
41. The apparatus of claim 40, wherein a mapping for the one or more user-defined types is provided by default.
42. The apparatus of claim 40, wherein the application is further configured to, in response to execution by the processor, cause the apparatus to enable a mapping for the one or more user-defined types to be user-provided.
43. The apparatus of claim 33, wherein the integration classes include at least one of the following elements:
data types related to the target language;
streamers related to the target language; or
streamers related to the original language.
44. The apparatus of claim 43, wherein the data types related to the target language are equivalent to data types related to the original language.