Click here to Skip to main content
15,884,237 members
Articles / All Topics

Multi Language Programming: How to Manage Objects

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
13 Oct 2011CPOL2 min read 10.8K   5  
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:

Image 1

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.

Image 2

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.

Conclusion

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 was originally posted at http://blog.yahoo.com/srplab/articles/54802

License

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


Written By
China China
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --