Google Answers Logo
View Question
 
Q: Java for Clock Application on Website ( Answered 5 out of 5 stars,   2 Comments )
Question  
Subject: Java for Clock Application on Website
Category: Computers > Internet
Asked by: healthresultsgroup-ga
List Price: $30.00
Posted: 25 Oct 2003 07:04 PDT
Expires: 24 Nov 2003 06:04 PST
Question ID: 269600
Hi.  We have retained a web developer to design a new website.  The
site will include clocks on the main page which constantly revolve,
with the numbers increasing like an odometer.  Example: estimated
total US health care spending from beginning of calendar year to
moment in time, constantly increasing on the screen by the second.

The designers indicate that this must be done in Java.  However, I am
worried that it will force many visitors to download a Java plug-in
and install Java on their machines.

1. What percentage of Web users in the United States already have Java
installed on their PCs?  How does this breakdown across versions of
Java - 1.0, 1.2., 1.3., and 1.6?

2. Please briefly describe the pros and cons between Java, Java
scripts, and Flash for a web application like the one described above.

3. Are there alternatives to Java that are better for clock-like
applications in websites?  If so, why are they better?

Thanks.  I am happy to provide clarifications.

Clarification of Question by healthresultsgroup-ga on 25 Oct 2003 08:32 PDT
Sorry, my question relays my own confusion.  In #1, I'm trying to find
out how many people (%) have Sun's Java installed vs. the percentage
that have MS JavaScript installed.  My designer wants to design the
clocks using Sun's Java but I hear few have it installed and that it's
possibly on the way out.  So my worry is I don't want to force users
to install plug-in and don't want site that'll be out of date if/when
Microsoft wins the Java war.

Request for Question Clarification by bookface-ga on 27 Oct 2003 10:13 PST
PHP won't help you to do the odometer-style changing, as it is all
server-side; to the web browser it appears to be a simple static HTML
page.

I would _highly_ recommend using JavaScript, and setting things up so
that you print out a number via a server-side process (like PHP, Perl,
ASP, JSP, etc.), and then use JavaScript (if it is enabled) will do
the work of updating the number as the user stays on the page. This
way the user at least gets to see a number and can refresh to get the
updated statistic, and if they have JavaScript they get to see the
numbers change on the fly.

You don't need to know what version of Java, for most cases; you will
not run into problems with something that simple. Besides, most people
with Java installed have a fairly recent version.

Flash is also a good solution because it is fairly popular, but a) it
is not as popular as JavaScript, and b) because you can't do the trick
mentioned above with server-side base numbers, it is better to stick
with JavaScript.

I think DHTML might be better suited to this design, but its relative
popularity is extremely low and so it is thus disqualified.

Another option that would be a little bit of a hack would be to use a
server script to output just the number with proper HTML tags and a
META-CONTENT refresh tag, and include it as an IFRAME in the page. I
understand this might be slightly confusing so I will reiterate: In
the main page you include an IFRAME whenever you have a counter
(IFRAMES place the contents of another page in a small frame in the
middle of the page, inline with your text.) As the source for the
IFRAME content, you choose a page with a little customized
PHP/Perl/JSP/etc. script to display the number for the moment the
script is accessed, wrapped in HTML tags that should cause a refresh
of the IFRAME content. (So it will be updated when the IFRAME
refreshes, but then another refresh request will be set in motion,
etc.) The problem with this is that it uses an internet connection
rather than a formulaic solution to pass each statistic, and thus is
rather blunt and consuming of resources. Also, you may not be able to
expect every browser to properly handle IFRAME refreshing.

So again, my solution to this problem is to display the statistic at
the time the web page is accessed with a server-side process, and use
JavaScript to update it if possible based on whatever formulas you
wish to use. You can even include in <noscript> tags a comment to
those users without JavaScript installed or enabled that they can turn
it on or refresh the page for updated statistics.

Please let me know if this is a sufficient answer, as it does not
address every point you asked for, but I feel it still indicates what
you were looking for.

- bookface

Clarification of Question by healthresultsgroup-ga on 27 Oct 2003 11:03 PST
Dear bookface-ga: 
 
Yes, your answer is exactly what I needed.
Answer  
Subject: Re: Java for Clock Application on Website
Answered By: bookface-ga on 27 Oct 2003 13:53 PST
Rated:5 out of 5 stars
 
See clarification.

Clarification of Answer by bookface-ga on 27 Oct 2003 13:54 PST
Erm, I mean, see clarification request.

Also, thanks for your question and for choosing to use Google!
Answers, healthresultsgroup.
healthresultsgroup-ga rated this answer:5 out of 5 stars and gave an additional tip of: $5.00
Great!  Very helpful.  Thanks.

Comments  
Subject: Re: Java for Clock Application on Website
From: steven783836-ga on 26 Oct 2003 14:52 PST
 
These stats were taken from thecounter.com.  thecounter.com is
possibly the leading counter provider in the world, thus I would
assume it's stats are most precise.

During the month of May 2003:
Total Counted:
  -38113581 Visitors
  -51239 Visitors/hour
Java
  -enabled: 32260380 (84%)
  -disabled: 303888 (0%)
  -unknown: 5549313 (14%)
Javascript
  -1.2+: 32815350 (86%)
  -<1.2: 128196 (0%)
  -unknown: 5170035 (13%)
Operating System
  -Win 98  15416286 	(40%)
  -Win 2000  (30%)
  -Win XP  (19%)
Browser
  -MSIE 6.x  (59%)
  -MSIE 5.x  (34%)
  -Netscape 5.x  (2%)

Much more information can be found at
http://www.thecounter.com/stats/.
All programming languages have their pro's and con's, however it all
boils down to the programmer and usage.  The task you wish to
accomplish with these programs can be done with either of them.  A
simple task like different clocks would not be a very difficult at
all.  PHP is another language that I would recommend you try out.  In
a report published by SecuritySystems.com, PHP is the most popular
programming language in the Apache web server.  There is no certain 
programming language I can recommend, however I might add the one that
your web  developer is most knowledgable with might be the best
choice.
Subject: Re: Java for Clock Application on Website
From: healthresultsgroup-ga on 27 Oct 2003 11:02 PST
 
Dear bookface-ga:

Yes, your answer is exactly what I needed.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy