# Java and HTML Script

**URL:** https://boards.straightdope.com/t/java-and-html-script/183356
**Category:** Factual Questions
**Created:** [June 21, 2003, 3:49am UTC](https://boards.straightdope.com/t/java-and-html-script/183356 "2003-06-21T03:49:38Z")
**Posts on this page:** 8
**Page:** 2

<div class="post-metadata">

### Author: ![micco](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@micco](https://boards.straightdope.com/u/micco)
#### Post date: [June 22, 2003, 4:15pm UTC](https://boards.straightdope.com/t/java-and-html-script/183356/21 "2003-06-22T16:15:49Z")

</div>

> [@](#):
>
> \*Originally posted by JRootabega \*  
> \*\*I was irritated because I feel the statement is misleading to the average user. \*\*

You are correct. I was caught up in rebutting Daver’s false information comparing PHP to client-side code and my statements about Java and HTML being mutually exclusive were too broad. As far as the end result is concerned, the delivery mechanism is irrelevant.

---

<div class="post-metadata">

### Author: ![Urban\_Ranger](https://avatars.discourse-cdn.com/v4/letter/u/e9c0ed/32.png) [@Urban\_Ranger](https://boards.straightdope.com/u/Urban_Ranger)
#### Post date: [June 22, 2003, 4:22pm UTC](https://boards.straightdope.com/t/java-and-html-script/183356/22 "2003-06-22T16:22:38Z")

</div>

> [@](#):
>
> \*Originally posted by Daver914 \*  
> However, people began to realize that said applets were slow, messy, and prone to breaking (because of all the overhead from the virtual machine), and technologies like PHP and Flash took over.

Neither can replace Java. PHP is merely a preprocessor, and Flash can only do animations. Neither can do, say, matrix manipulation on a webpage.

---

<div class="post-metadata">

### Author: ![magog](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@magog](https://boards.straightdope.com/u/magog)
#### Post date: [June 22, 2003, 5:23pm UTC](https://boards.straightdope.com/t/java-and-html-script/183356/23 "2003-06-22T17:23:08Z")

</div>

> [@](#):
>
> \*Originally posted by Urban Ranger \*  
> Neither can replace Java. PHP is merely a preprocessor, and Flash can only do animations. Neither can do, say, matrix manipulation on a webpage.

Not to be (too) pedantic, but FlashMX has its own language (ActionScript), which is a close cousin to JavaScript, but with more objects. Java is more robust, obviously, but you can do quite complicated/math-intensive things with Flash - it’s not just animation and splash screens. You’d have to build a lot of tools, but you could do matrix manipulation using a multi-dimensional array within ActionScript.

---

<div class="post-metadata">

### Author: ![Urban\_Ranger](https://avatars.discourse-cdn.com/v4/letter/u/e9c0ed/32.png) [@Urban\_Ranger](https://boards.straightdope.com/u/Urban_Ranger)
#### Post date: [June 22, 2003, 6:10pm UTC](https://boards.straightdope.com/t/java-and-html-script/183356/24 "2003-06-22T18:10:56Z")

</div>

Yay, more creeping featuritis.

Next target: kitchen sink.

---

<div class="post-metadata">

### Author: ![Sam\_Stone](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@Sam\_Stone](https://boards.straightdope.com/u/Sam_Stone)
#### Post date: [June 22, 2003, 7:57pm UTC](https://boards.straightdope.com/t/java-and-html-script/183356/25 "2003-06-22T19:57:08Z")

</div>

> [@](#):
>
> The OP itself is nonsensical. There is really no comparison between Java and HTML and you wouldn’t use one in place of the other. Java is a language used to write applications which might be used on the server to produce HTML. HTML is just a markup language specifying the layout and display details of content.
> 
> This thread seems filled with confusion and misinformation, and I’m not even sure there is a valid question to be answered. Perhaps the OP could clarify exactly what the issue is. Are you really wondering about why you might embed Javascript in HTML? Or why you would use Java (or some other server-side code) to create content instead of using static HTML files?

Sorry, but as a professional Java programmer in a large corp, I can tell you that the ‘Java vs HTML’ discussion comes up every time we develop a client application that has a zero administration requirement. I’m almost always on the side of doing it in HTML, because I think it is very difficult to build good Java-based client applications. Maybe with webstart, but the applets are just too dodgy in my opinion to make for good, robust commercial applications. We keep trying, though, and we have several commercial products that have client interfaces rendered in Java applets. But I think we’re going to have problems over time with these. The way versioning is done in plugins, for example, leads to all kinds of problems.

HTML with Javascript, XML, CSS, and all the other latest technologies can do a pretty good job of rendering a UI - even a complex, real-time one. I’ve built things like dynamic navigation trees and alarm monitors in HTML, using hidden frames and scripting to poll the server and pass data back to the page at specific intervals. RPC can be implemented in Javascript, or even SOAP calls.

Non-trivial applets also tend to get large and slow to load, which makes the overall user experience more painful. HTML UIs load instantly, and done well they look better than Java and are as usable or more so.

There is TONS of commercial Java code out there, BTW. Our software shop alone currently has about 30 developers who are working exclusively in Java, with maybe another 30 still doing C++ coding. Those who move from C++ to Java usually enjoy the move, because Java doesn’t require nearly so much annoying ‘glue’ to put everything together.

---

<div class="post-metadata">

### Author: ![Markxxx](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Markxxx](https://boards.straightdope.com/u/Markxxx)
#### Post date: [June 22, 2003, 10:04pm UTC](https://boards.straightdope.com/t/java-and-html-script/183356/26 "2003-06-22T22:04:17Z")

</div>

OK let me hijack this a bit.

I use a computer at work. I use webtv at home (simply cause I could never stand to come home and sit behind a computer)

I have written small things in both HTML and Java.

Here is the twist…

WEBTV isn’t Java Compliant. Why? Because Microsoft owns WebTV and Java isn’t a MS product. (it uses Javascript but not Java)

So the biggest complaint WebTV is shut out of so much on the web.

So does this factor into the debate to use HTML.

---

<div class="post-metadata">

### Author: ![micco](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@micco](https://boards.straightdope.com/u/micco)
#### Post date: [June 22, 2003, 10:23pm UTC](https://boards.straightdope.com/t/java-and-html-script/183356/27 "2003-06-22T22:23:18Z")

</div>

> [@](#):
>
> \*Originally posted by Markxxx \*  
> \*\*So the biggest complaint WebTV is shut out of so much on the web.
> 
> So does this factor into the debate to use HTML. \*\*

It does, but not necessarily because we care about WebTV users (kidding…). It’s also relevant for disabled people using screen readers and a lot of other people who are forced to use something less than the latest-and-greatest browser for whatever reason.

With a little effort on the designer’s part, you can detect compatibility and provide the user with a version that will work. For example, some of my team are fond of using Flash navigation tools and some clients really like the results. However, in every case there is a transparent (to the user) gateway which determines whether the user’s browser is Flash-capable and will route to an HTML version if it’s not. This would also be possible with Java applet-based nav tools. Of course, it’s not necessarily true that we’ll provide HTML alternatives to all Java content because there are some things you just can’t do with plain HTML, but if you’re talking about basic site navigation, there’s very little excuse not to provide alternatives.

As an aside, my Flash-happy designers have recently discovered they can do most of the same effects with CSS and DHTML using much smaller source code and much broader compatibility. Nothing I said could convince them that Flash was a bad idea, but they got there on their own.

---

<div class="post-metadata">

### Author: ![Purd\_Werfect](https://avatars.discourse-cdn.com/v4/letter/p/e47c2d/32.png) [@Purd\_Werfect](https://boards.straightdope.com/u/Purd_Werfect)
#### Post date: [June 22, 2003, 10:34pm UTC](https://boards.straightdope.com/t/java-and-html-script/183356/28 "2003-06-22T22:34:12Z")

</div>

So if I understand correctly, both HTML and Java can be used to create mild but consistent disagreement, with Java being more effective as a subject of dissent.

What will they think of next.

[Previous page](https://boards.straightdope.com/t/java-and-html-script/183356.md?page=1)
