Mixed-Language Programming : How To Manage Objects(2)

 

For multi language programming of c/c++, python, java, csharp, etc, the blog introduces a common and simplified method, which uses common object environment to manage interface object of different languages. The document discusses on 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 same or different languages. We can group interface objects of a component together as a service, and application is regards as a service too. Then, common object environment is made up of one or more services. An application with services depended on is called service group. Using a figure to illustrate is as follows:

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

Service of different languages based on common object environment may be packed and published as a component or library. The component has significant advantages. It can be called by any other languages supported by environment. Therefore, the components or libraries are common. For example, the component written by java will be used in c/c++, java, c#, python, etc, without any change needed.

Because there is a common object environment managing services and objects, developer can publish their components on websites. If application or product needs the component, common object environment is responsible for downloading from website and loading it in application memory. For existing development result, kinds of source code, or libraries, they can be added function support for common object environment easily and becomes common components. These will reduce duplication of code developments 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 also sort objects into different groups. These groups are called service item which it is only a name and nor more meaning.

Conclusion: for convenient, common object environment uses framework of service group, service, service item, and objects to manage interface objects in environment. The service can be packed and published as common components or libraries which have more advantages.

[23-05-29 20:39:13.243] {main} <proxy-cache> requires Resin Professional. Please see http://www.caucho.com for Resin Professional information and licensing. [23-05-29 20:39:13.400] {main} [23-05-29 20:39:13.400] {main} Resin-4.0.58 (built Fri, 24 Aug 2018 01:23:14 PDT) [23-05-29 20:39:13.401] {main} [23-05-29 20:39:13.402] {main} Windows 10 10.0 amd64 [23-05-29 20:39:13.402] {main} Java(TM) SE Runtime Environment 1.8.0_191-b12, GBK, zh [23-05-29 20:39:13.402] {main} Java HotSpot(TM) 64-Bit Server VM 25.191-b12, 64, mixed mode, Oracle Corporation [23-05-29 20:39:13.402] {main} [23-05-29 20:39:13.403] {main} user.name = WR182 [23-05-29 20:39:13.541] {main} [23-05-29 20:39:13.546] {main} server listening to 127.0.0.1:6800 [23-05-29 20:39:13.549] {main} [23-05-29 20:39:13.766] {main} Table[mnode:2,D:\WEAVER\Resin\resin-data\app-0\distcache\mnode.db] validating indexes due to unclean shutdown. [23-05-29 20:39:13.816] {main} Table[data:3,D:\WEAVER\Resin\resin-data\app-0\distcache\data.db] validating indexes due to unclean shutdown. [23-05-29 20:39:13.942] {main} [23-05-29 20:39:13.943] {main} resin.home = D:\WEAVER\Resin [23-05-29 20:39:13.943] {main} resin.root = D:\WEAVER\Resin [23-05-29 20:39:13.943] {main} resin.conf = d:\WEAVER\Resin\conf\resin.xml [23-05-29 20:39:13.943] {main} [23-05-29 20:39:13.943] {main} server = 127.0.0.1:6800 (app:app-0) [23-05-29 20:39:13.943] {main} stage = production [23-05-29 20:41:38.003] {main} Found library 'resin_os' as 'd:\WEAVER\Resin\win64\resin_os.dll', but the load failed. The JVM exception was: java.lang.UnsatisfiedLinkError: no resin_os in java.library.path [23-05-29 20:42:40.782] {resin-60} WebApp[production/webapp/default/lib] active [23-05-29 20:42:40.782] {main} Host[production/host/default] active [23-05-29 20:42:40.782] {main} ServletService[id=app-0,cluster=app] active [23-05-29 20:42:40.782] {main} [23-05-29 20:42:40.782] {main} http listening to *:8080 [23-05-29 20:42:40.782] {main} https listening to *:8444 [23-05-29 20:42:40.796] {main} [23-05-29 20:42:40.796] {main} Resin[id=app-0] started in 210426ms Connected to server [23-05-29 20:43:29.233] {resin-55} WebApp[production/webapp/default/ROOT] active
05-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值