Click here to Skip to main content
13,139,569 members (49,033 online)
Click here to Skip to main content
Add your own
alternative version


5 bookmarked
Posted 13 Oct 2011

Multi Language Programming: How to Manage Objects

, 13 Oct 2011
Rate this:
Please Sign up or sign in to vote.
How to manage objects in multi language programming

For multi language programming in C/C++, Python, Java, C#, etc., this blog introduces a common and simplified method which uses a common object environment to manage interface objects of different languages. The document discusses how to manage these objects further.

Interface objects may belong to different languages or different components or libraries. An application or product may also depend on multiple components or libraries of the same or different languages. We can group interface objects of a component together as a service, and the application is regarded as a service too. A common object environment is made up of one or more services. An application with services dependent on is called a service group. Using a figure to illustrate it as follows:

Interface objects managed by the common object environment have attributes and functions. For an application to get/set an object’s attributes or call an object’s functions, first, it should find the object defined in other services through a function presented by the common object environment. Then, it calls the object’s functions, and the environment is responsible for translating the input and output arguments. The detailed method will be discussed later.

A service of different languages based on a common object environment may be packed and published as a component or library. Such component has significant advantages. It can be called by any other language supported by the environment. Therefore, the components or libraries are common. For example, a component written in Java will be used in C/C++, Java, C#, Python, etc., without any changes needed.

Because there is a common object environment managing services and objects, the developer can publish their components on websites. If an application or product needs the component, the common object environment is responsible for downloading it from the website and loading it in application memory. For existing developments, source code, or libraries, they can add function support for the common object environment easily and become common components. This will reduce duplication of code development and improve efficiency greatly. Developers no longer need to rewrite and test their components for new languages.

There may be a large number of objects for a service. For further managing these objects, we can sort objects into different groups. These groups are called service items which is only a name and no more.


For convenience, the common object environment will use the framework of service group, service, service item, and objects to manage interface objects in the environment. The service can be packed and published as common components or libraries which have more advantages.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

China China
No Biography provided

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.170915.1 | Last Updated 13 Oct 2011
Article Copyright 2011 by li9705
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid