Will Firefox Ever be Able to Gain Enough Traction to be Taken Seriously by Microsoft?


When looking at the stats for this blog I found that over 70% of the traffic that we are receiving is from Firefox users! I shouldn't be surprised since most developers (especially developers that write a lot of JavaScript such as Ajax developers) prefer Firefox over Internet Explorer. As a developer I always get my code running in Firefox first as it is more strict and has better script debugging (in fact there have been quite a few times that IE will not display an error but the script won't work, however, if you run the same script in Firefox it will throw an error that is useful).

All of this got me thinking if there will be a time that Firefox could have as much as 50% of the browser market. According to a CNET article (click here to read the article) Firefox has 12.5 percent of the browser market as of 2006 and some say that it is now around 20 percent. This is enough to make Microsoft take notice, but not enough for them to change their ways. You may be asking why does Firefox's market share matter? Well if Firefox gains enough market share it will force Microsoft to better adhere to standards instead of force feeding us technologies like Silverlight. This could be huge when the next version of JavaScript is released as IE will probably not adhere to much of the new standards.

Unfortunately, Microsoft has not shown that it really wants to adhere to web standards (I personally was extremely disappointed with IE 7 as it promised to fix so many things and didn't take care of many of them, plus it seems to render pretty slowly). Microsoft has shown that it is trying to take over Flash's place in the market with a plug-in that runs on Linux for Silverlight. This seems to be great, but if they can take over the marketplace then they will probably remove the Linux support and try to force everybody to IE and Vista (this is the way Microsoft has been in the past). Microsoft not adhering to standards is the reason that we still have to write browser specific code (it is not as bad as it once was, but it isn't that much better).

This leads to the question of how will Firefox be able to get enough market share to scare Microsoft into playing fair by adhering to standards? Only a small amount of home users will change browsers, since IE is built into their operating system. So, where the change needs to start happening is at the workplace. The more enterprises that start using Firefox will not only increase the market share of enterprise users but would probably start increasing the amount of home users as people that had never used Firefox would come to love it as most tech people do (I know this may just be a dream).

So now that you've endured this article (and no I'm actually not 100% against Microsoft) keep browsing with Firefox as the more that web masters see Firefox the more market share it has. So, please don't use IE, use Firefox instead!

I know that you all have comments, so let me know what you think about this topic.

A Better Ajax Back Button Solution

If you've spent any time coding an Ajax application you know that the one of the problems with Ajax is that it breaks the back button. You have probably seen solutions that use an iframe and a hash (#) in the url to fix this issue. While this works there is a much simpler way that I've been using in my applications for the last year or so.

The key is the A tag (also known as the anchor tag) and the name parameter with a hash in the url. The trick is to either dynamically create the element or to just change the value of the name parameter to the matching value of the hash.

Below is an example of changing the name of the anchor tag.

//Anchor Rename Object this could also be a simple function if preferred.
var AnchorRename=new Object();
AnchorRename.CreateObject=function(anchorname, anchorid){
	this.anchorid=anchorid; //This is the id of the anchor element
	this.RenameAnchor(anchorname, anchorholerid);
	RenameAnchor:function(anchorname, anchorid){
		document.getElementById(anchorid).name = anchorname;

In this example you would pass in the new value of the name (which must be the same value as after the hash in the url) and the id of the anchor element.

Below is an example of dynamically creating the tag and name values.

//Anchor Rename Object
var AnchorRename=new Object();
AnchorRename.CreateObject=function(anchorname, anchorholderid){
	this.anchorholerid=anchorholderid; //This is the id of the element to hold the new anchor
	this.RenameAnchor(anchorname, anchorholderid);
	RenameAnchor:function(anchorname, anchorholderid){
		var AnchorCode=document.createElement("a");
	        AnchorCode.setAttribute("name", anchorname);

In this example you would pass in the new value of the name (which again must be the same value as after the hash in the url) and the id of the anchor element.

Now the question that you may be asking is how does creating or renaming the anchor element help with fixing the back button. That is where when you call the object comes into play. You need to create or rename the object before a link is clicked. So, I would recommend using an onmouseover and an onfocus event to call the create or rename of the element so that before a link is clicked the required anchor element will be created.

I hope that this post has shown an easier solution to fix the back button problem that occurs when we create Ajax applications. Now go out there and try using it on your applications!

Update: I have posted a working example of this solution and it can be read here.

Web Designer/Programmer Needed - Must know every web server language that I found on Google


Here is a great real ad that was found on Craigslist. The ad literally asks that somebody have programming skills in just about every possible server side language.

Below was taken directly from the ad.

Must have specific database and Web-development experience to include in-depth database management and Web design services. Experience with government clients providing extensive data management and document tracking support a plus. Must have strong computer programming skills across a wide range of platforms/software programs to include:
• PHP5
• ColdFusion 5, ColdFusion MX
• Classic ASP, ASP.NET
• Visual Basic, VB.NET
• Adobe Flex
• JavaScript and VBScript
• Zend Studio
• ColdFusion Studio
• Visual Studio .NET
• Dreamweaver MX
• Front Page
• Acrobat PDF
• Content Management
• Photoshop / Image Ready
• Quark Xpress
• Flash MX
• Fireworks MX
• SQL Server 2005
• Access
• Oracle
• Paradox
• Informatica Data Analyzing and Procedural Mapping
• PC (Windows XP)
• MAC (OS X Tiger)
• Novell Netware5
• Internet Information Server 5
• SQL Server
• MS Windows Server 2003
• ColdFusion Server & Administrator
• Microsoft Office User Specialist
• Corel OfficeSuite

How quickly do you think this job will get filled? If somebody really knows all of the above really well they had better be willing to spend a million a year on him because that is how valuable this person would be. Take a look at the original ad and have a good laugh before your Thanksgiving.

Have a Happy Thanksgiving!

JFlubber! A Google Android Podcast Helper App


Straight from the Android Developers Blog, we bring you an article by Dick Wall [Google Developer Programs] on his mission to port an existing Java app over to the Android platform. He discusses a important point about reconsidering the choices that were made when the app was originally developed as a desktop application. In particular, he realizes the need to refactor his use of the java.util.Timer class since it isn't very efficient in a mobile environment with limited resources.


The original application is a Java Swing and SE application. It is like a stopwatch with a lap timer that we use when recording podcasts; when you start the recording, you start the stopwatch. Then for every mistake that someone makes, you hit the flub button. At the end you can save out the bookmarked mistakes which can be loaded into the wonderful Audacity audio editor as a labels track. You can then see where all of the mistakes are in the recording and edit them out.

In the original version, the timer code looked like this:

class UpdateTimeTask extends TimerTask {
   public void run() {
       long millis = System.currentTimeMillis() - startTime;
       int seconds = (int) (millis / 1000);
       int minutes = seconds / 60;
       seconds     = seconds % 60;

       timeLabel.setText(String.format("%d:%02d", minutes, seconds));

And in the event listener to start this update, the following Timer() instance is used:

if(startTime == 0L) {
   startTime = evt.getWhen();
   timer = new Timer();
   timer.schedule(new UpdateTimeTask(), 100, 200);

Fortunately, the role of Timer can be replaced by the android.os.Handler class, with a few tweaks. To set it up from an event listener:

private Handler mHandler = new Handler();


OnClickListener mStartListener = new OnClickListener() {
   public void onClick(View v) {
       if (mStartTime == 0L) {
            mStartTime = System.currentTimeMillis();
            mHandler.postDelayed(mUpdateTimeTask, 100);
private Runnable mUpdateTimeTask = new Runnable() {
   public void run() {
       final long start = mStartTime;
       long millis = SystemClock.uptimeMillis() - start;
       int seconds = (int) (millis / 1000);
       int minutes = seconds / 60;
       seconds     = seconds % 60;

       if (seconds < 10) {
           mTimeLabel.setText("" + minutes + ":0" + seconds);
       } else {
           mTimeLabel.setText("" + minutes + ":" + seconds);            
               start + (((minutes * 60) + seconds + 1) * 1000));

For the full post, and more code, check out this article at the Android's Developer Blog and for more tips and an opportunity to ask questions, check out the Android Developers Group


JavaFX: The Second Coming of Swing


At JavaOne 2007, Sun announced with much fanfare its JavaFX platform including two major components: Mobile and Scripting. This article will focus on the most interesting aspect of this new platform (for Swing old-timers, at least), the Java FX Script component. For interested parties, all of the relevant files can be found in the OpenJFX project hosted on java.net. The distribution is currently just a dump of the Subversion tree, but contains plenty of goodies to get started with the language. For those who are merely interested in sampling what Java FX can do, there are plenty of JNLP-based demos which can be launched from the main page (a 1.5+ JRE is required to be installed on the client).

The First Coming of Swing

Some of us may remember the first time Sun introduced AWT (later to evolve into Swing) to an excited world in 1995. It wasn't long before many developers were eagerly creating Applets in their web browsers, marvelling at the prospect of code being streamed over the network and executed in their browser. Applets were cool. Applets were hot. Applets were...well, ugly. Back then, though, Windows 95 defined computer aesthetics, and Applets didn't suffer too much in comparison.

Fast forward several years, and the picture has changed rapidly. Swing is no longer the disruptive technology that it once seemed to be. After Microsoft began neglecting its Java implementation for Windows/IE (coincidentally after a long battle with Sun over its embrace-and-extend tactics) and Netscape lost the browser wars, Swing had become less important as a technology. Most web developers moved on to using Flash, Java moved into its server-side stronghold (having failed to really take off on the desktop), and Swing was left to stagnate. Swing continued to improve over the years, but Sun's--and most of the world's--attention had moved elsewhere.

Enter JavaFX

In 2005 Sun acquired SeeBeyond Technology Corporation, an employee by the name of Chris Oliver, and a little creation of his called F3 (Form Follows Function), later dubbed JavaFX Script. Sun saw its opportunity to position itself in the Rich Internet Application (RIA) market, and set its sights on competitors, Microsoft's Silverlight and Adobe's AIR (Flex). It's too early to tell what the success of JavaFX Script will be, but Swing has come a long way since the heady early days of the Internet and JavaFX may be just the trick in smoothing some of the pain points in developing with Swing.

Introduction to JavaFX Script

To veteran Java developers, JavaFX Script will seem both familiar and strange at the same time. Depending on which style of the language you develop in, it can look either like JavaScript or like "CSS with scripting". What follows is an example, written in both styles, with the obligatory "Hello World":

Frame {
title: "Hello World Frame"
width: 250
content: Label {
text: "Hello World"
visible: true

Figure 1a: Hello World in "CSS with Scripting" style


var f = new Frame();
f.title = "Hello World Frame";
f.width = 250;
var label = new Label();
label.text = "Hello World";
f.content = label;
f.visible = true;

Figure 1b: Hello World in JavaScript style

Run either of these examples in the JavaFXPad application (provided in the distribution or via JNLP on the web site), and you will see the familiar Swing frame with its content as a single label containing the text "Hello World". It isn't hard to see that JavaFX is much more compact than the equivalent Java code. That in itself addresses one of the major difficulties in developing in Swing, but JavaFX Script is more than that. The language contains "shortcuts" that make more sophisticated development in Java 2D and 3D as easy as doing it in a declarative language such as SVG or Flex. The default code displayed when JavaFXPad launches demonstrates this convincingly, showing how easy it is to do scaling, transforms, or create a shadow filter.

Core Language

JavaFX Script contains a lot of syntactic similarities to both Java and JavaScript, so many constructs will already be familiar to an experienced developer. This section will highlight some of the important differences and unique features of JFX Script.

Primitives Values

JFX Script has four primitives: String, Boolean, Number, and Integer (all whole number values, i.e., byte, int, long, etc.).


JFX Script replaces the more C++-like !, &&, and || with not, and, and or.

For Loops

JFX Script has a version of the "foreach" constructs that allows iteration over an interval, like so

for(i in [0..5]) {
//do something

Operations and Functions

JFX Script has two different keywords to declare methods: operation and function. Funcions in JFX Script are forbidden to have loops or conditional operands in order to minimize potential side-effects. Why is this needed? Because a function re-evaluates its return value every time one of its input parameters or referenced variables is changed. This turns out to be very handy when you want to bind some output to values that frequently change. Operations are more like normal Java methods.

IDE Support

Obviously, the JavaFXPad application is insufficient for real-world development, so early versions of plugins for using JFX Script with Netbeans and Eclipse are available. Of the two, the Netbeans plugin seems further along in its development (it is a Sun technology, of course ;) ), but expect this to change as the project nears release. See the OpenJFX site for downloads and instructions.


JavaFX Script is still very much in pre-release stage, but is already looking like an extremely promising technology. Currently, it runs in interpreted mode but a compiler is being developed for the language that will compile scripts straight into Java bytecode, giving the same performance as the equivalent Swing code with a fraction of the effort. It definitely has an uphill battle in the race for the RIA market, but for existing developers that use Swing it is already a winner.

A JSON Load Object without using Eval


After writing my article on using JSON in Ajax without using Eval (click here to read the original article) I thought that it would be easier to have an object that could create the JSON with DOM manipulation. So below is the code for the object.

//JSON Dom Code
var jsonload=new Object();
jsonload.CreateObject=function(codeholderid, jsoncode){
	this.codeholderid=codeholderid; //This is the id (as a string) of the element to hold the script code
	this.loadJSON(codeholderid, jsoncode);
	loadJSON:function(codeholderid, jsoncode){
		var JSONCode=document.createElement("script");
		JSONCode.setAttribute('type', 'text/javascript');
		JSONCode.text = jsoncode;

This code works by passing in the id of the element that should hold the script and the text of the code that should be run (this could also be used to dynamically load code). This code is great if you are going to use an Ajax call that calls content from the same domain (or if you use a server side proxy that tricks it into working). However, if you want to get your JSON from a cross domain you could use the below code.

//JSON Dom Code
var jsonload=new Object();
jsonload.CreateObject=function(codeholderid, jsoncode, url){
	this.codeholderid=codeholderid; //This is the id of the element to hold the script code
	this.url = url;
	this.loadJSON(codeholderid, jsoncode, url);
	loadJSON:function(codeholderid, jsoncode, url){
		var JSONCode=document.createElement("script");
		JSONCode.setAttribute('type', 'text/javascript');
	        JSONCode.setAttribute("src", url);

In this code you would pass in the same arguments as the first example plus the additional url argument. The url can be to server side code that would create the JSON that could be based on parameters that are passed in through the url.

Below is an example that shows how the first example code would work with an Ajax call.

//Ajax Object Code
var net=new Object();
net.ContentLoader=function(url, onload, onerror, callingobject){
	this.onerror=(onerror) ? onerror : this.defaultError;
	                this.req=new XMLHttpRequest();
	                if (this.req.overrideMimeType) {
	        } else if (window.ActiveXObject){
	                try {
           			this.req=new ActiveXObject("Msxml2.XMLHTTP");
			} catch (err) {
				try {
					this.req=new ActiveXObject("Microsoft.XMLHTTP");
			} catch (err) {}
				var loader=this;
	                        var TimeStamp = new Date().getTime();//This fixes a cache problem
		                        this.req.open('GET', url+"?timestamp="+TimeStamp, true);
	                                this.req.open('GET', url+"×tamp="+TimeStamp, true);
	                } catch (err){
	        var req=this.req;
	        var ready=req.readyState;
	                var httpStatus=req.status;
	                } else {
	        alert("error fetching data!" + "\n\nreadyState: "+this.req.readyState + "\nstatus: "+this.req.status+"\nheaders: "+this.req.getAllResponseHeaders());

//JSON Dom Code
var jsonload=new Object();
jsonload.CreateObject=function(codeholderid, jsoncode){
	this.codeholderid=codeholderid; //This is the id of the element to hold the script code
	this.loadJSON(codeholderid, jsoncode);
	loadJSON:function(codeholderid, jsoncode){
		var JSONCode=document.createElement("script");
		JSONCode.setAttribute('type', 'text/javascript');
		JSONCode.text = jsoncode;

function StartJSONLoad(url, callingobject){
	//url is the url of the server side script to get the JSON
	//callingobject is the id of the element that is making the ajax call
	var AJAXConnection = new net.ContentLoader(url, FinishJSONLoad, JSONError, callingobject);
function FinishJSONLoad(){
	var codeholderid="DivHolder"; //Where DivHolder is the id of the element where the script should be created.
	var JSONObject = new jsonload.CreateObject(codeholderid, this.req.responseText);
function JSONError(){
        alert("There was an issue getting the data.");

To use this code you simply have to call the StartJSONLoad function and pass in the URL for the Ajax call (this would go to some server side code that would return the JSON) and the element that is calling the code [you have to use the document.getElementById('idofelement')] which could be the element that will hold the script. In the FinishJSONLoad function you will need to change the DivHolder string to the id of the element that you would like to hold the JSON code.

I hope this code makes it easy to start using JSON in your web applications without using the "evil" eval!

For more information on JSON visit json.org.

Silverlight Beginner's Tutorial


Laurence Moroney over at Information Week has posted a great beginner's Silverlight tutorial that covers the following:

  • Your First Silverlight Application
  • Understanding XAML
  • Understanding the Blend series of Products
  • Building Silverlight applications using Aptana on the Mac
  • Building Silverlight applications using Visual Studio Express on the PC
  • Programming Silverlight 1.0 with JavaScript

Click here to start the tutorial

AJAXWorld 2008 East in New York


AJAXWorld 2008 East will be held in New York on March 18-20, 2008. The focus of the conference is Rich Web Technologies for Enterprise Web 2.0 and Social Applications.

Topics, like these below, will be covered throughout the sessions at the conference:

• AJAX development IDEs: what are the alternatives?
• When it comes to accessibility, how do I know what's required?
• How can I make AJAX applications that easily go offline?
• How do you make a secure AJAX application?
• Are mashups really contributing to the experience of the Web?
• What's the difference between a mashup and a composite application?
• Am I better off using an AJAX framework, a toolkit or just coding?
• Is AJAX commoditized or will it be soon?
• Will AJAX be standardized in the form of widget APIs or declarative markup?
• What AJAX development tools are available for visual development today?
• How should you handle Web analytics and metrics for Rich Web sites?
• Do we really need JavaScript 2.0?
• How do you scale an AJAX-based design to a very large application?
• How can I harness the energy of my customer base online?
• On what timeline will AJAX skills become commoditized?

Technical sessions will cover challengers to AJAX such as new innovations like Silverlight and JavaFX. As well as performance and browser compatability issues, showcasing strategies for performing unit/stress testing on an AJAX application, and how you apply user interface patterns and user experience design to your AJAX project.

During the first day of the conference, there will be a full day track for an AJAX Security Bootcamp. The speakers, Billy Hoffman and Bryan Sullivan, are notable AJAX security experts and this will be the first ever full day AJAX Security Bootcamp at AJAXWorld. Click here for more information on the bootcamp or here for the whole conference.

AJAX + iPhone = Ultimate Shopping Gadget?


Prixtag Logo

Yes, it's true. The folks over at Prixtag have put together an AJAX based product pricing comparison tool for the big names in online shopping, like: amazon, ebay, buy.com, overstock, google, etc...

They've produced an iPhone friendly version of the tool, that's optimized for the iPhone's screen size. I know what you're thinking... this is just in time for Black Friday!

Click here to visit the site and start comparing prices, so when you're shopping around Target & Best Buy at 4AM this Friday, you'll have a leg up on your competition.

Yahoo and Google to Turn E-Mail Into a Social Network - (Inbox 2.0?)


Google and Yahoo reportedly have a similar idea to compete with MySpace and Facebook. The idea is to turn your email account into a social network. This seams to be a great idea since people go into their email to connect to other people.

Apparently they will be combining their email along with their personal pages to create the social network. Since e-mail already has contacts that would act as friends and the personal pages would have an added public version to create the effect of a home page (like those in MySpace or Facebook) it seems to be a perfect match.

The following is an excerpt from an article on Bits.

Web-based e-mail systems already contain much of what Facebook calls the social graph — the connections between people. That’s why the social networks offer to import the e-mail address books of new users to jump-start their list of friends. Yahoo and Google realize that they have this information and can use it to build their own services that connect people to their contacts.

I don’t have a lot of detail from Google, but I’ve heard from several executives that this is their plan. When I talked recently with Joe Kraus, who runs Google’s OpenSocial project, he said: “We believe there are opportunities with iGoogle to make it more social.” And when I pressed him about the relationship between the social aspects of iGoogle and Gmail versus Orkut or some other social network, he said, “It is much easier to extend an existing habit than to create a brand.”

Brad Garlinghouse
Brad Garlinghouse (Photo: Neal Hamberg/Bloomberg News)

Brad Garlinghouse, who runs the communication and community products for Yahoo, was a lot more forthcoming. He didn’t-have dates or specific product details either. But he did say that Yahoo was working on what he called “Inbox 2.0.”

This has several features. First, the e-mail service is made more personal because it displays messages more prominently from people who are more important to you. Yahoo is testing a method that can automatically determine the strength of your relationship to someone by how often you exchange e-mail and instant messages with him or her.

“The inbox you have today is based on what people send you, not what you want to see,” Mr. Garlinghouse said. “We can say, here are the messages from the people you care about most.

Yahoo Mail will also be extended to display other information about your friends as well. This can be a link to a profile page, and also what Yahoo calls “vitality” –- updated information much like the news feed on Facebook. There could also be simple features that are common on social networks, like displaying a list of friends whose birthdays are coming up.

“The exciting part is that a lot of this information already exists on our network, but it’s dormant,” Mr. Garlinghouse said.

What Yahoo is missing in this vision is a personal profile, where users express their interests and personality to others. Yahoo, of course, has had many different takes on this over the years: its member directory, Geocities, Yahoo 360. It recently started Yahoo Mash. But none of these is quite right, Mr. Garlinghouse said. Mash is simply an experiment, not a product being readied for mass promotion.

There will be some sort of profile system attached to Inbox 2.0, he said. For people who use a lot of Yahoo services, this profile could be quite rich even at the beginning, as it can draw on activity on Yahoo Music, Yahoo Shopping and so on.

“If I get an e-mail from Saul Hansell, I should be able to click on his name and see his profile,” Mr. Garlinghouse said. “The profile page is where you can expose what you want people to know about you.

In this vision, people have two pages: a profile they show to others and a personal page on which they see information from their friends as well as anything else they want, like weather or headlines. That’s different from MySpace, which combines all this into one page.

Already My Yahoo and iGoogle are increasingly collections of widgets that hold content and applications from multiple sources, some of them already social, like e-mail and feeds from social sites like Flickr. But much more is coming.

This approach has a lot of potential and a few pitfalls. To start with, everyone who joins Facebook understands that what they do on the site is about sharing information with friends and sometimes strangers. People who use Yahoo Mail, or just exchange messages with someone using a Yahoo Mail account, have no such expectations. So the company will have to be very careful in how it explains what it is doing and ask for permission in the right places.

“This isn’t a separate product,” Mr. Garlinghouse said. “This is an integration that has to be seamless to the user.”

Read the full article here.

I could see the Yahoo social network incorporating Flickr, del.icio.us and Yahoo Instant Messanger. While Google could perhaps incorporate YouTube. Depending on how much integration happens with other services owned by the companies could depend on exactly how quickly the networks could become huge. If each company where to really integrate all of the social networking related services that they own their would be a huge danger of making a network that has no targeted audience. It will be interesting to see what they create.

Since both companies already have so many users of their services the social networks would instantly have a number that would make them among the largest. It will be interesting to see how well the integration of the various services will be. If it is done well these could quickly become to the top two social networks.

Syndicate content