back to article Oracle reveals Java Applet API deprecation plan

Oracle has revealed its interim plan to help Java devs deal with browser-makers' imminent banishment of plug-ins. Years of bugs in Java, Flash and other plugins have led browser-makers to give up on plugins. Apple recently decided that its Safari browser will just pretend Java, Flash and Silverlight aren't installed. Google …

  1. bazza Silver badge

    The way things are going we're going to be left with nothing but Javascript etc. to do stuff in a browser. Good thing from a security point of view, probably.

    But for goodness sake, Javascript is just, well, horrible! Surely we as a species can come up with something better than that?!?!?!

    Our descendants may look back in wonderment at how rambling and strange our code looks. They may even have a public holiday to commemorate the day the last page of Javascript was deleted.

    1. Richard 81

      I get that JavaScript is supposed to be modular, but it's missing so many basic features in its core API that you need third party libraries (or lots of your own code) to do anything. Remember that left-pad debacle last year?

      1. AMBxx Silver badge
        Boffin

        Maybe

        Everything seems to be moving in the right direction. Flash is nearly dead. Java plugin too.

        Next we need to come up with a decent browser language to replace JavaScript. It was never intended to be used in such complex ways.

        Just please don't bring back VBScript in the browser!

    2. Alan Bourke

      True enough.

      Web development is a mess. Hey ho.

      1. Anonymous Coward
        Anonymous Coward

        Re: True enough.

        Just pick an existing language that was designed with security in mind and support it in browsers. The last thing we need is yet ANOTHER language being created for this purpose.

        1. Ken Hagan Gold badge

          Re: True enough.

          "Just pick an existing language that was designed with security in mind and support it in browsers."

          Hmm. The idea sounds familiar. I'm sure I've heard of such a thing mentioned in the past. Quite recently, in fact. I just can't quite place my finger on it.

          More seriously, today's story demonstrates that the language needs a third attribute, beyond secure design and widespread support. It needs to be one that anyone can implement without getting their arses sued off.

          1. a_yank_lurker

            Re: True enough.

            " It needs to be one that anyone can implement without getting their arses sued off." There are several open scripting languages such as Python or Ruby that are better designed and implemented than JavaScript. However, another to avoid is PHP.

          2. Anonymous Coward
            Anonymous Coward

            Re: True enough.

            How does today's story demonstrate anything about the need for a language that won't get you sued? Oracle never sued anyone for using Java in browsers. Their lawsuit with Google over Android is different, and doesn't concern Java but something almost-but-not-quite-Java that Google created.

            Obviously to get widespread support the language must be open, otherwise Firefox can't include it and Chrome probably won't include it.

            1. Anonymous Coward
              Anonymous Coward

              Re: True enough.

              Something we are used to along the lines of .Net or Java (syntax wise) would be nice enough in a browser. Ho wait that's what TypeScript is for!

              Now the problem is that little script kiddies fresh out of school finds it kool to script everything client side, because hey why not?

              Also we'd have to move to trash server side JavaScript, and hang publicly whoever came up with the concept and implementation.

  2. A Non e-mouse Silver badge

    API Deprecation & Removal

    Just because an API is marked deprecated, it does not follow that the next release will remove it.

    Thread.stop() was marked as deprecated in something like Java 1.1, yet still exists in Java 8

  3. hammarbtyp

    I felt a great disturbance in the Force

    As if hundreds of 1990's develoopers suddenly cried out in terror and were suddenly silenced

  4. Anonymous Coward
    Anonymous Coward

    There's no real reason to remove the API it if the browsers are going to block the plugins.

    I imagine a lot of developers who have significant applets are planning on getting users to run them on their desktops directly.

  5. Anonymous Coward
    Anonymous Coward

    Maybe time for something like Google Web Toolkit to take off. Writing web applications in a statically typed language with excellent tooling and few of JavaScript's shocking brainfarts (the languages's creator Brendan Eich admits it was a proof of concept hack than Netscape rush released). Use JavaScript simply as a kind of architecture independent intermediate language like Pascal P-Code or Java bytecode, with the toolkit's compiler dealing with the quirks in different browser implementations.

    <flamebait>

    It would mean slack arsed JavaScript developers having to learn a properly designed programming language though.

    </flamebait>

    1. Brewster's Angle Grinder Silver badge

      They seem to have given up on using it as p-code (asm.js) and are working on a genuine p-code (web assembly) that will be able to call into and out of javascript.

    2. patrickstar

      There are lots of design decisions in JavaScript that makes it a very poor candidate to use as a p-code-like target for other languages. Just getting any sort of performance in a JS runtime requires LOTS of voodoo.

      This should be fairly obvious - it was after all intended to be used for basic interactive scripting. The requirements are somewhat different.

      AVM2, which at least keeps type information around, would be a much better candidate, and is a fully open standard that you can implement without having anything to do with Adobe or the rest of Flash. But that's of course not as cool or fun as reinventing the wheel. (And admittedly AVM2 has its problems too, like the egregiously fat opcodes... eg string concatenation like "a" + "b" literally compiles to an addition op).

      1. Brewster's Angle Grinder Silver badge

        @patrickstar

        LOTS is probably relative. If you stated life coding assembly it's not so hard, but you do have to understand what the compiler and the browser are doing behind the scenes.

        We do a lot of maths (e.g. Chebyshev polynomials with hundreds of terms) and even four years ago, raw javascript was within a factor of two of C++. That was why we made the decision to switch when we moved to mobile.

        We also have a javascript raytracer and performance there improved dramatically when I switched from object access to closures and when I understood the compiler could spot integers and adjusted my code to work with them wherever possible. So the typing is there under the hood (Safari will show you the types of variables). However I miss it every time a bug formal typing would have caught gets through,

        But you have to remember to declare classes in the same order or they become different types, that calling functions with different types reinstantiates it (i.e. treat every function as a template) and that functions that catch aren't compiled on V8. I've just read the post mortem on strong mode and it looks like the new features will be slow for some time to come, too (avoid @@species).

        And in everyday javascript, the DOM remains a bottleneck in general and triggering layouts in particular. The garbage collector is getting much better but still can be an issue at times. And we still have to do too much on the main thread.

        I would imagine it's much easier for cross-compiled code to stick within the rules.

        1. patrickstar

          Re: @patrickstar

          I was referring to what it takes to write a runtime, not to write code that runs in it.

          And first of all, just because you can write fast number crunching (relatively easy to optimize the runtime for) doesn't mean a lot of other stuff isn't painfully slow.

          Second, imagine if equal effort went into designing runtimes for more suitable languages. You'd achieve a lot more and at the very least have much fewer bugs (many of them potential security issues).

          Third of all, even discounting performance etc. and just looking at pain of development, it's not even a particularly good language for anything more complex (as you seem to partly agree).

    3. a_yank_lurker

      @kmiettinen - "It would mean slack arsed JavaScript developers having to learn a properly designed programming language though." Are any other kind? The problem I see with most "become a web developer" is they only really teach/use JavaScript (JackassScript), PHP (another steaming, smelling pile), HTML, and CSS but do not teach/use properly developed programming language.

      May be there should be a vote for the worst programming language that are/were widely used.

  6. Kevin McMurtrie Silver badge
    Mushroom

    Just kill Applets already

    I'm not sure why you'd want to compile an Applet with Java 9 when there will be nothing to run Java 9 Applets. It wasn't just security concerns that ended Applets. Java's GUI, multimedia, and certificate APIs are pretty miserable on their own. Trying to get them working properly through a browser plug-in is futile. For all of JavaScript's flaws, it's still a million times better than Java Applets.

  7. aberglas

    We need browser based PHP with Pointer Arithmetic

    PHP's elegance is no doubt the reason that it is the number one language for writing web applications today. (Way more sites than Ruby, Java, .Net.)

    The only real problem with PHP is that it does not allow pointer arithmetic. Having to do p[q++] is just obviously so inefficient compared to p++.

    That is a language that would change the world.

    1. Tchou
      WTF?

      Re: We need browser based PHP with Pointer Arithmetic

      "PHP's elegance"

      Ho my god !

      Ho my f*c*i*g god !!

      Ho holly f*c*y mother Mary !!!

      And all that sort of things..

    2. Anonymous Coward
      Anonymous Coward

      Re: We need browser based PHP with Pointer Arithmetic

      "number one language"

      Today's number one languages are number ones because of the utter lack of understanding of new grads, plus lobbying in universities by mostly clueless professors.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like