XPCOM

  • 版本网址缩略名: XPCOM
  • 版本标题: XPCOM
  • 版本 id: 363381
  • 创建于:
  • 创建者: shudingbo
  • 是否是当前版本?
  • 评论

修订内容

 

XPCOM(Cross Platform Component Object Model)是一种跨平台组件模型,是Mozilla技术的核心。其原理与微软的COM技术类似,但与COM不同的是,XPCOM是一种跨平台技术,并支持多种语言绑定(Language Bindings)。也就是说,我们可以使用C++、JAVA、JavaScript、Python、Ruby、Perl等语言来编写组件。而XPCOM的接口(Interface)是用一种叫做XPIDL的IDL(Interface Description Language)来定义的。{{ Ref(1) }}

XPCOM 自身提供了一套核心的组件和类,用于诸如内存管理,线程,基本数据结构(strings, arrays, variants)等 。但是大部分的XPCOM组件并不是这个核心库提供的,而是由很多第三方的平台(例如Gecko或者Necko)提供,或者由一个应用,甚至一个扩展提供。

文章精选

Using XPCOM in JavaScript without leaking
Using XPCOM in JavaScript (also known as XPConnect) is an environment where memory management issues are not obvious. There are no calls to malloc and free and no reference counting. Despite this, it's easy to write JavaScript code that leaks. It's easy to to write leaky code in any garbage-collected language. But it's even easier in this environment because some of the objects you're dealing with are reference-counted behind the scenes.
XPCOM Glue
The XPCOM Glue allows using XPCOM utility functions and classes, without having a dependency on unfrozen parts of XPCOM (xpcom_core.{dll,so,dylib}).
How to Build an XPCOM Component in Javascript
Quick-start guide for writing JavaScript components
XPCOM Part 1: An introduction to XPCOM
{{ Added-date("External") }} If you are looking for new ways to speed development of your applications, or you want to expand the number of platforms that your software supports, you need to take a look at XPCOM.

 

View All...

特色内容

工具

C++组件VS2005向导

C++组件向导(vs2010)

其他网页

相关主题

Language Bindings, JavaXPCOM, PyXPCOM, XPConnect, JavaScript, xpinstall

View All...

{{ Note(1) }} Wikipedia's XPCOM article

Categories

Interwiki Language Links

 

{{ languages( { "en": "en/XPCOM", "es": "es/XPCOM", "fr": "fr/XPCOM", "it": "it/XPCOM", "ja": "ja/XPCOM", "ko": "ko/XPCOM", "pl": "pl/XPCOM" } ) }}

修订版来源

<p>&nbsp;</p>
<div>
  <p><b>XPCOM</b>(Cross Platform Component Object Model)是一种跨平台组件模型,是Mozilla技术的核心。其原理与微软的COM技术类似,但与COM不同的是,XPCOM是一种跨平台技术,并支持多种语言绑定(<a href="cn/XPCOM/Language_Bindings">Language Bindings</a>)。也就是说,我们可以使用C++、JAVA、JavaScript、Python、Ruby、Perl等语言来编写组件。而XPCOM的接口(Interface)是用一种叫做<a href="cn/XPIDL">XPIDL</a>的IDL(Interface Description Language)来定义的。{{ Ref(1) }}</p>
</div>
<div>
  <p>XPCOM 自身提供了一套核心的组件和类,用于诸如内存管理,线程,基本数据结构(strings, arrays, variants)等 。但是大部分的XPCOM组件并不是这个核心库提供的,而是由很多第三方的平台(例如<a href="cn/Gecko">Gecko</a>或者<a href="cn/Necko">Necko</a>)提供,或者由一个应用,甚至一个扩展提供。</p>
</div>
<table class="topicpage-table">
  <tbody>
    <tr>
      <td>
        <h4 id=".E6.96.87.E7.AB.A0.E7.B2.BE.E9.80.89" name=".E6.96.87.E7.AB.A0.E7.B2.BE.E9.80.89">文章精选</h4>
        <dl>
          <dt>
            <a class="external" href="http://www.mozilla.org/scriptable/avoiding-leaks.html">Using XPCOM in JavaScript without leaking</a></dt>
          <dd>
            <small>Using XPCOM in JavaScript (also known as XPConnect) is an environment where memory management issues are not obvious. There are no calls to malloc and free and no reference counting. Despite this, it's easy to write JavaScript code that leaks. It's easy to to write leaky code in any garbage-collected language. But it's even easier in this environment because some of the objects you're dealing with are reference-counted behind the scenes.</small></dd>
        </dl>
        <dl>
          <dt>
            <a href="cn/XPCOM_Glue">XPCOM Glue</a></dt>
          <dd>
            <small>The XPCOM Glue allows using XPCOM utility functions and classes, without having a dependency on unfrozen parts of XPCOM (xpcom_core.{dll,so,dylib}).</small></dd>
        </dl>
        <dl>
          <dt>
            <a href="cn/How_to_Build_an_XPCOM_Component_in_Javascript">How to Build an XPCOM Component in Javascript</a></dt>
          <dd>
            <small>Quick-start guide for writing JavaScript components</small></dd>
        </dl>
        <dl>
          <dt>
            <span class="exlink"><a href="cn/XPCOM_Part_1/An_introduction_to_XPCOM_(external)">XPCOM Part 1: An introduction to XPCOM</a></span></dt>
          <dd>
            <small>{{ Added-date("External") }} If you are looking for new ways to speed development of your applications, or you want to expand the number of platforms that your software supports, you need to take a look at XPCOM. </small></dd>
        </dl>
        <ul>
          <li><a href="cn/XPCOM_Part_2/XPCOM_Component_Basics_(external)">XPCOM Part 2: XPCOM Component Basics</a></li>
          <li><a href="cn/XPCOM_Part_3/Setting_up_XPCOM_(external)">XPCOM Part 3: Setting up XPCOM</a></li>
          <li><a href="cn/XPCOM_Part_4/Component_Development_(external)">XPCOM Part 4: Component Development</a></li>
          <li><a href="cn/XPCOM_Part_5/Implementation_(external)">XPCOM Part 5: Implementation</a></li>
        </ul>
        <p>&nbsp;</p>
        <p><span class="alllinks"><a href="Special:Tags?tag=XPCOM:Articles&amp;language=zh-cn">View All...</a></span></p>
      </td>
      <td>
        <h4 id=".E7.89.B9.E8.89.B2.E5.86.85.E5.AE.B9" name=".E7.89.B9.E8.89.B2.E5.86.85.E5.AE.B9">特色内容</h4>
        <ul>
          <li><a href="cn/%e5%88%9b%e5%bb%ba_XPCOM_%e7%bb%84%e4%bb%b6">创建 XPCOM 组件</a></li>
          <li><a href="cn/XPCOM/Hashtables">XPCOM Hashtables</a></li>
          <li><a href="cn/XPCOM/Strings">XPCOM Strings</a></li>
          <li><a href="cn/XPCOM/Array">XPCOM Array</a></li>
        </ul>
        <h4 id=".E5.B7.A5.E5.85.B7" name=".E5.B7.A5.E5.85.B7">工具</h4>
        <p><a class="external" href="http://www.mytools360.com/">C++组件VS2005向导</a></p>
        <p><a href="http://www.yutools.com/wp/tools/yuxpcomwizard/" title="http://www.yutools.com/wp/tools/yuxpcomwizard/">C++组件向导(vs2010)</a></p>
        <h4 id=".E5.85.B6.E4.BB.96.E7.BD.91.E9.A1.B5" name=".E5.85.B6.E4.BB.96.E7.BD.91.E9.A1.B5">其他网页</h4>
        <ul>
          <li><a href="Special:Tags?tag=XPCOM:References&amp;language=zh-cn">引用</a></li>
          <li><a href="Special:Tags?tag=XPCOM:Articles&amp;language=zh-cn">文档</a></li>
          <li><a href="cn/XPCOM/Community">社区</a></li>
          <li><a href="cn/XPCOM/Other_Resources">其他资源</a></li>
        </ul>
        <h4 id=".E7.9B.B8.E5.85.B3.E4.B8.BB.E9.A2.98" name=".E7.9B.B8.E5.85.B3.E4.B8.BB.E9.A2.98">相关主题</h4>
        <dl>
          <dd>
            <a href="cn/XPCOM/Language_Bindings">Language Bindings</a>, <a href="cn/JavaXPCOM">JavaXPCOM</a>, <a href="cn/PyXPCOM">PyXPCOM</a>, <a href="cn/XPConnect">XPConnect</a>, <a href="cn/JavaScript">JavaScript</a>, <a class="external" href="http://www.mozilla.org/projects/xpinstall">xpinstall</a></dd>
        </dl>
        <p><span class="alllinks"><a class="external" href="http://developer.mozilla.org/webwatch/?cat=32">View All...</a></span></p>
      </td>
    </tr>
  </tbody>
</table>
<p><small>{{ Note(1) }} <a class="external" href="http://en.wikipedia.org/wiki/XPCOM">Wikipedia's XPCOM article</a></small></p>
<p><span class="comment">Categories</span></p>
<p><span class="comment">Interwiki Language Links</span></p>
<p>&nbsp;</p>
<p>{{ languages( { "en": "en/XPCOM", "es": "es/XPCOM", "fr": "fr/XPCOM", "it": "it/XPCOM", "ja": "ja/XPCOM", "ko": "ko/XPCOM", "pl": "pl/XPCOM" } ) }}</p>
恢复到这个版本