谁知道什么是Glue Code?

阿凡达哥 2009-06-10 08:46:01
In programming, glue code is code that does not contribute any functionality towards meeting the program's requirements, but instead serves solely to "glue together" different parts of code that would not otherwise be compatible. Glue code often appears in code written to let existing libraries or programs interoperate, as in foreign function interfaces like the Java native interface, or when mapping objects to a database using Object-Relational Mapping, or when integrating two or more Commercial off-the-shelf programs.

在wiki是找到对glue code的定义,但看不懂。谁帮我翻译一下?在《Mastering Enterprise JavaBeans 3.0》中看到的关键词。
...全文
440 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
qiheia 2009-06-11
  • 打赏
  • 举报
回复
呵呵,是啊
阿凡达哥 2009-06-11
  • 打赏
  • 举报
回复
楼上,这明明是用google翻译来做的。这个我也还是看不懂。。。。
阿凡达哥 2009-06-11
  • 打赏
  • 举报
回复
In programming, glue code is code that does not contribute any functionality towards meeting the program's requirements, but instead serves solely to "glue together" different parts of code that would not otherwise be compatible. Glue code often appears in code written to let existing libraries or programs interoperate, as in foreign function interfaces like the Java native interface, or when mapping objects to a database using Object-Relational Mapping, or when integrating two or more Commercial off-the-shelf programs.
在程序设计中,粘合代码是不是为了满足程序的需求而设计编写的,而是为了实现将不同部分的不兼容的代码“粘合在一起”而设计编写的。在编写代码过程中,粘合代码的出现是为了让存在的库或程序间进行交互,例如:像Java的外来的(如C++)本地功能接口(让本地C++API和JavaAPI粘合在一起了),或映射对象到数据库使用的面向对象映射(如:hbm.xml及JPA标准的类源文件中的注解,它们让SQL API和Java API粘合在一起了),或集中成两个或更多个商业非专用的程序

这是本人所翻译的,感觉有点念不通,谁整理一下。或给个正确答案????
qiheia 2009-06-10
  • 打赏
  • 举报
回复
In programming, glue code is code that does not contribute any functionality towards meeting the program's requirements, but instead serves solely to "glue together" different parts of code that would not otherwise be compatible. Glue code often appears in code written to let existing libraries or programs interoperate, as in foreign function interfaces like the Java native interface, or when mapping objects to a database using Object-Relational Mapping, or when integrating two or more Commercial off-the-shelf programs.

翻译为:
在编制方案,胶水代码代码,不会有助于任何功能为满足程序的要求,而是完全服务“粘合起来”不同地区的代码,否则无法兼容。粘接代码往往出现在编写的代码,让现有的图书馆或程序互通,如在外国的功能接口,如Java的本地接口,或者当映射对象到数据库使用对象关系映射,或将两个或两个以上的商业离大陆架项目。


====================================================
软件自动翻译的,哎看不懂啊,呵呵

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧