Difference between revisions of "Mozilla Technology Overview"
m (→JavaScript) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
== Netscape Portable Runtime (NSPR) - http://www.mozilla.org/projects/nspr/index.html == | == Netscape Portable Runtime (NSPR) - http://www.mozilla.org/projects/nspr/index.html == | ||
− | The Netscape Portable Runtime (NSPR) provides a platform-neutral API for system level and libc like functions. The API provides platform independence for non-GUI operating system facilities. These facilities include threads, thread synchronization, normal file and network I/O, interval timing and calendar time, basic memory management (malloc and free) and shared library linking. | + | The [http://en.wikipedia.org/wiki/Netscape_Portable_Runtime Netscape Portable Runtime (NSPR)] provides a platform-neutral API for system level and libc like functions. The API provides platform independence for non-GUI operating system facilities. These facilities include threads, thread synchronization, normal file and network I/O, interval timing and calendar time, basic memory management (malloc and free) and shared library linking. |
Examples: | Examples: | ||
Line 15: | Line 15: | ||
http://lxr.mozilla.org/seamonkey/source/parser/htmlparser/tests/html/TestParser.cpp#53 | http://lxr.mozilla.org/seamonkey/source/parser/htmlparser/tests/html/TestParser.cpp#53 | ||
− | == Gecko ( | + | == Gecko (Embeddable Browser Engine) - http://developer.mozilla.org/en/docs/Gecko == |
− | Gecko is the name of the layout engine developed by the Mozilla Foundation. It was | + | [http://en.wikipedia.org/wiki/Gecko_%28layout_engine%29 Gecko] is the name of the layout engine developed by the Mozilla Foundation. It was originally named NGLayout. Gecko's function is to read web content, such as HTML, CSS, XUL, and JavaScript, and render it on user's screen or print it. In XUL-based applications Gecko is used to render the application's user interface as well. For embedding information see http://www.mozilla.org/projects/embedding/ |
− | originally named NGLayout. Gecko's function is to read web content, such as HTML, CSS, XUL, and JavaScript, and render it on user's screen or print it. In XUL-based applications Gecko is used to render the application's user interface as well. For | ||
== XPCOM (http://www.mozilla.org/projects/xpcom/) == | == XPCOM (http://www.mozilla.org/projects/xpcom/) == | ||
− | XPCOM is a cross platform component object model, similar to Microsoft COM. It has multiple language bindings, letting the XPCOM components be used and implemented in JavaScript, Java, and Python in addition to C++. Interfaces in XPCOM are defined in a dialect of IDL called XPIDL. XPCOM itself provides a set of core components and classes, e.g. file and memory management, threads, basic data structures (strings, arrays, variants), etc. | + | [http://en.wikipedia.org/wiki/XPCOM XPCOM] is a cross platform component object model, similar to Microsoft COM. It has multiple language bindings, letting the XPCOM components be used and implemented in JavaScript, Java, and Python in addition to C++. Interfaces in XPCOM are defined in a dialect of IDL called XPIDL. XPCOM itself provides a set of core components and classes, e.g. file and memory management, threads, basic data structures (strings, arrays, variants), etc. |
Examples of XPCOM being used: | Examples of XPCOM being used: | ||
Line 31: | Line 30: | ||
== XPConnect == | == XPConnect == | ||
− | XPConnect is a bridge between JavaScript and XPCOM. With XPConnect, you can use XPCOM components from JavaScript code, and interact with JavaScript objects from within XPCOM components. | + | [http://en.wikipedia.org/wiki/XPConnect XPConnect] is a bridge between JavaScript and XPCOM. With XPConnect, you can use XPCOM components from JavaScript code, and interact with JavaScript objects from within XPCOM components. |
== JavaScript== | == JavaScript== | ||
− | Mozilla is the creator of | + | Mozilla is the creator of [http://en.wikipedia.org/wiki/JavaScript JavaScript], and their use of it is second to none. Many people consider JS a language for doing simple web-page scripting. Mozilla proves that this is not the case. |
Example: Adding a Bookmark in Firefox - | Example: Adding a Bookmark in Firefox - | ||
Line 43: | Line 42: | ||
== XUL == | == XUL == | ||
− | XUL (pronounced "zool") is Mozilla's XML-based user interface language that lets you | + | [http://en.wikipedia.org/wiki/XUL XUL] (pronounced "zool") is Mozilla's XML-based user interface language that lets you |
build feature rich cross-platform applications that can run connected to or disconnected from the Internet. These applications are easily customized with alternative text, graphics, and layout so they can be readily branded or localized for various markets. Web developers already familiar with Dynamic HTML (DHTML) will learn XUL quickly and can start building applications right away. | build feature rich cross-platform applications that can run connected to or disconnected from the Internet. These applications are easily customized with alternative text, graphics, and layout so they can be readily branded or localized for various markets. Web developers already familiar with Dynamic HTML (DHTML) will learn XUL quickly and can start building applications right away. | ||
Line 51: | Line 50: | ||
== Extensions == | == Extensions == | ||
− | Extensions are small add-ons that add new functionality to Mozilla applications such as Firefox and Thunderbird. They can add anything from a toolbar button to a completely new feature. They allow the application to be customized to fit the personal needs of each user if they need additional features, while keeping the applications small to download. | + | [http://en.wikipedia.org/wiki/Extension_%28Mozilla%29 Extensions] are small add-ons that add new functionality to Mozilla applications such as Firefox and Thunderbird. They can add anything from a toolbar button to a completely new feature. They allow the application to be customized to fit the personal needs of each user if they need additional features, while keeping the applications small to download. |
Modifying the Browser: AdBlock (show blocking an image from yahoo.com or Flash) https://addons.mozilla.org/firefox/1865/ | Modifying the Browser: AdBlock (show blocking an image from yahoo.com or Flash) https://addons.mozilla.org/firefox/1865/ | ||
Line 65: | Line 64: | ||
* '''Firefox''' (http://www.mozilla.com/en-US/) -- XUL based Gecko web browser. | * '''Firefox''' (http://www.mozilla.com/en-US/) -- XUL based Gecko web browser. | ||
− | * '''Camino''' (http://www.caminobrowser.org/) -- A Gecko web browser that uses native Cocoa APIs for the GUI. See http://www.caminobrowser.org/ | + | * '''Camino''' (http://www.caminobrowser.org/) -- A Gecko web browser that uses native Cocoa APIs for the GUI. See http://www.caminobrowser.org/press/screenshots/apple.png) |
* '''Thunderbird''' (http://www.mozilla.com/en-US/thunderbird/) -- XUL based Gecko email client. | * '''Thunderbird''' (http://www.mozilla.com/en-US/thunderbird/) -- XUL based Gecko email client. |
Latest revision as of 23:46, 20 May 2008
Introduction
The Mozilla Platform is made-up of layers of separate technologies that go together to create various browser, Internet, and communication products. These projects all benefit from the same cross-platform, modular architecture.
Important Platform Technologies
Netscape Portable Runtime (NSPR) - http://www.mozilla.org/projects/nspr/index.html
The Netscape Portable Runtime (NSPR) provides a platform-neutral API for system level and libc like functions. The API provides platform independence for non-GUI operating system facilities. These facilities include threads, thread synchronization, normal file and network I/O, interval timing and calendar time, basic memory management (malloc and free) and shared library linking.
Examples:
- API Reference - http://www.mozilla.org/projects/nspr/reference/html
- Good example showing File I/O using NSPR -
http://lxr.mozilla.org/seamonkey/source/parser/htmlparser/tests/html/TestParser.cpp#53
Gecko (Embeddable Browser Engine) - http://developer.mozilla.org/en/docs/Gecko
Gecko is the name of the layout engine developed by the Mozilla Foundation. It was originally named NGLayout. Gecko's function is to read web content, such as HTML, CSS, XUL, and JavaScript, and render it on user's screen or print it. In XUL-based applications Gecko is used to render the application's user interface as well. For embedding information see http://www.mozilla.org/projects/embedding/
XPCOM (http://www.mozilla.org/projects/xpcom/)
XPCOM is a cross platform component object model, similar to Microsoft COM. It has multiple language bindings, letting the XPCOM components be used and implemented in JavaScript, Java, and Python in addition to C++. Interfaces in XPCOM are defined in a dialect of IDL called XPIDL. XPCOM itself provides a set of core components and classes, e.g. file and memory management, threads, basic data structures (strings, arrays, variants), etc.
Examples of XPCOM being used:
- C++ - http://lxr.mozilla.org/seamonkey/source/toolkit/xre/nsAppRunner.cpp#2683
- JS - http://lxr.mozilla.org/seamonkey/source/toolkit/content/nsDragAndDrop.js#303
XPConnect
XPConnect is a bridge between JavaScript and XPCOM. With XPConnect, you can use XPCOM components from JavaScript code, and interact with JavaScript objects from within XPCOM components.
JavaScript
Mozilla is the creator of JavaScript, and their use of it is second to none. Many people consider JS a language for doing simple web-page scripting. Mozilla proves that this is not the case.
Example: Adding a Bookmark in Firefox -
http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js#1753
XUL
XUL (pronounced "zool") is Mozilla's XML-based user interface language that lets you build feature rich cross-platform applications that can run connected to or disconnected from the Internet. These applications are easily customized with alternative text, graphics, and layout so they can be readily branded or localized for various markets. Web developers already familiar with Dynamic HTML (DHTML) will learn XUL quickly and can start building applications right away.
Example XUL File (browser.xul) http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.xul
Extensions
Extensions are small add-ons that add new functionality to Mozilla applications such as Firefox and Thunderbird. They can add anything from a toolbar button to a completely new feature. They allow the application to be customized to fit the personal needs of each user if they need additional features, while keeping the applications small to download.
Modifying the Browser: AdBlock (show blocking an image from yahoo.com or Flash) https://addons.mozilla.org/firefox/1865/
Whole new Applications: ChatZilla (we'll use it later).
Software Products Built on Mozilla
"Mozilla" vs. Firefox
Mozilla is a platform and not a browser. Many browsers (and other web-enabled applications) are built using the Mozilla platform. Firefox is the most popular and visible of these applications. However, Firefox is only a thin UI layer on-top of the Mozilla platform. Developers working in C, C++, JavaScript, HTML all work on and with the Mozilla platform.
- Firefox (http://www.mozilla.com/en-US/) -- XUL based Gecko web browser.
- Camino (http://www.caminobrowser.org/) -- A Gecko web browser that uses native Cocoa APIs for the GUI. See http://www.caminobrowser.org/press/screenshots/apple.png)
- Thunderbird (http://www.mozilla.com/en-US/thunderbird/) -- XUL based Gecko email client.
- Eudora/Penelope (http://wiki.mozilla.org/Penelope_Releases) -- An email client built on-top of Thunderbird as an extension. Originally developed by Qualcomm, and now open source and run through Qualcomm/Mozilla.
- Sunbird and Lightening (http://www.mozilla.org/projects/calendar/) -- XUL based Gecko calendar clients.
- Miro (http://www.getmiro.com/) -- formerly Democracy, an Internet TV application dedicated to open standards and practices for web TV.
- Songbird (http://www.songbirdnest.com/) -- Desktop media player
- Open Komodo from ActiveState (http://www.activestate.com/openkomodo/) -- A developer tool targeting web developers and script language programmers.