This is a showcase review for our sponsors at The Code Project. These reviews are intended to provide you with information on products and services that we consider useful and of value to developers.
In 2003, Atalasoft decided to make web versions of their WinForms imaging controls. The main issue in the port of the controls to the web was how to get the same interactivity in a web control that you could get in WinForm control. Here is a short list of the major requirements:
Key Web Image Viewer Requirements
- Cross-platform and cross-browser
- Interactivity similar to what you get with the WinForms controls:
- Scroll bars when a large image was shown in a small viewport
- Ability to load parts of the image on demand
- Ability to pan, zoom, and select with mouse gestures
- No special security settings required
- No plug-ins or anything to install or approve
- Technology could be used for future controls
- The Web Thumbnail Viewer (released in 2006) required lazy loaded thumbnails and full integration with the Image Viewer
- The Web Annotation Viewer (released in 2007) required the ability to create, edit, move and resize annotations in the browser
<embed src="http://www.youtube.com/v/ZCit_ZEUEjc" width="425" height="350" type="application/x-shockwave-flash" wmode="transparent" /></embed />
AJAX is just one way to get interactivity in a browser. The general term for applications like this at the time were Rich Internet Applications (RIA) and that term is still used to encompass the wide range of technologies that can implement a desktop-like feel in a web browser. There are several technologies that could be used to implement our feature set: Java Applets, Flash, ActiveX or AJAX. I will briefly describe and discuss our assessment of each.
Java Applets are programs written in Java that run in the sandbox inside the browser. They have been around since 1995, and are a well understood technology. One thing to note is despite their long history, they are still relatively rare on the public web. I believe this is because of the following drawbacks:
- The versions of the Java runtime available in browsers is inconsistent
- Not every browser comes with Java by default, and Java is not ubiquitous enough for many applications.
Despite that, Java applets are still a viable option for many applications. They are more common in enterprise intranet applications where the desktop machines are more regular and controlled. They are cross-platform and cross-browser, they can have high interactivity, and if you program within the confines of the sandbox, there are no special security settings.
The only other problems, from our point of view, are that they don't integrate well into ASP.NET applications. The main reason is that they don't automatically keep and restore state through a post-back. We recommend don't use a post-back to update our controls (we provide better ways), but these controls live on a page with other controls that might need to post-back, so we need to support it. The big advantage we get from this now is full integration with the Microsoft ASP.NET AJAX (formerly Atlas) UpdatePanel, which is based on post-backs.
Second, there is no standard way for Java applets to be controlled from the server-side. Since we want to be able to have an ASP.NET control on the server that behaves like any other server control (which will integrate tightly with Visual Studio's designer), we would have to write this part ourselves.
Flash programs run inside the browser via a plug-in published by Adobe. The player is ubiquitous (an independent assessment says that 97-98% of internet users have it in their browser), and it is possible to create stunning User Interfaces with it. Although it is common to see Flash used for online advertising and games, it is still not widely used to create applications. Flash does have the best cross-browser/cross-platform multimedia support which is one reason why YouTube and Google Video chose it for their respective video services.
The biggest drawback at the time is the programming model for Flash which is very different from the standard ways of writing software. The player evolved from an interactive presentation creation system, and still has many artifacts from that. Essentially, creating a Flash application was modeled after stringing together movie clips or animations, and not based on any developer-friendly GUI methodology.
There are two alternatives for that now. Adobe themselves have released Flex, which among other things adds a markup language to describing Flash user interfaces, and OpenLaszlo, which is an open-source alternative that also provides a more standard programming model to delivering programs to the Flash player. At the time we were creating our controls, both of these technologies were in their infancy (and Laszlo wasn't open until October 2004).
ActiveX and other plug-in technologies like .NET's Web Deploy and even the new XAML Browser Applications have to be considered by any company targeting the Microsoft platform. If you only need to support IE on Windows then they offer superior interactivity and a well-supported programming environment. However, Atalasoft was committed to our client-side working on every major browser and platform without any plug-ins or special security settings, so these were never really an option for us.
To us, AJAX offers the following benefits over the other technologies:
- If necessary, you can write it to degrade nicely on older browsers that don't support it.
- Since it's built on top of HTML and uses the DOM to represent itself, ASP.NET has natural ways for keeping its state via a post-back.
- It uses open technologies well understood by web developers.
The second annual AJAXWorld in NYC was in March this year, and according to the keynote, there are over a hundred AJAX frameworks on the market (many open-source). Google, Yahoo, and Microsoft all have open frameworks and tools available, but there are other popular ones such as Dojo and MochiKit, not to mention many proprietary ones.
<embed src="http://www.youtube.com/v/_s1gtVwMMAg" width="425" height="350" type="application/x-shockwave-flash" wmode="transparent" /></embed />
See Atalasoft's AJAX-enabled ASP.NET imaging controls here.
Download Atalasoft's DotImage, the imaging toolkit that containfs these ASP.NET imaging controls here.
Established in 2000, Atalasoft is a provider of a high-performance, standards-compliant .NET Framework imaging libraries targeted towards authors of document processing and management systems and photographic imaging. Atalasoft offers unparalleled ease of integration through CLR compliant objects, logically laid-out object hierarchies, rock-solid implementation, and first-rate support.
116 Pleasant Street, Suite 321
Easthampton, MA 01027
Tel: 866-568-0129 or 413-572-4443
Other product or service names mentioned herein are the trademarks of their respective owners.
Lou Franco is the Director of Engineering at Atalasoft, provider of the leading .NET Imaging SDK (DotImage) and the Document Viewer for SharePoint (Vizit).