Alternatives for NPAPI

Oct 20, 2014 by Alin

As presented in my previous post about NPAPI, this architecture is slowly being phased out by browsers, such as Google Chrome and Mozilla Firefox, so more developers have started looking for alternatives. In this article I'll try to make up a list of the available options in terms of technologies:

Pepper Plugin API (PPAPI) is an experimental API, supported only by Google Chrome. It started as a way to easily migrate existing plug-ins from NPAPI. Since Chrome 5, PPAPI plug-ins could be started only through the browser’s command-line, but now they are also supported through NaCl.

Google cloud messagingNative Client allows almost any native, untrusted code to run in a safe environment (sandbox). It uses the Pepper API and a special C/C++ compiler to allow plug-ins to run even the most complex operations. It used to be available only to the plug-ins from Chrome Web Store, but after the launch of Portable Native Client (PNaCl), this is no longer a limitation. Additionally, PNaCl is compatible with other browsers via pepper.js which allows native Pepper applications to run via JavaScript.

Google Native Messaging allows Chrome plug-ins to exchange messages with native applications. The applications, which can run native code, can be started from a plug-in in the browser. Unfortunately, this technology is supported only by Google Chrome and it usually requires two installers: one for the plug-in one for the application. While it’s a good alternative for the development of hidden plug-ins, it doesn’t have proper video support.

Js-ctypes is a technology specific to Mozilla applications (such as Firefox and Thunderbird) that is similar to Google Native Messaging. It allows running native C (and some C++) code by calling .DLL files from an extension. JS-ctypes can be used only in extensions and plug-ins and as a disadvantage - it doesn’t have any drawing support.

WebSocket is a protocol that enables communications between the client (or server) and an application installed on the local system. The connection is established over TCP using port 80, which bypasses some firewalls. WebSocket is supported by all the major desktop and mobile browsers - and this already represents a big advantage for web development.

Web Graphics Library (WebGL) is web standard used for rendering 2D and 3D graphics without the user of plug-ins. It uses HTML 5 canvas element and it is accessed using Document Object Model (DOM) interface. WebGL is compatible with most desktop and mobile browsers, however it’s also GPU dependent.

WebRTC standardWebRTC
is a set of standards what enables browser-to-browser real time communications. It is currently supported by the major browsers and it allows developers to create apps for voice calling, screen sharing, peer-to-peer file sharing etc., without relying on plug-ins (by using HTML5 and JavaScript).

While these alternatives cover most of the use cases of NPAPI, some are far from being viable for production use and others lack cross-platform compatibility. All in all, these technologie are a step in the right direction for developers that want to migrate from NPAPI. So it seems that there is a future for both plug-in based and plug-in free internet applications, depending on the technology that you want to rely upon.

What's your opinion about these technologies and how do you think they will influence developers and users?


Tags: Browser  Future  Programming 


Comments

No comments yet.

Your Comment:







Blog Home   SBP Home
RSS Feed       Contact








 Blog Archives  |  Terms of Use  |  Privacy Policy
© 2017 SBP Romania. All rights reserved.