Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #9209 > unrolled thread
| Started by | Novice <novice@example..com> |
|---|---|
| First post | 2011-10-26 17:54 +0000 |
| Last post | 2011-11-09 20:21 -0500 |
| Articles | 20 — 8 participants |
Back to article view | Back to comp.lang.java.programmer
Applet Question Novice <novice@example..com> - 2011-10-26 17:54 +0000
Re: Applet Question markspace <-@.> - 2011-10-26 11:37 -0700
Re: Applet Question Novice <novice@example..com> - 2011-10-26 19:26 +0000
Re: Applet Question "John B. Matthews" <nospam@nospam.invalid> - 2011-10-26 22:38 -0400
Re: Applet Question Roedy Green <see_website@mindprod.com.invalid> - 2011-10-26 16:53 -0700
Re: Applet Question Novice <novice@example..com> - 2011-10-27 00:55 +0000
Re: Applet Question "Nasser M. Abbasi" <nma@12000.org> - 2011-10-26 21:51 -0500
Re: Applet Question Roedy Green <see_website@mindprod.com.invalid> - 2011-10-26 21:43 -0700
Re: Applet Question Roedy Green <see_website@mindprod.com.invalid> - 2011-10-26 16:56 -0700
Re: Applet Question Novice <novice@example..com> - 2011-10-27 01:04 +0000
Re: Applet Question Roedy Green <see_website@mindprod.com.invalid> - 2011-10-26 17:57 -0700
Re: Applet Question Arne Vajhøj <arne@vajhoej.dk> - 2011-11-06 15:20 -0500
Re: Applet Question "Nasser M. Abbasi" <nma@12000.org> - 2011-11-06 14:34 -0600
Re: Applet Question Arne Vajhøj <arne@vajhoej.dk> - 2011-11-06 15:41 -0500
Re: Applet Question Paul Cager <paul.cager@googlemail.com> - 2011-11-07 08:21 -0800
Re: Applet Question Roedy Green <see_website@mindprod.com.invalid> - 2011-11-07 02:50 -0800
Re: Applet Question Arne Vajhøj <arne@vajhoej.dk> - 2011-11-07 17:11 -0500
Re: Applet Question Andrew Thompson <andrewthommo@gmail.com> - 2011-11-08 03:25 -0800
Re: Applet Question "Nasser M. Abbasi" <nma@12000.org> - 2011-11-09 15:23 -0600
Re: Applet Question Arne Vajhøj <arne@vajhoej.dk> - 2011-11-09 20:21 -0500
| From | Novice <novice@example..com> |
|---|---|
| Date | 2011-10-26 17:54 +0000 |
| Subject | Applet Question |
| Message-ID | <Xns9F8A8E4E54BE8jpnasty@94.75.214.39> |
I'm trying to get a simple applet I wrote working in Firefox 7.0.1 but it's not loading. I was advised to look at the Java Console to see what's going wrong - such as which class is not loading - but I can't find a Java Console in Firefox. When I googled, I found a page saying that Firefox 6 and above don't support the Java Console, although they support Java itself. I'm guessing that I've messed up my <object> tag but perhaps I am trying to load from the wrong folder from the server, something that the Java Console would help with. How do I debug this? I also tried Internet Explorer 7 but don't see a Java Console there either. Ditto for Opera 11.50. Have applets become obsolete? If not, how do I debug them if they work fine in my development environment? -- Novice
[toc] | [next] | [standalone]
| From | markspace <-@.> |
|---|---|
| Date | 2011-10-26 11:37 -0700 |
| Message-ID | <j89k25$nkc$1@dont-email.me> |
| In reply to | #9209 |
On 10/26/2011 10:54 AM, Novice wrote: > I'm trying to get a simple applet I wrote working in Firefox 7.0.1 but it's > not loading. I was advised to look at the Java Console to see what's going > wrong - such as which class is not loading - but I can't find a Java > Console in Firefox. When I googled, I found a page saying that Firefox 6 > and above don't support the Java Console, although they support Java > itself. The Java console is supported now by the Java plug-in itself. Go to your Windows Control Panel -> Java and enable the console in the Advanced tab. You may have to restart FireFox to get this to take effect. > > I'm guessing that I've messed up my<object> tag but perhaps I am trying to > load from the wrong folder from the server, something that the Java Console > would help with. How do I debug this? Other than "try it and see if it works," I haven't found anything. There might be some clues on the console when it comes up, but I found most messages there to be of limited value. > Have applets become obsolete? If not, how do I debug them if they work fine > in my development environment? Not obsolete per se, but I haven't found a lot of support for debugging deployment problems. Besides copious use of the Mark I eyeball on your <object> tag and all its parameters, I suggest you make copious use of logging in the app itself. It's been a while since I've worked on applets, but I also recall that the browser seemed to aggressively cache everything I deployed for testing. This meant that any changes I made wouldn't be picked up by the browser. Make sure you are using shift-reload to force a full page reload. However, this won't help for elements that aren't directly on the page, like the applet itself, and any descriptors deployed with it -- <jnlp> for example. Dumping cache directly within FireFox didn't seem to un-cache everything either. I eventually just moved all my development to a special directory, and set every type of "No Cache" directive I could find (via my Apache webserver) on that directory and its subtree to stop my browser from trying to cache my test applets. This is the opposite of what you want for a normal deployment, but seemed to work for development. You may also have to move everything to a new directory/url to get the browser to pick up a new set of No Cache directives once you add them.
[toc] | [prev] | [next] | [standalone]
| From | Novice <novice@example..com> |
|---|---|
| Date | 2011-10-26 19:26 +0000 |
| Message-ID | <Xns9F8A9DC8F5515jpnasty@94.75.214.39> |
| In reply to | #9210 |
markspace <-@.> wrote in news:j89k25$nkc$1@dont-email.me: > On 10/26/2011 10:54 AM, Novice wrote: >> I'm trying to get a simple applet I wrote working in Firefox 7.0.1 >> but it's not loading. I was advised to look at the Java Console to >> see what's going wrong - such as which class is not loading - but I >> can't find a Java Console in Firefox. When I googled, I found a page >> saying that Firefox 6 and above don't support the Java Console, >> although they support Java itself. > > > The Java console is supported now by the Java plug-in itself. Go to > your Windows Control Panel -> Java and enable the console in the > Advanced tab. You may have to restart FireFox to get this to take > effect. > Bingo! That is exactly what I needed to know to get the Java Console working. I didn't realize that the Console was separate from the browser now. Thank you VERY much for filling me in! > >> >> I'm guessing that I've messed up my<object> tag but perhaps I am >> trying to load from the wrong folder from the server, something that >> the Java Console would help with. How do I debug this? > > > Other than "try it and see if it works," I haven't found anything. > There might be some clues on the console when it comes up, but I found > most messages there to be of limited value. > The Console was very helpful in helping me pinpoint the problem. I wasn't loading one of the supporting classes that I added recently because I'd forgotten to add it to the jar. > >> Have applets become obsolete? If not, how do I debug them if they >> work fine in my development environment? > > > Not obsolete per se, but I haven't found a lot of support for > debugging deployment problems. Besides copious use of the Mark I > eyeball on your <object> tag and all its parameters, I suggest you > make copious use of logging in the app itself. > > It's been a while since I've worked on applets, but I also recall that > the browser seemed to aggressively cache everything I deployed for > testing. This meant that any changes I made wouldn't be picked up by > the browser. > > Make sure you are using shift-reload to force a full page reload. > However, this won't help for elements that aren't directly on the > page, like the applet itself, and any descriptors deployed with it -- > <jnlp> for example. Dumping cache directly within FireFox didn't seem > to un-cache everything either. > > I eventually just moved all my development to a special directory, and > set every type of "No Cache" directive I could find (via my Apache > webserver) on that directory and its subtree to stop my browser from > trying to cache my test applets. This is the opposite of what you > want for a normal deployment, but seemed to work for development. You > may also have to move everything to a new directory/url to get the > browser to pick up a new set of No Cache directives once you add them. > That all sounds like great advice which I shall try to take to heart. Thanks again! -- Novice
[toc] | [prev] | [next] | [standalone]
| From | "John B. Matthews" <nospam@nospam.invalid> |
|---|---|
| Date | 2011-10-26 22:38 -0400 |
| Message-ID | <nospam-CE2E50.22384126102011@news.aioe.org> |
| In reply to | #9210 |
In article <j89k25$nkc$1@dont-email.me>, markspace <-@.> wrote: > I eventually just moved all my development to a special directory, and > set every type of "No Cache" directive I could find (via my Apache > webserver) on that directory and its subtree to stop my browser from > trying to cache my test applets. This is the opposite of what you want > for a normal deployment, but seemed to work for development. You may > also have to move everything to a new directory/url to get the browser > to pick up a new set of No Cache directives once you add them. This reminds me of a technique due to Andrew Thompson: Add the applet tag as a comment at the beginning of the source file where appletviewer can find it: //<applet code="Hello.class" width=400 height=200></applet> Then do something like this: javac Hello.java; if [ $? -eq 0 ]; then appletviewer Hello.java; fi <http://download.oracle.com/javase/7/docs/technotes/tools/windows/appletviewer.html> -- John B. Matthews trashgod at gmail dot com <http://sites.google.com/site/drjohnbmatthews>
[toc] | [prev] | [next] | [standalone]
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Date | 2011-10-26 16:53 -0700 |
| Message-ID | <877ha7he7l5td9bfjb3l65gsup5sbmgqpu@4ax.com> |
| In reply to | #9209 |
On Wed, 26 Oct 2011 17:54:51 +0000 (UTC), Novice <novice@example..com> wrote, quoted or indirectly quoted someone who said : >I'm trying to get a simple applet I wrote working in Firefox 7.0.1 but it's >not loading. I was advised to look at the Java Console to see what's going >wrong - such as which class is not loading - but I can't find a Java >Console in Firefox. When I googled, I found a page saying that Firefox 6 >and above don't support the Java Console, although they support Java >itself. Let us split your problem in two. Let's first run somebody else's Java Applet that is known to work, e.g. http://mindprod.com/applet/wassup.html There is a ton of information on that page on what to do if the Applet won't run, including switching browsers. To engage the console, see http://mindprod.com/jgloss/console.html -- Roedy Green Canadian Mind Products http://mindprod.com It should not be considered an error when the user starts something already started or stops something already stopped. This applies to browsers, services, editors... It is inexcusable to punish the user by requiring some elaborate sequence to atone, e.g. open the task editor, find and kill some processes.
[toc] | [prev] | [next] | [standalone]
| From | Novice <novice@example..com> |
|---|---|
| Date | 2011-10-27 00:55 +0000 |
| Message-ID | <Xns9F8AD59E12149jpnasty@94.75.214.39> |
| In reply to | #9221 |
Roedy Green <see_website@mindprod.com.invalid> wrote in news:877ha7he7l5td9bfjb3l65gsup5sbmgqpu@4ax.com: > On Wed, 26 Oct 2011 17:54:51 +0000 (UTC), Novice <novice@example..com> > wrote, quoted or indirectly quoted someone who said : > >>I'm trying to get a simple applet I wrote working in Firefox 7.0.1 but >>it's not loading. I was advised to look at the Java Console to see >>what's going wrong - such as which class is not loading - but I can't >>find a Java Console in Firefox. When I googled, I found a page saying >>that Firefox 6 and above don't support the Java Console, although they >>support Java itself. > > Let us split your problem in two. Let's first run somebody else's > Java Applet that is known to work, e.g. > > http://mindprod.com/applet/wassup.html > > There is a ton of information on that page on what to do if the Applet > won't run, including switching browsers. To engage the console, see > http://mindprod.com/jgloss/console.html Thank you but now that I've got the Java Console to come up, I can see that my <object> tag is working fine. I'm simply missing some classes in my jar. Thank you for documenting the steps involved in getting the Java Console to work in various browsers. As long as I can remember that you have that, I'll be set as long as use those browsers. -- Novice
[toc] | [prev] | [next] | [standalone]
| From | "Nasser M. Abbasi" <nma@12000.org> |
|---|---|
| Date | 2011-10-26 21:51 -0500 |
| Message-ID | <j8ah05$m5n$1@speranza.aioe.org> |
| In reply to | #9223 |
On 10/26/2011 7:55 PM, Novice wrote: > Thank you but now that I've got the Java Console to come up, I can see that > my<object> tag is working fine. I'm simply missing some classes in my jar. > That seems to be the most common problem with running applets. I find that it is a hit and miss if an applet will run or not. Most errors I get when trying an applet on the net are missing class type errors. This seems strange to me, since I would think there should be by now a way to make sure all classes that are needed to run the applet are packaged before deploying the applet. --Nasser
[toc] | [prev] | [next] | [standalone]
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Date | 2011-10-26 21:43 -0700 |
| Message-ID | <b5oha7l0pun3qn8v8rqodc9tr8ovrmhr1j@4ax.com> |
| In reply to | #9229 |
On Wed, 26 Oct 2011 21:51:49 -0500, "Nasser M. Abbasi" <nma@12000.org> wrote, quoted or indirectly quoted someone who said : > >This seems strange to me, since I would think there should be by >now a way to make sure all classes that are needed to run the >applet are packaged before deploying the applet. Genjar handle that for me, even when I include hundreds of classes. It does it is less than a second. I used to do it manually, and run Jet to tell me if I had left anything out, round and round. Ant has another big advantage - compiling multiple classes much faster than Javac. It loads javac into RAM once and reuses it. Ant is rather tedious to get going, but once it works, everything zooms. I don't write ANT directly. I have a Java program that stomps out ant scripts given just a few basic facts about the project. It is highly tuned to the way I do things, What you might do is look at some of myscripts, prune them, then use Quoter to turn them into Java Strings and compose your own stomper. -- Roedy Green Canadian Mind Products http://mindprod.com It should not be considered an error when the user starts something already started or stops something already stopped. This applies to browsers, services, editors... It is inexcusable to punish the user by requiring some elaborate sequence to atone, e.g. open the task editor, find and kill some processes.
[toc] | [prev] | [next] | [standalone]
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Date | 2011-10-26 16:56 -0700 |
| Message-ID | <cc7ha7p22o5kqme4sh3ukcjkddbjorhrj3@4ax.com> |
| In reply to | #9209 |
On Wed, 26 Oct 2011 17:54:51 +0000 (UTC), Novice <novice@example..com> wrote, quoted or indirectly quoted someone who said : > >Have applets become obsolete? If not, how do I debug them if they work fine >in my development environment? You don't debug them in a browser. You debug them as applications, and once they work, run them as Applets in various browsers to test them. see http://mindprod.com/jgloss/hybrid.html See http://mindprod.com/jgloss/applet.html http://mindprod.com/jgloss/japplet.html for additional hints. Forget that <object nonsense. It is not needed. It just creates a massive opportunity for error. The old <applet tags work fine in any browser that supports Java. It is sadistic to impose that sort of crap on newbies. -- Roedy Green Canadian Mind Products http://mindprod.com It should not be considered an error when the user starts something already started or stops something already stopped. This applies to browsers, services, editors... It is inexcusable to punish the user by requiring some elaborate sequence to atone, e.g. open the task editor, find and kill some processes.
[toc] | [prev] | [next] | [standalone]
| From | Novice <novice@example..com> |
|---|---|
| Date | 2011-10-27 01:04 +0000 |
| Message-ID | <Xns9F8AD737540FEjpnasty@94.75.214.39> |
| In reply to | #9222 |
Roedy Green <see_website@mindprod.com.invalid> wrote in news:cc7ha7p22o5kqme4sh3ukcjkddbjorhrj3@4ax.com: > On Wed, 26 Oct 2011 17:54:51 +0000 (UTC), Novice <novice@example..com> > wrote, quoted or indirectly quoted someone who said : > >> >>Have applets become obsolete? If not, how do I debug them if they work >>fine in my development environment? > > You don't debug them in a browser. You debug them as applications, > and once they work, run them as Applets in various browsers to test > them. > see http://mindprod.com/jgloss/hybrid.html > > See http://mindprod.com/jgloss/applet.html > http://mindprod.com/jgloss/japplet.html > for additional hints. Thank you. I will take that into consideration for the next applet I develop. > Forget that <object nonsense. It is not needed. It just creates a > massive opportunity for error. The old <applet tags work fine in any > browser that supports Java. It is sadistic to impose that sort of crap > on newbies. It's good to know that the <applet> tag is still supported. I recently switched to using XHTML 1.0 and when I first noticed that the applet no longer worked - after not having tried it for some time - I thought it might be the <applet> tag that was the problem. Apparently, that tag is deprecated in XHTML 1.0 so I commented out the <applet> tag and tried to write an appropriate <object> tag. Luckily, <object> worked fine once I fixed a typo but I couldn't tell that it was working until I got the Java Console to work; that informed me that I was simply missing some classes in my jar. That led to my next question, which I see you've already answered.... -- Novice
[toc] | [prev] | [next] | [standalone]
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Date | 2011-10-26 17:57 -0700 |
| Message-ID | <33bha758u398v3jbna0d2agb9lnicic9jg@4ax.com> |
| In reply to | #9209 |
On Wed, 26 Oct 2011 17:54:51 +0000 (UTC), Novice <novice@example..com> wrote, quoted or indirectly quoted someone who said : >but I can't find a Java >Console in Firefox. You turn it on and off with the Java Control Panel. See Control Panel, programs, Java, advanced. -- Roedy Green Canadian Mind Products http://mindprod.com It should not be considered an error when the user starts something already started or stops something already stopped. This applies to browsers, services, editors... It is inexcusable to punish the user by requiring some elaborate sequence to atone, e.g. open the task editor, find and kill some processes.
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2011-11-06 15:20 -0500 |
| Message-ID | <4eb6ec06$0$284$14726298@news.sunsite.dk> |
| In reply to | #9209 |
On 10/26/2011 1:54 PM, Novice wrote: > Have applets become obsolete? They are still fully supported by Java. They are no longer widely used on WWW. AJAX JavaScript, Flash, SilverLight etc. has taken that market. They are still occasionally used for signed code with privileges on client PC. Arne
[toc] | [prev] | [next] | [standalone]
| From | "Nasser M. Abbasi" <nma@12000.org> |
|---|---|
| Date | 2011-11-06 14:34 -0600 |
| Message-ID | <j96r07$s2a$1@speranza.aioe.org> |
| In reply to | #9666 |
On 11/6/2011 2:20 PM, Arne Vajhøj wrote: > On 10/26/2011 1:54 PM, Novice wrote: >> Have applets become obsolete? > > They are still fully supported by Java. > > They are no longer widely used on WWW. > > AJAX JavaScript, Flash, SilverLight etc. has taken that > market. > > They are still occasionally used for signed code with > privileges on client PC. > > Arne Hello; I keep reading things like the above. But when I search the net to find any real simulations done using the above, I am not able to find anything close to the quality I find using Java applets. Take a look at this web page: http://www.falstad.com/mathphysics.html Amazing stuff. in JDK 1.1, and still runs very well, and very fast. And other web sites like the above exist. Anything close to the above using Javascript? All what I've seen so far with HTML5/Javascript are toy applications. btw, Mathematica now allows one to make an 'applet' that runs in a browser, using a plugin (free), just like a Java applet. No need to download anything. So, for simulation that needs to run on inside a browser, and in particular for scientific applications, I think that is the best choice now for me. But Mathematica is commercial product and closed source, and that can be an issue to some. Check the Mathematica demonstration web site for many Mathematica 'applets': http://demonstrations.wolfram.com/ --Nasser
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2011-11-06 15:41 -0500 |
| Message-ID | <4eb6f0df$0$295$14726298@news.sunsite.dk> |
| In reply to | #9668 |
On 11/6/2011 3:34 PM, Nasser M. Abbasi wrote: > On 11/6/2011 2:20 PM, Arne Vajhøj wrote: >> On 10/26/2011 1:54 PM, Novice wrote: >>> Have applets become obsolete? >> >> They are still fully supported by Java. >> >> They are no longer widely used on WWW. >> >> AJAX JavaScript, Flash, SilverLight etc. has taken that >> market. >> >> They are still occasionally used for signed code with >> privileges on client PC. > I keep reading things like the above. But when I search > the net to find any real simulations done using the above, > I am not able to find anything close to the quality I find > using Java applets. > > Take a look at this web page: > > http://www.falstad.com/mathphysics.html > > Amazing stuff. in JDK 1.1, and still runs very well, > and very fast. And other web sites like the above exist. > > Anything close to the above using Javascript? All what I've seen > so far with HTML5/Javascript are toy applications. > > btw, Mathematica now allows one to make an 'applet' that > runs in a browser, using a plugin (free), just like a Java > applet. No need to download anything. > > So, for simulation that needs to run on inside a browser, and in > particular for scientific applications, I think that is the best choice > now for me. But Mathematica is commercial product and closed source, > and that can be an issue to some. > > Check the Mathematica demonstration web site for many Mathematica > 'applets': > > http://demonstrations.wolfram.com/ You could do the same things in Flash or SL. And they can also do some rather amazing stuff in JS today. Example: http://haxpath.squarespace.com/imported-20100930232226/2011/10/28/broadwayjs-h264-in-javascript.html If they can decode video then i think they can show math stuff as well. Arne
[toc] | [prev] | [next] | [standalone]
| From | Paul Cager <paul.cager@googlemail.com> |
|---|---|
| Date | 2011-11-07 08:21 -0800 |
| Message-ID | <1e03dddd-c0f0-4dbb-9024-e03d96c080ec@ht6g2000vbb.googlegroups.com> |
| In reply to | #9670 |
On Nov 6, 8:41 pm, Arne Vajhøj <a...@vajhoej.dk> wrote: > And they can also do some rather amazing stuff in JS today. > > Example: > > http://haxpath.squarespace.com/imported-20100930232226/2011/10/28/bro... Another example (a favourite of mine, so apologies if I've mentioned it before): http://bellard.org/jslinux/index.html A PC emulator (like QEMU or Xen) written in Javascript.
[toc] | [prev] | [next] | [standalone]
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Date | 2011-11-07 02:50 -0800 |
| Message-ID | <tidfb7ppkg3pakfpth7qbtkqmlrlupe5kr@4ax.com> |
| In reply to | #9668 |
On Sun, 06 Nov 2011 14:34:18 -0600, "Nasser M. Abbasi" <nma@12000.org> wrote, quoted or indirectly quoted someone who said : >Anything close to the above using Javascript? I am baffled by the appeal of JavaScript. I find it being used on the web to write code that works with only one browser. I believe it has no sandbox, so it is beloved of websites that want to install Trojans. It is passed around in fluffy text form. It is not OO. Read up on how you write extensions to browsers, email programs, IDEs and the like. Instead of using some sane language like Java, they either concoct some ad hoc monstrosity, or use JavaScript. What are they thinking? Java has one major drawback. The run time takes a long time to load, so browsers procrastinate. This gives the impression that Java itself in painfully slow. Perhaps if it got lazily but most of the time pre-emptively loaded that problem would go away. Google uses JavaScript for its ads. The damn things often take minutes to load, while the fool browser refuses to get on with rendering the page. I have plans in the works to use macros to temporarily remove them while compose, and insert them at the last second before upload. However that does help my visitors any. I written to Google asking them to implement their ads in a way that will not hang browsers. They did not respond. -- Roedy Green Canadian Mind Products http://mindprod.com Capitalism has spurred the competition that makes CPUs faster and faster each year, but the focus on money makes software manufacturers do some peculiar things like deliberately leaving bugs and deficiencies in the software so they can soak the customers for upgrades later. Whether software is easy to use, or never loses data, when the company has a near monopoly, is almost irrelevant to profits, and therefore ignored. The manufacturer focuses on cheap gimicks like dancing paper clips to dazzle naive first-time buyers. The needs of existing experienced users are almost irrelevant. I see software rental as the best remedy.
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2011-11-07 17:11 -0500 |
| Message-ID | <4eb8578a$0$287$14726298@news.sunsite.dk> |
| In reply to | #9734 |
On 11/7/2011 5:50 AM, Roedy Green wrote: > On Sun, 06 Nov 2011 14:34:18 -0600, "Nasser M. Abbasi"<nma@12000.org> > wrote, quoted or indirectly quoted someone who said : > >> Anything close to the above using Javascript? > > I am baffled by the appeal of JavaScript. Maybe you know too little about JavaScript. > I find it being used on the web to write code that works with only > one browser. Most JavaScript developers are capable of writing JavaScript that works in multiple browsers. > I believe it has no sandbox, so it is beloved of websites that want to > install Trojans. It has a security model preventing it from accessing PC disk. > It is passed around in fluffy text form. It would not make much difference to compile it to byte code. > It is not OO. It is object oriented (but also uses other paradigms especially prototype based). > Read up on how you write extensions to browsers, email programs, IDEs > and the like. Instead of using some sane language like Java, they > either concoct some ad hoc monstrosity, or use JavaScript. What are > they thinking? JavaScript is one of the most widely used languages. Almost all web pages today uses JavaScript. It is starting to be used in smartphone apps (phonegap etc.). It will be used in desktop apps (MS Metro and JavaFX). It is even used a little bit server side (node.js). A language that can be used for many different things with a huge number of available programmers. That is very attractive. Actually I don't "like" JavaScript either, but "like" means nothing. Arne
[toc] | [prev] | [next] | [standalone]
| From | Andrew Thompson <andrewthommo@gmail.com> |
|---|---|
| Date | 2011-11-08 03:25 -0800 |
| Message-ID | <4270aca0-4712-4483-a9a6-1fd579ddaf7d@g27g2000pro.googlegroups.com> |
| In reply to | #9734 |
On Nov 7, 9:50 pm, Roedy Green <see_webs...@mindprod.com.invalid> wrote: > On Sun, 06 Nov 2011 14:34:18 -0600, "Nasser M. Abbasi" <n...@12000.org> > wrote, quoted or indirectly quoted someone who said : > > >Anything close to the above using Javascript? > > I am baffled by the appeal of JavaScript. (Sigh) I've said most of this before, to you, but.. > I find it being used on the web to write code that works with only > one browser. 'Feature detection' is the solution to that problem. It is not the fault of JS that programmers don't know how to use it. > I believe it has no sandbox, so it is beloved of websites that want to > install Trojans. The only real aspect of JS that was a security threat AFAIU is the ability of IE to use it to load ActiveX objects. The solution is to switch to another browser. That was a long time ago, though, and I have not bothered to keep up on the security of IE, since I don't use it. > It is passed around in fluffy text form. Obfuscated JS can be pretty small, especially compared to the 20-30Kb images that will typically be embedded in a web page. Further, scripts are typically cached by browsers. Use one script of 4Kb in 100 pages, and the user downloads just 4Kb of script. > It is not OO. It is prototyped OO. http://en.wikipedia.org/wiki/Prototype-based_programming > Read up on how you write extensions to browsers, email programs, IDEs > and the like. Instead of using some sane language like Java, they > either concoct some ad hoc monstrosity, or use JavaScript. .. I won't comment on that situation, but instead one I am working with right now. I want to offer the user of a collection of web pages, the ability to do an intelligent 'full-text search' on content in the pages. To offer this, I use JavaHelp. While it is possible to put a JHelp component into a Java applet, the JHelp component would then display the search results in a JavaHelp navigator component, and the content in the JavaHelp content viewer - not what I want for a number of reasons. The first problem with that is the hits themselves. Show them in JavaHelp and the links provide no sense of history with 'visited / unvisited', colors - which can be important for trawling around through a lot of hits. The second problem is the content viewer (a JEditorPane) and its lack of support for much of the embedded content that might be located (which might use Flash or other applets etc.). By grabbing the links from the the search applet using JavaScript, and writing them directly to the browser window, both problems are solved. While it is true that an applet can manipulate the DOM of a web page, it is like trying to change the rings of a car engine - through the tail-pipe (to rip a common joke about Gynecologists). ..And it usually fails when JS is disabled, anyway. ;) -- Andrew Thompson http://pscode.org/
[toc] | [prev] | [next] | [standalone]
| From | "Nasser M. Abbasi" <nma@12000.org> |
|---|---|
| Date | 2011-11-09 15:23 -0600 |
| Message-ID | <j9er0f$so2$1@speranza.aioe.org> |
| In reply to | #9666 |
On 11/6/2011 2:20 PM, Arne Vajhøj wrote: > On 10/26/2011 1:54 PM, Novice wrote: >> Have applets become obsolete? > > They are still fully supported by Java. > > They are no longer widely used on WWW. > > AJAX JavaScript, Flash, SilverLight etc. has taken that > market. > hi; fyi, it looks like Flash is sliding away? "November 9, 2011 03:53 PM ET" "Adobe's decision to stop Flash Player development for mobile browsers will likely be repeated for browsers on the desktop, just not anytime soon, analysts said today" http://www.computerworld.com/s/article/9221691/Flash_Player_demise_on_desktop_inevitable_but_years_away_say_analysts May be time to start learning HTML5? I wonder if one can do OO in HTML5 ;) --Nasser
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2011-11-09 20:21 -0500 |
| Message-ID | <4ebb272f$0$293$14726298@news.sunsite.dk> |
| In reply to | #9803 |
On 11/9/2011 4:23 PM, Nasser M. Abbasi wrote: > On 11/6/2011 2:20 PM, Arne Vajhøj wrote: >> On 10/26/2011 1:54 PM, Novice wrote: >>> Have applets become obsolete? >> >> They are still fully supported by Java. >> >> They are no longer widely used on WWW. >> >> AJAX JavaScript, Flash, SilverLight etc. has taken that >> market. > it looks like Flash is sliding away? > > "November 9, 2011 03:53 PM ET" > > "Adobe's decision to stop Flash Player development for mobile browsers > will likely be repeated for browsers on the desktop, just not anytime soon, > analysts said today" > > http://www.computerworld.com/s/article/9221691/Flash_Player_demise_on_desktop_inevitable_but_years_away_say_analysts > > May be time to start learning HTML5? I wonder if one can do OO in HTML5 ;) Flash never really made it into mobile browsers. So this decision is somewhat more recognizing fact than a change of direction. Flash will live for many years in desktop browsers. Eventually it will disappear there too. Technology changes over time. Arne
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web