Archive for April, 2008

Where are the Java Applets?

I’ve often asked myself why Java Applets are not more prevelant. HTML is relatively static. Even with CSS, web pages comprised simply of HTML are not very interactive, especially compared to desktop applications.

The developer community is very creative. A variety of technologies, methods, and tools have been utilized to bring life to HTML. Flash, Javascript, AJAX, and SVG are growing in popularity and add a richness and interactivity to web based apps that approaches desktop apps.

Why has the Java applet been left in the dust? I have a few explanations.

First, there is a lack of understanding in the proper usage of the Java applet on a web page. A web page is not a desktop application and the techniques of building Java standalone (desktop) applications do not carry over to web apps. Java user interface components and frameworks have advanced nicely over the years. SWT and Swing can be used to create desktop apps that are as clean, crisp, and visually appealing as native desktop apps. However, SWT and Swing have little use in a Java applet. And that is the approach many Java developers take.

The correct mindset is that of the Flash or browser plugin developer. At their disposal is a rectangular region of the page. They can do whatever they want in that space. To use Swing or SWT there – as it would be used on in a desktop app – is generally inappropriate.

Second, web developers that focus on look and feel are typically not software engineers. Software engineers gravitate towards Java. Designers gravitate towards things like Flash, CSS, and AJAX. While beautiful UIs can be built with Java, it is simply not the tool of the designer. Perhaps JavaFX will address this.

Finally, I believe the use of Java applets are underestimated. There are web sites that utilize Java applets, but they are not easily recognized. Applets don’t look like Swing or SWT apps, so they go unnoticed. These sites are using applets properly. They are not trying to stick a Java desktop-like component into the middle of a web page.

I would like to see Java applets utilized more. From the perspective of a software engineer, I prefer the Java applet. It provides a great deal of control, allows me to do quite a bit (in a rectangular region of a web page), is very robust, and performs extremely well. I generally avoid heavy Javascript because it is unpredictable across browsers. I’ve noticed that sites utilizing heavy Javascript tend to also have performance problems. So, while Java applets have plenty of advantages, it simply may not be the tool of choice.

Applets reloaded


April 9, 2008 at 1:59 am 9 comments

How online ads track users – Explanation for the non-geek

It has been said that web surfers’ online activities can be tracked by Google and other online ad suppliers. Here is an explanation for non-technical folks. I believe this is accurate, but corrections are welcomed, as are suggestions to make this more concise.

First, a little background on how web sites work. The web (http) is “stateless”. That means when a person browses a web site, the site can not retain any information as the user moves between pages. You may find that hard to believe. How could your bank’s web site remember who you are as you clicked on various links and moved between pages? Obviously, the banking web site is able to remember who you are as you navigate. The answer is the “cookie”.


A cookie is a small piece of unique information (like a number or string). When you first visit a web site, a cookie can be sent back with the initial web page. The cookie is not displayed anywhere, but it is there behind the scenes. Furthermore, once the cookie is sent to the browser, the browser sends it back to the web site whenever another page is requested. All further communications between the browser and the web site include the cookie. That is how a web site can identify a user and retain state between pages. The cookie identifies you to the web site, allowing the web site to create pages specifically for you.

Cookies may also persist between browser sessions. The cookie may be written to a file. That way a browser can remember the cookie after a user closes the browser. When a browser is started up, it can read the cookies from the prior session.

Browsers provide some security regarding cookies. Mainly, a browser will only provide a web site’s cookie to the source web site. The browser will not supply Amazon’s cookie to eBay. It will only supply it to Amazon’s web site. The browser associates the cookie with a URL and only supplies the cookie to that URL.

Tracking Users

How does this all fit in with online advertisers being able to track specific users? There are three things that are desirable to track: i) the web site where an ad is placed, ii) the user who is viewing (and clicking) an ad, and iii) the identity of the user viewing and clicking ads.

First, Google (or any ad supplier) needs to track where ads are displayed. That is part of their business and a service they provide to their customers. A business that places ads through Google wants to know the sites where the ads are being displayed. Ads are similar to links and a fundamental part of web technology allows for tracking a page referenced from another site. This is standard web technology. There is no issue of privacy here, just the ability to determine where ads are displayed.

Google can also track a user via ads. This is quite common and it is accomplished with cookies. When you visit and the site displays ads, there are several cookies involved. has its own cookie. The ads displayed from Google, which are references (links), actually reference Google’s web servers. So Google’s cookie also comes into play. At this point, Google can track all of a user’s web site visits that have Google ads on them. The browser security is still at work, but because the ads are served from the same URL, visits across multiple web sites can be tracked. That may not seem so bad. After all, you are simply anonymous at this point. Or, are you?

You may be revealing who you are to Google, however. If you make use of Google services that are require an account, such as GMail, then Google likely knows who you are. You likely provided your name and possibly other information in setting up your GMail account. If so, Google can track your identity and all web sites you visit that have Google ads on them. It knows how often and when you visited the sites.

Google has been used as an example. Any ad supplier can do the same thing. Google is used because it is the biggest online supplier of advertisements. As they become bigger and more formidable (through acquisition), they gain more control as data collection is centralized. That is not to say that ad suppliers could not cooperate and share data. That could happen too.

Protecting privacy

Recently, I’ve wondered about ways to protect my own privacy. The obvious thing is to turn off cookies altogether. Most browsers provide this option. I don’t recommend turning cookies off though. Some web site won’t work without cookies. Beside, cookies do provide a benefit.

There are a couple of ideas I am experimenting with. I generally don’t log on to Google services. When I do, I make sure to explicitly log off. I am not sure if my identity is retained in the browser after logging off though. Secondly, I noticed that modern browsers seem to have the ability to disallow cookies from specific sites. This is a little tricky to setup, because one must know the URL associated with a cookie. The actual URL from which an ad is served, may not be obvious.

I don’t have any sure fire methods and would like to hear some.

April 4, 2008 at 12:05 pm Leave a comment

RSS Twitter Timeline

  • An error has occurred; the feed is probably down. Try again later.
April 2008
« Mar   May »