Open main menu

CDOT Wiki β

Changes

Components and Interfaces

749 bytes added, 17:30, 4 October 2006
no edit summary
Components and Interfaces define and/or implement small pieces of modular code that can be reused in the codebase.
 
''For example, Necko is the network library which is made up of several components such as HTTP, FTP, and other network protocol definitions and implementations.''
=== Component ===
These components can be grouped together to become a Module. A component or several components (aka Module) are delivered as binary library. In Windows, libraries are .dll files; whereas, Unix libraries are DSO.
  ''For example, Necko is the network library which is made up CookieManager Component can be called from Javascript code''  // xpconnect to cookiemanager // get the cookie manager component in JavaScript var cookiemanager = Components.classes["@mozilla.org/ cookiemanager;1"].getService(); cookiemanager = cookiemanager.QueryInterface (Components.interfaces.nsICookieManager); // called as part of several components such as HTTPa largerDeleteAllCookies() function function FinalizeCookieDeletions() { for (var c=0; c<deletedCookies.length; c++) { cookiemanager.remove(deletedCookies[c].host, FTP deletedCookies[c].name, and other network protocol implementations deletedCookies[c].path); } deletedCookies.''length = 0; }  
=== Interface ===
1
edit