XPCOM, XPIDL, XPFE on Internet Explorer (IE)

We have recently discussed about the three parts of Mozilla Firefox which are extremely valuable for the browser’s functionality and it’s time to see what are the alternatives that other browsers such as Microsoft’s Internet Explorer and Google Chrome offer in order to compete Firefox’s XPCOM, XPIDL and XPFE. During my research I found fair to present a browser with a longer history than the newly entered in the browser scene “Chrome” and that’s no other from Internet Explorer.

Microsoft’ s Internet Explorer (commonly abbreviated in IE) is currently at his 9th beta version being released with great perspectives related to his speed and general functionality. But let’s see what happens at the inner section.

Mozilla’s XPCOM alternative

Component Object Model (COM) is a binary-interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages. The main purpose of its use is implement objects which can be used in environments different from the one in which they were created. Although it doesn’t sypport full cross-platform functionality like XPCOM, it has also being used as standard at Apple’s Core Foundation 1.3. The advantage of COM is that you are able to reuse objects without knowning their implementation as it combines interfaces’ descriptions (IDL) which are separate from the implementation. Of course the uniqueness of this techique has been lost, cause Mozilla offers exactly the same ease of use with well-defined and readable interfaces (XPIDL).

So we can assume that Internet Explorer also uses a componentized architecture built with techologies like Firefox’s ones, but with the difference on building blocks. Here we have components with each one having its own Dynamic-link library (DLL – the major drawback of Microsoft’s software) and exposes a set o COM programming interfaces. Personally I find Firefox’s modularity more user-friendly (not to mention the open-source orientation).

What happens with the code structure?

A COM developer should have in mind that it’s all about components. You should create one, describe it with an interface (or multiple interfaces) on a programming language (e.g. C, C++, Delphi) and give the each interface a unique number to distinguish them.

An interface contains all the methods that a programmer needs to access a COM component. Each interface consists of a pointer to a virtual function table that contains a list of pointers to the functions that implement the functions declared in the interface, in the same order that they are declared in the interface.

And what about IDL?

COM has its own mechanism for handling interface files and compiling them into our known type libraries (binary metadata files). The purpose of type libraries is the same as XPCOM’s: maintain compatibility on a a binary level so the client code can find and use the library it needs without worrying about linking it. In order to complete this procedure irterfaces are being compiled using Microsoft’s Interface Definition Language (MIDL) compiler. MIDL on its own its an text-based interface description language which with some extension provide the required functionality.

Although, COM remains the soul of IE it has been extended with .NET Framework supporting web services and becoming more distributed (through WCF) and someone can sense the feeling of deprecation of COM. I can describe .NET as a union of XPCOM, XPIDL and XPFE offering plenty of languages to work with like ASP, C#, Jscript etc.

Little words about .NET Framework…

Microsoft .NET Framework is a software framework that manages execution of programs written specifically for the framework aiming to provide language interoperability with biding different languages (each language can utilize code written in other languages) with the restriction for the language to belong at the .NET supporting language set. Part of the .NET is a runtime environment known as the Common Language Runtime (CLR) which provides the appearance of an application virtual machine so that programmers needn’t to consider the capabilities of the specific CPU that will execute the program.

net clr operation

.NET CLR "duty"

But how COM interacts with .NET?

Here comes COM Interop, a component of .NET Common Language Runtime (CLR) that enables bidirectional object interaction between COM and .NET in order not to make any change to previous compontents and to have smooth fuctionality. The actions that take place behind the scene include registration of the COM object, creation of required type libraries and implementation of appropriate method calls. All in all, the whole process is a temporarely replace of .NET CLR with the actual COM component.

Future plans for .NET

The design of the .NET Framework allows it to theoretically be platform agnostic, and thus cross-platform compatible. That is, a program written to use the framework should run without change on any type of system for which the framework is implemented. While Microsoft has never implemented the full framework on any system except Microsoft Windows, the framework is engineered to be platform agnostic.

As we can consider from the above stuff (until the appearance of an amount of new open-minded implemented software) cross platformness is not supported for Internet Explorer so we can discuss on a subject of COM and IDL leaving outside XP. Refering to XPFE, the majority of tools for web developing included in XPFE framework are supported on IE (e.g. javascript, css, xml) but due to the closed sourced policy that restrict out-of-the-box operation on other OS’s, loses its cross platform character.

All in all, I have concluded that currently the main difference between the two browsers’ architecture is that on the one hand, IE offers language interoperability, but on the other hand Firefox extends that with offering cross-platformness and open-source software which is most important nowrdays where the needs for customization are becoming bigger and bigger.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s