Technical White Paper
Rich clients can now be created on top of the web services infrastructure of the Internet itself, without being tethered to any particular server. The old style of client side application programming is particularly inappropriate for this new world. DreamFactory directly addresses the next paradigm of aggregating XML from anywhere, binding the data to sophisticated user interface controls and rich media, and then broadcasting the results back to the Internet on the fly.
DreamFactory is an exciting new way for content experts to create and deploy advanced SOAP and XML based web services applications on the client side. The environment is capable of building complex user interfaces and rich media projects that run faster than Java or C# and are much easier to maintain. But the BIG difference between DreamFactory and everything else is that you can author and build applications in the browser, change them while they are running, and see your changes immediately. DreamFactory turns the browser itself into a development platform. This is an important advantage in the chaotic world of rapidly changing web services, and a gigantic improvement over traditional methods of creating and deploying web applications. The capacity for persistent self-modification and browser-based tool building really sets DreamFactory apart from other environments that are divided into a "development environment" and a "runtime." Rich clients can now be created on top of the web services infrastructure of the Internet itself, without being tethered to any particular server. The old style of client side application programming is particularly inappropriate for this new world. DreamFactory directly addresses the next paradigm of aggregating XML from anywhere, binding the data to sophisticated user interface controls and rich media, and then broadcasting the results back to the Internet on the fly.
Over 4 years in development, DreamFactory consists of a software engine and a folder for additional files and projects. The engine is either an ActiveX control or a Netscape Plugin or a stand-alone executable. The folder is named "DreamFactory6" and contains help files, default scripts, plugins, a download folder, and other system text files. The DreamFactory document type uses the extension ".dfac" and the registered MIME type "application/dreamfactory." DreamFactory runs in mirror identical fashion on Macintosh System 7, 8, 9, and 10 and on Windows NT, 95, 98, 2000, ME, and XP. Both Internet Explorer and Netscape browsers are supported with a 350K one time control download. Every document is identical pixel for pixel, platform for platform, no mater where it is displayed. This concept of "draw once, run anywhere" allows designers to build complex user interfaces with complete confidence that they will look perfect in any browser or on any platform. The fact that DreamFactory is a MIME type means that it can run full screen or as multiple instances on a web page, and can be sent directly as an e-mail extension. DreamFactory runs in a variety of memory footprints, a runtime only version (no scripting or media import/export) is in development for Pocket PC and Palm OS.
A DreamFactory Project in Internet Explorer
Much has been made in recent years of the open source movement. DreamFactory is the next logical step: immediate source. If there is something that you want to modify, you can open that object's self-documenting script, change it in context right now, and continue working. Powerful security features also allow for the protection of functionality if desired. This is light-years beyond the normal procedure of tracking down the source code, finding a programmer, fixing the problem, compiling the executable, uploading it to a website, and returning to the application. Much has also been made of the object-oriented nature of Java and C ++. But with DreamFactory, objects are not just static definitions used by programmers, the object hierarchy can be expanded or modified while the application is running, and living controls can be cut out of one project and pasted into another at will. In the world of rapidly changing SOAP services -- where new capabilities arrive daily and old capabilities change or disappear -- this kind of dynamic functionality is a major advantage. Consumers who want to build a personal tool kit of SOAP based web widgets can gather them from DreamFactory pages anywhere. Service-based web companies can use DreamFactory to deliver client side applications capable of rapid update in the field if necessary and customization by their own user base if desired.
DreamFactory is the ultimate tool-building environment. User interfaces can be built on the fly, and rich media graphics, movies and sounds can be created, imported, and exported all under manual or script control. Supported media formats include BMP, PICT, GIF, JPEG, PSD, WAV, AIFF, MPEG, MP3, MOV and WMV. DreamFactory also has great facility with TEXT, XML, and SOAP. Rich media features include DirectX hardware acceleration, page flipping in the browser, scriptable sound channels, sound mixing, high speed sprites and bitmaps, photographic quality images, and support for 16, 24, and 32 bit color monitors. This kind of power enables the creation of highly visual environments where user scripting is not a requirement. Everything is saved in a persistent and highly compressed single document format, which allows for fast downloads and delivery as a binary MIME type anywhere. DreamFactory also has a role in content creation and management. Because it can create powerful tools, content management applications are naturally written in DreamFactory itself, and one project can be used to add functionality or media to another.
DreamFactory and Java
Java has successfully built server side components and middleware, but on the client side there has been criticism and disappointment. For example, the article Java: Slow, Ugly, and Irrelevant points out that Java is not any easier to use than C++ and has inherent speed problems. In general, client side Java is unacceptable for rich media or complex user interfaces because it tries to do all the heavy lifting. Imagine hundreds of nested classes surrounding a byte-code interpreter that does the work; there is no way for this to be fast. Java's status as some kind of standards based language is also in question due to different versions of the virtual machine. Many vendors have their own runtimes which require a 5 to 10 MB software download, plus installation headaches. Java's security sandbox has proved to be a limitation for client side platforms that thrive on integration with local devices. The average desktop machine has substantial assets that are not explored by Java including intelligent use of the hard disk, access to local content, sound and movie recording, multimedia capabilities, hardware acceleration of graphics and sound, and peripheral connections. Lastly, Java's tendency to download everything and run it on demand may be elegant but it will never be quick. The main reason that Java is in use today on the client side is the vacuum created by viable alternatives.
Instead of a low level language that does everything, DreamFactory uses a high level language to coordinate polymorphic plugins written in pure C. The plugins do all the heavy lifting. Because the plugins run in an API supported by DreamFactory, they are small in size and safe. They travel with the documents that use them, and are version controlled by the system for backwards compatibility. This allows the breakthrough speed to rotate large bitmaps, manipulate huge pieces of XML, run animations or visualizations, rapidly scroll or pan, and support blisteringly complex user interfaces. Entirely new capabilities can be incrementally introduced and downloaded automatically; the initial download is only 350 K. Most of the speed in a scripting language is not in the interpreter itself, but rather in the auxiliary support for the language: garbage collection, file object caching, name lookup, and graphics performance. DreamFactory benefits from 18 years of research into these technologies. On the graphics front, DreamFactory uses hand optimized sprite engines, bitmap blitters, font display technologies, and structured graphics routines developed with techniques borrowed from the video game industry. The Windows version takes advantage of DirectX hardware acceleration of graphics and sound. Page flipping in single and double buffer mode is supported, even in the browser. DreamFactory runs in a security sandbox like Java. But unlike Java, DreamFactory allows usage of the installation folder "DreamFactory6" to cache and work with downloaded files. This allows web applications to maintain intelligent client-side data files and projects for extremely rapid display and access. Instead of ignoring client side peripherals, DreamFactory implements protected and in some cases read-only connections to these devices.
The current J2EE middleware architecture also seems to have a special challenge when it comes to web services. The major vendors are moving towards aggregating web services on the middleware tier for delivery to the client browser as HTML or JSP, but this requires twice as many transactions as simply accessing the services directly from the client, and threatens to create bottlenecks in the middle, see the diagram, below.
J2EE Architecture for Web Services
DreamFactory takes a different approach. Bandwidth heavy graphics and interactivity are moved to the desktop, allowing the server side to focus on web services instead of HTML page generation. This streamlines design, reduces traffic, and lowers cost. Since DreamFactory projects are cached on the client side, rich media assets and detailed interfaces provide a much better user experience while simultaneously lowering bandwidth requirements. Business logic from the middleware tier can be combined with other XML formats like Microsoft's My Services or AOL Anywhere right on the desktop. The costs saving of moving graphics and interactivity from overburdened servers to powerful desktop clients will be a major lever driving industry adoption, not to mention DreamFactory's much simpler development and deployment model. DreamFactory is the perfect front-end for the middleware tier.
DreamFactory Architecture for Web Services
DreamFactory and .Net
Enterprise web applications today use a Java enabled browser, a J2EE middleware tier, and a UNIX/Apache server and/or database. But these are precisely the technologies being challenged by Microsoft's new vision of client driven, service based software. Microsoft has already announced reduced support for Java, and their replacement technology C# promises to be incompatible with the current Java standard, even though it shares many of the same speed problems, requires an 18 MB download, and doesn't work on older systems. The new development languages in Visual Studio are designed to add web services functionality to regular applications running outside the browser, while the new .Net Servers integrate web services on the server side. In the epic battle between J2EE and .Net, Microsoft intends to shift the balance of power in favor of intelligent clients and away from dumb terminals, see Microsoft's role in app server history for more information. And they might be right. Highly intelligent web applications that aggregate content from anywhere could prove unstoppable. Web application strategies that require servers to support client side user interface updates will become obsolete over the next 12 to 18 months. This puts major J2EE vendors like BEA, IBM, HP, and Oracle in somewhat of a dilemma: either Microsoft strengthens their control of the client side and makes inroads into the web services architecture of the server side, or the J2EE rebels have to maintain their own server-supported systems outside of .Net.
DreamFactory takes the approach of being fully compatible with .Net and Hailstorm as a web services client, but maintains an independent pure C source code framework for portability. The platform dependent functions at the lowest level are the only thing that needs to be replaced to port the entire system. The environment is equally comfortable inside or outside the browser or on mobile devices. DreamFactory has excellent DOM support for SOAP and XML and will benefit greatly as web services are deployed on a wider scale. Essentially DreamFactory runs on the web services infrastructure of the Internet itself. The web services revolution has clarified the new core mission of client software: aggregating XML content from anywhere and binding the data to complex user interface controls. DreamFactory was specifically designed to navigate this new world. Applications can be created in the browser, shared across projects, personalized with ease, and modified on the fly.
Bill Appleton, August 2001