Any general purpose NPAPI plugin to invoke external download tools? - plugins

I am looking for a general purpose NPAPI plugin that can used to invoke GetRight/FlashGet/OrbitDownloader/InternetDownloadManager/etc.
Has anyone written that already? It's like FlashGot for NPAPI browsers.

NPAPI plugins are for embedding alternative content into a page, not for generally extending the browser with new functionality.
What you are looking for are extension or addons (sadly and confusingly also sometimes called plugins) and those are mostly browser-specific - search first before writing your own.

Related

a comparison in cross browser plugin's frameworks

I have found that there are plenty of frameworks for browser plugins.
my first question:
which one of the following frameworks specified for plugins and which one is not specified for plugins:
FireBreath, OpenForge, Kango, BabelExt, Nixysa project, JUCE project, QtBrowserPlugin project .
my second question:
Is there another popular plugin's framework other than those mentioned?
my third question:
What is the main differences of these popular plugin's frameworks?
Indeed is there any comparison of these frameworks, the comparison could be in each of following terms:
usability (for a page as a NPAPI plug-in or for a browser as an
add-on extension),
simplicity (in developing),
speed (on execution),
extensibility (of developed add-on),
availability (in Windows 86x and 64x, Unix, Linux, mac and other
platforms and also mobile platforms specifically android, ios, ...),
flexibility (for new technologies),
reliability (in terms of security),
accessibility (open source or not),
portability (in Fire-fox, chrome, IE, Safari, Opera, ...),
applicability (in drawing, communicating, calling from external
server, threading, network accessing, etcetera),
stability (in changing the policies, for example in deprecating
NPAPI)
Also I have read Cross-Browser Extensions API? which I think it is about extension's framework (not plugin's framework)
I'll be honest -- this seems like something you should be able to answer with some google searching. I appreciate that you're at least trying to apply suggestions on how to better ask questions, though, so I'll respond on the few that I know something about.
FireBreath is a C++ framework for creating browser plugins, not extensions. It works as an NPAPI plugin for browsers supporting NPAPI plugins (previously this was all but IE, but Chrome dropped support for them this year and Firefox plans to at the end of 2016) or as an ActiveX control, giving it equivalent functionality to a browser plugin in Internet Explorer. FireBreath 2, which is working but poorly documented so far, changes the APIs from being synchronous between the browser and plugin to being asynchronous and adds an emulation layer to let them work with Google Chrome using Native Messaging. It's the most complete and up to date of the plugin frameworks, as far as I am aware. I am its primary author, so feel free to get your own confirmation of that.
Nixysa is a tool that takes definition files and outputs code for a NPAPI plugin. I haven't used it, so I can't tell you exactly what it's capabilities are. It hasn't been updated since 2012, when PPAPI support was added; this is unlikely to be useful, though, since PPAPI has changed significantly since then, and also since the only PPAPI plugins that can run without special command-line flags to chrome are ones specially blessed by the Chrome team.
JUCE is a GPL library with a commercial licence available which has some support for creating browser plugins. I have no idea as to how powerful it is these days; it seemed well written when I last looked at it, and takes a much more minimalistic approach than FireBreath does; FireBreath gives you a framework and tries to make everything Just Work, whereas JUCE seems (I could be wrong) to be more of a "provide the building blocks, but don't try to make everything look the same" type of thing.
QtBrowserPlugin is a defunct unmaintained project which at one time allowed creating browser plugins (probably just npapi, but not certain) with QT. Indications are that it probably doesn't work anymore.
I have no idea what the other projects are. If I were you, I'd try doing some research. Google is your friend.

What is the technical difference between a browser extension and a plugin?

From a user's perspective, an extension seems to be something that you go to the Chrome Web Store to get to extend the browser's functionality, whereas a plugin is something that you have to go to an external third party's website to get to extend the browser's functionality.
From a technical or implementation perspective, what is the difference between the two? I saw a similar question here (Is phplivex a extension or plugin?) but didn't get the answer I was looking for.
I am after the difference in the way an extension or plugin is developed and deployed (if any), and if there is any overlap between the two.
The words "extension" and "plugin" have lots of different (but related) meanings accross software products. These words are used interchangeably by many users (and developers). In browser extensions, they have a precise meaning, which is also visible through the UI. E.g. extensions (and apps) can be managed at chrome://extensions/, while plugins can be managed at chrome://plugins/ in Google Chrome.
In Chrome, Firefox, Opera and Safari, browser extensions refer to pieces of software that augment the browser using the browser extension APIs (see extension docs for Chrome, Firefox, Opera, Safari). Most of the modern browsers require extensions to be written using JavaScript. Extensions are usually platform-independent and run within a limited environment (Firefox is a notable exception to the latter). Extensions are usually deployed as a bunch of JavaScript files, other assets (HTML, CSS, media, ...) and configuration bundled in a browser-specific archive. Browser usually offer a seamless way to install the extension directly in the browser.
Plugins refer to NPAPI plugins, which are pre-compiled binaries that enhance the functionality of browsers via NPAPI. These plugins are invoked by inserting an <embed> or <object> tag in the document with a specific MIME-type. NPAPI plugins are OS-specific (though the source code can be platform independent) but not specific to a single browser. The capabilities of NPAPI are not constrained by the browser, so a bug in a browser plugin often have huge security implications (think of Java, Adobe Flash Player, Adobe PDF Reader). This is one of the reasons why NPAPI support is in the process of being completely dropped from Chrome. NPAPI plugins are usually installed outside the browser, e.g. via MSI installers on Windows.
As said in the introduction, "plugins" and "extensions" are used interchangeably. If you hear anyone talking about "(browser) plugins", odds are that they actually mean browser extensions.

How to insert platform-specific code in eclipse?

I'm working on an eclipse-based application, composed by several plug-ins. One of these plugins performs a computationally-intensive task, hence I want to provide a "native" implementation for some platforms I support. What is the best way to do it?
I was thinking about a base plugin (which provides the default implementation) extended with some fragments (to provide platform-specific implementations). However, how can the base plugin be aware of the available fragments?
You could write a class in your main plugin similar to LocalFileNatives from org.eclipse.core.filesystem. It loads a library that implements its set of native methods. It then provides a facade to the system that uses the native implementation if it is available but has some default functionality for platforms where there are no native implementations.
Then each platform fragment simply provides the appropriate native DLL or .so
There are other options for having the fragment supply a service, that can be retrieved by the host plugin.
Eclipse plugin's are written in Java. So what you need to do is retrieve OS info.
If you scroll to the bottom of this page, you'll see a code that does this.

Plugins + Extensions on Safari 5.0.1

My question is very simple: Is it possible to pack plugins into extensions for Safari? For instance, the exact NPAPI plugins which work on Google Chrome also work on Safari. However in Chrome I'm shipping the plugins as a part of an extension (a CRX package). This is needed because HTML and JavaScript is injected into a specific web page, and this code uses the plugins. I do not see an option in Extension Builder to specify plugin files and I haven't come across any proper documentation saying that plugins cannot be packed into extensions.
Any help will be greatly appreciated!
The first comment:
I don't think that is supported. A workaround could be a custom installer that installs both the plugin and the extension. – Georg Fritzsche
This is the only possible way to do it! FYI: Apple guys are against the idea of extensions accessing native code (ie, plugins). An obvious security loop-hole, but a necessity here! :)

How can I make my application support plugins?

I'm work in an aplication that need be capable of support plugins, but i dont know how this work.
See Design Pattern for implementing plugins in your application?
The answers tend to get very platform specific. It also depends on how much control of your core app data and logic the plugin must have.
The C++ QT4 book has a good description of adding a file-type plugin to it's architecture, there area also a bunch of modeling apps (openscenegraph, blender, povray ) that have good documentation for their plugin architectures.
You need to design your application's API in such a way that plugins can be created, and you need to add the necessary plugin management interfaces and supporting code to invoke the plugins. There is no catch-all way of managing plugins.
Take a look at the open source application called Rawr (c#). Each addin is a seperate .dll and the main app uses reflection to access the code. Very nicely done.
www.codeplex.com/Rawr