You get a bonus - 1 coin for daily activity. Now you have 1 coin

Alternative browser technologies

Lecture



  1. Java
  2. ActiveX / NPAPI, browser plugins and extensions
  3. Adobe Flash
  4. Dart
  5. Total

Modern JavaScript is used in many areas. If we talk about browsers, other technologies are used along with JavaScript on the pages.

The most famous are Flash, Java, ActiveX / NPAPI. Bundling with them can help achieve more interesting results in those places where browser-based JavaScript is not as good as we would like.

Java

Java is a general-purpose language, you can write a variety of programs on it. For Internet pages there is a special opportunity - writing applets .

An applet is a Java program that can be connected to HTML using the applet tag:

1 < applet code = "BTApplet.class" codebase = "/files/tutorial/intro/alt/" >
2    < param name = "nodes" value = "50,30,70,20,40,60,80,35,65,75,85,90" >
3    < param name = "root" value = "50" >
4 </ applet >

This tag loads the Java program from the BTApplet.class file and executes it with the param parameters.

Of course, to do this, the Java runtime must be installed and enabled on the computer. Statistics show that this is about 80% of computers.

If it is enabled for you, below you will see an applet in action:


The applet is executed in a separate part of the page, in a rectangular "container". All user actions inside it are processed by the applet. The container, however, may be hidden if the applet has nothing to show.

How can we, JavaScript developers, be interested in Java?

First of all, by the fact that the security restrictions of JavaScript cannot be overcome in principle ... A specially signed (it is simple) Java applet can do everything if a visitor trusts it.

That is, features that, due to security restrictions, do not support JavaScript, are realizable through a trusted Java applet.

When trying to do a potentially dangerous action, the user gets a question that looks like this:

  Alternative browser technologies

It is impossible to bypass this confirmation or change its appearance. That is, the consent of the visitor is really necessary.

The visitor will not trust an arbitrary applet, but if he trusts the site, he will allow it. For example, if the functionality is located in the admin part of the site, or it is a site for a bank, or it is a service for which a visitor pays you money ... Then the visitor already trusts and allows your applet to run.

  • Java can do everything on behalf of the visitor, just like an installed desktop program. For security reasons, potentially dangerous actions require a signed applet and user trust.

  • Java takes longer to load

  • The Java runtime must be installed on the visitor’s computer and enabled. Such visitors to the Internet - about 80%.

  • The Java applet is not integrated with the HTML page, but is executed separately. But it can call javascript functions.

A signed Java applet is an opportunity to do whatever you want on the visitor’s computer if he trusts you. You can put into it all the calls that need to bypass the security context, and for the page itself use JavaScript.

ActiveX / NPAPI, browser plugins and extensions

ActiveX for IE and NPAPI for other browsers allow you to write browser plugins, including in C. As in the situation with the Java applet, the visitor will install them if they trust you.

These plug-ins can both display content in a special format (a plug-in for playing music, for displaying PDF), or interact with a page.

ActiveX is also very easy to install. Personally, I am not a fan of Microsoft, but I have seen excellent applications written in ActiveX and I can understand why people use it and become attached to IE.

Adobe Flash

Adobe Flash is a cross-browser platform for multimedia applications, animations, audio and video.

A flash movie is a compiled program written in ActionScript. It can be connected to an HTML page and run in a rectangular container.

First of all, Flash is useful in that it allows cross-browser work with a microphone, camera, clipboard, and also supports advanced capabilities for working with network connections.

  • Sockets, UDP for P2P, and other advanced networking capabilities

  • Support multimedia: images, audio, video. Work with a webcam and microphone.

  • Flash must be installed and enabled. And on some devices it is not supported at all.

  • Flash is not integrated with the HTML page, but is executed separately.

  • There are security restrictions, but they are slightly different than in JavaScript.

JavaScript and ActionScript can call each other's functions , which is why sites usually use JavaScript, and where it cannot cope, you can think about Flash.

Dart

The Dart language is proposed by Google as a replacement for JavaScript, which, according to Dart creators, has fatal flaws.

Now this language, although available, is under development and testing. Many of the possibilities are still pending, there are a number of problems. Other leading Internet companies have declared their disinterest in Dart. But in the future it can compete with JS, if it is brought to mind.

Total

JavaScript is unique due to its full integration with HTML / CSS. It works for almost all visitors.

..But a good JavaScript programmer should not forget about other technologies. After all, our goal is to create good applications, and here Flash, Java, ActiveX / NPAPI have their own unique features that can be used with JavaScript.

It’s not worth spending time on Dart now, but it may make sense to look at it in a year or two.

created: 2014-10-07
updated: 2021-03-13
132495



Rating 9 of 10. count vote: 2
Are you satisfied?:



Comments


To leave a comment
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Scripting client side JavaScript, jqvery, BackBone

Terms: Scripting client side JavaScript, jqvery, BackBone