Introduction

What is FreeDOM? FreeDOM is a new concept I created that changes a web page into a fully asynchronous event-driven application by using currently available technologies. Below, I will compare FreeDOM with currently working web 2.0 concepts and show you the benefits of switching to this architecture.

Web 2.0 Techniques

There are many ways of creating web pages that go and get content from servers and update themselves. Following is a list of common ways.

Ajax: An ActiveX object built into browsers that sends and receives text or XML HTTP requests.

IFrame: A built-in browser element control that can send and request web page content similar to Ajax.

Comet: A concept of leaving a web page in a state of constant downloading that simulates an HTTP push technology, to receive data events.

HTTP Streaming: Using third-party technologies such as Java Applets or Activex to stream data from server to the client.

Most of these concepts come with plenty of downfalls to true application state. Both Ajax and Iframes are very resource intensive. Every time you want to get data from the server, you must create an object or element and send an HTTP Request. This causes the HTTP server to have huge amounts of requests eating up memory and processor time. There is also a delay in response time do to header information being passed back and forth. Also, Ajax and Iframes do not know if there is data available; they have to send a request just to find out if it is available, and once again causes a lot of unneeded talking between server and client. Another issue with HTTP Requests is that they fill up your server logs. This can be a headache for servers with large amounts of traffic. Extremely large logs take up processor time, hard drive space, and backup space. Ajax/Frames also can only receive text or XML. This can be very irritating because, to use it on a page, you must convert it into a usable format. A lot of web sites use an XML objects backend and a JSON objects front end; in doing this, they must have a conversion process. This is at another memory and processor expense.

A lot of developers have noticed these flaws in Ajax and Iframes and have started to invent new technologies. One is Comet, another cleanser name. Comet is very hard to implement and comes with a lot of unknown bugs. Basically, to use it you usually have to create a custom web server because most today were not made to leave requests in an open state. Most servers have timeouts and caching built in to make them faster for a get-in-get-out way of doing business. Comet is a step up from Ajax, but it's not the cure. Comet can only receive asynchronous events; it cannot talk back to the server. You need to implement Comet to receive and Ajax to send, making Comet dependant on Ajax. Another downside of using Comet is that browsers also have an issue with a never-ending web page. Have you ever been on a page that locks up, causing all your other browsers windows to close? This is caused by the EXE sharing memory and thread space. So, Comet was a great idea but it is not feasible do to with current technology.

Another technology is HTTP Streaming. There is many different versions of HTTP Streaming. One way is to set up a server to talk back and forth to an ActiveX or Java Applet. It's very hard to implement and maintain, with many security and licensing issues for both client and server. Most users will not install your code because of fears of corrupt code that they will not be able to remove, plus cause damage to their operating system or files. This can be very scary to the end user.

This next section will describe FreeDOM and how it will fix these issues.

FreeDOM!

So, how would one go about fixing these old technologies to make web sites and application one? Should you wait for large companies to create better working browsers or should you invent it now with currently working technologies? As a developer, I feel I should wait... but as an inventor, I have decided to make it work. What I want is the freedom to do what I want and build what I want on a web page. I came up with the name FreeDOM for this reason, plus it is really what you want to do. You want to work with the browser DOM freely and update it whenever you choose. So, I asked myself what current technologies I could use to create a true event state application. One that came to mind was Flash, with so much new hype around AIR and Flex applications. It's hard not to notice a big boom in Flash usage everywhere since Adobe took over it from Macromedia. Some of the latest usage has said Flash is installed on 90% or more of the machines world-wide across operating systems and browsers. This got me thinking! Could I use Flash in some way with my currently working web page technology? Flash seems to work well for creating banners and animation, but could it handle passing data back and forth? After some testing with ActionScript 3.0, I have figured out a way to replace Ajax, Iframes, Comet, and HTTP Streaming.

How Does FreeDOM Work?

FreeDOM works by using Flash Binary Sockets to communicate with your Custom Socket Server. To pass binary data from Flash sockets to your JavaScript web page, you need a custom class called ExternalInterface. This class will allow you to make calls to Flash methods and add callbacks for your JavaScript methods. So, take a look at some code so you will understand.

Flash SWF Code

Add the following code to a document class .AS file. It is a wrapper for the custom JSocket class and main movie clip. Please keep in mind to keep the size of this and your JSockets small. By keeping them small, you can load everything in the first preloader frame and bypass the activate SWF message.

Top White Papers and Webcasts

This white paper examines the economics of deploying Red Hat's Storage Server. Based on GlusterFS, a distributed file system that Red Hat acquired as part of Gluster, Red Hat Storage Server is ushering in a new era of software-based storage (also known as software-defined storage by many suppliers) solutions. Such solutions leverage commodity x86-based hardware from server vendors and a distributed shared nothing architecture that allows businesses to build out a service-based storage infrastructure in an …

The 2014 State of DevOps Report — based on a survey of 9,200+ people in IT operations, software development and technology management roles in 110 countries — reveals:
Companies with high-performing IT organizations are twice as likely to exceed their profitability, market share and productivity goals.
IT performance improves with DevOps maturity, and strongly correlates with well-known DevOps practices.
Job satisfaction is the No. 1 predictor of performance against organizational …