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

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.

Related

Use Chrome Dev Tools as a library?

Is Chrome Dev Tools available only through Chrome extensions? Or is there a way we can use it, for instance, as a library from a JS standalone file?
Update
Chrome DevTools Frontend is now an NPM package that you can take advantage of. It is based from the new DevTools sub-repo in Blink. So you can easily pull in the DevTools assets and keep then up-dated without much work.
Original post
It depends on what you want exactly. You can dig in and rip out bits of the frontend to use. Like Betwixt by Konrad pulls the network panel design out and plugs it up to an OS interceptor. So you can use the network panel you know and love to debug any app on your desktop.
Now, can you easily do this kind of stuff. Even keeping it auto-updated? No, not really. It is fairly complicated and you need to be able to handle ripping the stuff out yourself. That being said, if you want a challenge then the code is open to everyone.
I'd say that the first sentence on the About website is pretty clear:
... built into Google Chrome.
So officially, by Google, it's only for Chrome. It's part of Chrome, not a standalone library. Issues linked to DevTools are part of Chromium, where people can contribute.

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 tool can be used to create plugin/addon for bookmark requirement

I've to create plugin or add-on for my official community site.
Requirement
There should be a button at browser, which should extend a form, which can add the current url as a bookmark with interaction from user with some more inputs, in turn that should be recorded into excel sheet in local drive. I've VBA code to extract data from the community url to excel sheet. Now, I've to create browser control to enable user direct url to fetch the data.
My control should be activated (i.e. toolbar button) based on url, so what should i create, a plugin or add-on ? i want my control not to affect browser performance or user experience.
Based on reply for 2, what tool should i use to create plugin/add-on which should be compatible across browsers ?
I've gone thro' Fire-breath demo, code capability with Visual studio, which was nice, but still missing some knowledge about visual studio, what to package of visual studio install and what language to use, it would be better if it is Visual basic ?
At last, is it possible to place control (i.e. button) inside the webpage to activate my code, if so, which one is capable of doing it, add-on or plugin ? workflow in nutshell to achieve that...
Thanks a lot
First, a few things to understand:
A browser plugin is something that is instantiated in one of two ways:
Injected into the DOM in an object or embed tag
Instantiated by the browser to open a page with a specific mimetype
Browser plugins don't know anything about the browser, the URL bar, the bookmarks, the context menus, browser dialogs, browser chrome, browser events, etc. Browser plugins only know anything about the current page. Browser plugins cannot change browser settings
Browser plugins are DLLs; they can't easily be written in Visual Basic. While it might be possible, I've never seen one, and you'd have to learn a lot about NPAPI plugins before you could do that. You'd also probably have to write one for IE, one for IE, etc.
In other words, what you need is not a plugin. Firebreath is not going to help you much, if at all. Some extensions (also called add-ons) use a npapi plugin to provide functionality that they cannot do on their own. For more information see http://npapi.com/extensions
With that information, I recommend you think about it and create a new, more specific question for what you need to know next. I don't know extensions, I do plugins. Actually, once you break down what you need to do into some smaller questions you'll probably find others who have ask most of them and you can find the answers with simple searches. Your main problem is that you don't yet understand the technologies you need to use. Hopefully this has helped.

Which browser plugin technology to use for cross platform design?

I mean ActiveX is IE only and dead, and so java applets are dead.
Flash is still not present in mobile browsers, Mozilla is present only on 1 phone, so XPCOM is also not an option.
How do you write a plugin that need access to file system, and do some other things, like unzip files, upload, download, etc.
Forget about client side plugins. Most of that can be handled on the server side. Then for anything that really does need a client side implementation you can use Javascript.

Any general purpose NPAPI plugin to invoke external download tools?

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.