June 11, 2007

Adobe AIR/Apollo vs Ajax vs Gears vs Flash vs Silverlight vs JavaFX vs GWT

Adobe Apollo, now called AIR, (Adobe Integrated Runtime), the runtime environment that allows you to use existing web technology for apps on the desktop is an obvious next step from building desktop like Ajax applications that seem to be awkwardly confined to a browser window. The technology requires a runtime installation of approximately 10MB, similar to the need to install the Java or .NET runtime to run apps in these technologies. However, AIR stands apart by allowing you to develop your applications using web standard technologies. It also adds desktop application like features including storage on your hard drive.

Also providing storage is Google’s recently announced Gears browser plug providing SQL database like storage from web applications. Both Gears and AIR technologies are responding to a web user’s need for offline storage for their web applications. In favor of gears, the download size is under 10% of the download size for AIR. It appears to be a better solution if you only need to add offline storage to your web application.

On top of offline storage, some of the sample applications for AIR offer a mix of Flash vector based and DHTML user interfaces. Its good to see Adobe taking advantage of Flash, which Macromedia made the most successful browser plugin of all time. And it has had relatively no competition. Until now. It had its crown taken as the king for responsive web applications with the rise of Ajax. Flash is now primarily used for ads, music, video, and games. However, Ajax has not yet won in the category of web application interfaces. A big battle is going on between Google Maps, an Ajax map web app, and Yahoo! Maps, a flash based map web app, (I have to side with Ajax in this case. I still feel like I’m in an emulated environment when I use a flash interface. The buttons aren’t real. This is also one of the downfalls of older Java client apps).

Of course Microsoft sees this battle going on and wants a piece of the action. They have always had great development tools that have really pushed client application development on windows and are now trying to push web application development in the browser with its Silverlight plugin. Silverlight is a very interesting technology that supports a subset of the .NET framework. This means that it is like AIR providing better integration with OS features but differs by running in the browser. The download size is also a subset of the size of the .NET framework at approximately 10MB.

With Microsoft getting in on the action Sun is reminded of an old grudge. It is the company behind Java and once had a compelling browser plugin like Silverlight that provided richer desktop app like features inside the browser. Java applets still crop up from time to time but have nowhere near the usage that Flash has. Recently Sun announced JavaFX as a lightweight framework to build rich applications that seems to be a response to Microsoft’s Silverlight.

As a developer of client side web applications this can be very confusing. Do you write an Ajax application with web technologies like JavaScript and leverage Gears for offline storage, or use ActionScript to build an app based on Flash, or use .NET languages for Silverlight, or Java for JavaFX. Thankfully Adobe AIR has decided to leverage existing web technologies. This is one reason the web has become a better application platform for many apps than the desktop. However, Silverlight and JavaFX use non web standard technology because Java and .NET are better for building and maintaining larger and more complex applications which web standard technologies were not built to handle.

This brings us to where GWT fits in. It uses Java to allow developers to build larger applications and compiles the code down to web standards. It can’t be used to build the multimedia applications that Flash is known for, and Silverlight and AIR are aiming for, but it is the most compelling solution for building Ajax applications.
From a corporate perspective, It’s refreshing to see these large companies providing innovation on the web. It is important for them to have a decent amount of web technology real estate. And with many multi million dollar acquisitions of Web companies this web technology competition fits the place of the Netscape/IE competition in a modern day dot com bubble.

Links:

Filed under: ajax, java, gwt, google web toolkit, dojo, javascript, AIR, Apollo, Gears, Flash, Silverlight, JavaFX
February 19, 2007

Introducing the Multiplayer Strategy Game Kdice

I started working on this game back in October 2006 initially stemming from a chat with Jay Bibby from Jay Is Games, who earlier posted a favorable review of Gpokr. The chat was about how we both loved Taro Ito’s Dicewars, which Jay had also reviewed, and thought it would be great as a multiplayer game.

Most of the development was finished by the end of November so I opened it up for testing to Gpokr players who were waiting for the December competition to start. Word traveled fast and Jay showed up on the tables within the first few hours and several hours later had the first review of Kdice up on his site.

It turns out Jay and I were not the only ones who wanted multiplayer Dicewars. Over the past few months over 30,000 players have signed up to help me test and tweak things here and there. At this point things are fairly stable. Making the game multiplayer has added a great politcal aspect on top of Dicewars’ mix of luck and strategy. There is also rating system based on ELO and different tables for players with higher ratings.

Introducing the Multiplayer Strategy Game Kdice

Multiplayer Stategy Game Kdice

Filed under: ajax
December 12, 2006

Google Just Made Their Ajax Toolkit Open source.

The GWT team always seemed open to the idea of making their Ajax toolkit open source. In fact it sounded like that was an eventuality with the only reason for not doing it initially being that they wanted things fairly solid first. Well, they’ve finally done it.

This is good news for GWT developers. While Greg Wilkins and I were working on getting Jetty Continuations working with GWT ,changes had to be made to GWT code We were somewhat concerned about this since we weren’t certain how receptive the GWT team would be to outside changes. Although I’m sure we could have worked with the GWT team to get things working there was no indication that they welcomed this sort of thing. Making the toolkit open source is a welcome mat for contributions like this.
Thanks GWT. Stay tuned for some info scaling GWT Ajax communications with Jetty Continuations.

Filed under: ajax, gwt, google web toolkit, jetty
November 1, 2006

Why there aren’t any Good Tools for JavaScript

Dietrich Kappe has a nice post on the Pathfinder Agile Ajax blog about Bruce Johnsons remarks on the complexity of building tools for dynamically typed languages.

I think its important to note that, along with the halting problem, the reason that dynamically typed languages like javascript don’t have great tools is because they started out as languages for small tasks. Their advantage is that they don’t need complex tools - maybe just a text editor. You can whip up a script, debug, and maintain it very fast.

In contrast, typed languages are designed from the start for large maintainable projects. The extra language features they have are there for more than the support of their tools. They support readability, organization, and compile time error checking.

In other words, why make a tool for a language that wasn’t designed for tools? Why use a scripting language for a large project? Also, why build applications on web technology designed for documents? I can actually answer that last quetion… but another day :) .

Filed under: ajax, java, gwt, javascript
November 1, 2006

Dojo vs. GWT 1.2

There was some talk about Dojo during the GWT podcast with Bruce Johnson, Robert Hanson, and myself comparing it to GWT to build Ajax applications. Dojo has been around longer and may be more mature, GWT leverages java’s development tools, etc.

GWT really excels over the development lifecycle but the one area that I thought it fell behind, and did not think it had much of a chance of catching up, is with the fast tweak/test cycle that fits scripting so well. With GWT you would refresh your browser to see your changes but since GWT compiles java to javascript this would be much slower.

A release candidate for GWT 1.2 was released yesterday with an speed improvment for refreshes during debugging. Bruce Johnson suggests the most efficient develop method with GWT 1.2 in this issue report:

Now caching between runs. Startup is 20-30% faster, and refreshes are much, much faster. Since refreshes are very fast now, the most efficient way to develop is to leave a hosted browser open, make source changes, then click “Refresh”.

I tested this with gpokr and found that startup was 25% faster and refresh was about twice as fast - still not as fast as a refresh of a fully compiled gpokr running in a browser which is a remarkable 1 second. Compare this to the 7 seconds it takes to load the Dojo sample mail application in firefox, (this app seems to have far less functionality than gpokr so it should be faster, this illustrates the advantage of compiling code to javascript eliminating the need for nice looking, readable, debugable javascript that is a tradeoff with speed).

Filed under: ajax, gwt, google web toolkit, gpokr, dojo
October 31, 2006

Hanging HTTP Connections

Gpokr was running for about 3 months before I realized that IE’s 2 connection limit per hostname and a hanging HTTP connection is a risky situation.A hanging connection is when the Ajax application makes a request for data and the server waits with an open connection until data is avaialble. When data is available it is returned immediatly simulating an instant notification from the server.

This is why gpokr seems to always be moving. Cards are dealth, bets are placed, and chat happens seemingly instantly.

It seems like a hack but there are not many options to out there that give Ajax applications the ability to receive data asynchronously from the server. Yes asynchronous is part of the Ajax achronym but this is just asynchronously getting data from the server. For an event driven application like poker the client needs to get data only when it is available. Of course it could check the server every few seconds but this can be a massive overhead. A hanging connection lets the client idle until there is something to do.

The problem is that it takes up a connection. I’m ok with this on the server but the browser limits 2 connections per hostname. Thats one to hang for events, and another to send a chat message, but what if a picture needs to be downloaded at the same time. It needs to wait. Or, in the case with gpokr, what if one connection is hanging for events, the other is downloading a large image, and you only have three seconds left to make a call on pocket Aces or you’ll be folded by the server. The server folds you and you get very mad.

It doesn’t seem like this issue is talked about much within Ajax development circles. Although I ran into this article that measures the use of multiple hostnames to improve performance of a web page - essentially making more connections available to load the page in parallel.

Now, for gpokr, I use one hostname for hanging calls and another for HTTP objects so that the hanging call never slows down the sites action.

Filed under: ajax, gpokr
October 16, 2006

New Podcast About GWT

I had the opportunity to join in on a round table discussion podcast with Bruce Johnson, technical lead of the GWT project at Google, and Robert Hanson, keeper of the GWT widget library, hosted by Java Posse.

GWT Round Table

Filed under: ajax, java, gwt, google web toolkit, gpokr
September 10, 2006

Rule #4080: Differentiate your Software

Not a texas holdem server clone, or a party poker clone even, this man from Belgium wants his very own Gpokr Clone.

Filed under: ajax, marketing, pr, startup, google, poker, gwt, google web toolkit, gpokr
July 21, 2006

gpokr updates

  1. Up to 50 tables. Sure there are only ever 2 tables busy but maybe there will be a bit more traffic someday.
  2. An ideas page base on ideas.43things.com. There’s some great ideas posted here.
  3. Profile pages. Each player has a profile page which lists how they’ve interacted with the site.
  4. A whole lot of playing statistics along with a new top holdem players page with a few different top 10 lists.
Filed under: Uncategorized, ajax, poker, gwt, google web toolkit, texas holdem, gpokr
July 5, 2006

gpokr v0.2

I updated the gpokr server today.

Sound - The sound now uses the delicious playtagger to play an mp3. This works better than an embedded wav file in both IE and Firefox.

Members - You can now sign up for to be a member and play. You’re chip count and information is stored in the database.

Photos - You can upload a photo so you’re more easily recognized at the table.

Send me an email with any questions or feature requests.

Filed under: ajax, poker, gwt, google web toolkit, texas holdem

« Previous PageNext Page »