The Client Side


With many client-side technologies available on the market, finding a good solution may seem a somewhat daunting task. Some of the leading technologies have been researched in order to provide Simpleton with enough information to make an educated decision on what to use for the front end. The graphical user interface (GUI) is key to the application, since the user will be interacting with it while the server takes care of the email-handling behind the scenes. This section details the common solutions that can serve as the GUI for the email application.

Dynamic HTML (DHTML)

DHTML allows developers to take HTML one step further and provide interactivity to static pages. Most browser versions later than 4.0 have built-in support for DHTML. Since DHTML resides completely on the client side, there isn't much interaction with the server. Most of the content has to be downloaded to the browser, where it can display certain information based on the user's selection.

This is accomplished with a client-side scripting language such as JavaScript or VBScript. JavaScript is usually the language of choice due to its cross-browser compatibility. Even through JavaScript can run in most browsers, DHTML applications will not always run without error in different browsers. This is largely because support for the Document Object Model (DOM) differs from browser to browser. Therefore, the code to accomplish something in one browser may not be the same in another.

Since DHTML only controls the scripting end of the spectrum, graphics need to be generated for the GUI. This means that the graphics have to be provided in some sort of bitmapped (for example, GIF, JPEG, or PNG) format. Doing so can add weight to the application's overall size and slow the downloading process.

The pitfall in developing an advanced DHTML application is that it might be necessary to develop different versions or components for different browsers. This can require a lot of extra work, and more time will be spent in the development and debugging phases. Code to support this type of application can be very bloated and increase file size, since it's text only, uncompressed. This type of application requires more maintenance and will ultimately cost the client more money in terms of development. Figure III-2.1 displays a few of the pros and cons of DHTML.

Figure III-2.1. Pros and cons of DHTML.

graphics/03fig02.gif

Java Applets

To view applets you need the Java Plug-in, which can take 15 to 30 minutes to download over a 56K connection. The lug-in is available for most browsers on many different operating systems but is still a hefty download when needed.

Java applets provide a little more functionality and allow for animating text and bitmapped images such as GIFs and JPEGs, though this does require quite a bit of system resources. Animating bitmapped images should be used moderately, as the users' hardware is not known. Developers tend to use beefed-up machines to develop and test applications, whereas a user's machine will usually be on the lower end.

instant message

For more information about the Java Plug-in and download instructions, go to http://java.sun.com/getjava/download.html.


Applets do provide for dynamic functionality, and content can be pulled into the applet via an XML or text file. This would allow for connections to be made to the mail server and for data to be transferred via XML. The process can get cumbersome, since a Java program would have to connect to the mail server and load the data to an XML file, where the applet will pull the results.

Java applets contain compiled code, which results in smaller file sizes compared with straight code like DHTML. Since the code is compiled, this allows the applet to be written once and run anywhere the Java Plug-in is available. Although the file sizes are small, the initialization process to load the applet is rather slow. This is because the Java Runtime Environment (JRE) has to be initialized before the applet runs.

Java could potentially be a solution for the GUI of the email application, but some other technologies will be researched to see if there might be a better fit. Figure III-2.2 shows the pros and cons of Java applets.

Figure III-2.2. Pros and cons of Java applets.

graphics/03fig03.gif

Scalable Vector Graphics (SVG)

SVG allow developers to create dynamic and interactive graphics based on XML files. The XML file stores the information necessary to define objects and display them in the browser. XML files can be created dynamically to update information and graphics on the fly.

Graphics are displayed in a vector format that allows them to scale without losing resolution and clarity. They work differently from DHTML and Java applets, which can only display bitmapped images. Vector graphics load quickly and don't require a lot of processing overhead to animate.

Developers can create the business logic to generate the XML files and hand the code to designers to include with the graphic display. Since the graphics are based on XML, this allows the developer to rapidly generate the necessary application code. For that reason, applications developed using SVG are easier to maintain.

This may sound too good to be true, and indeed these advantages come at a price, as the SVG plug-in is quite large roughly 2,250 KB which takes approximately 5 to 10 minutes to download on a 56K modem.

SVG is definitely a candidate for the email application, but the large plug-in size is a major drawback. Figure III-2.3 lists the pros and cons of SVG.

Figure III-2.3. Pros and cons of SVG.

graphics/03fig04.gif

Macromedia Flash

Flash MX allows designers and developers to create complex animations as well as interactivity. Using its built-in scripting environment, developers can harness the power of creating truly powerful Web applications. The scripting language, known as ActionScript, lets developers create modular code that can be reused time and time again.

The required Flash plug-in ships with most major Web browsers and is a lightweight download (approximately 1 minute at 56K) if necessary. The Flash Player displays both vector and bitmap graphics, which allows the application to easily scale to fit different screen resolutions. File sizes remain fairly small, and therefore download times are shorter, since the files are in a compiled format. Currently 98 percent of online users can view Flash content.

instant message

For more information on Flash Player statistics, check out www.macromedia.com/software/player_census/flashplayer/.


With the extensive plug-in use, developers can write code once and expect the same results on all platforms that support the Flash Player. This allows applications to be easily updated and maintained.

Flash also has support for XML and can dynamically load content from a database. New to Flash MX is the ability to handle recordsets and complex data passed from an application server such as Macromedia Cold Fusion. This is a major advantage, since email recordsets can be created and passed to Flash to parse and display.

Flash MX allows the use of new drag-and-drop components that simplify tasks such as creating scroll bars, push buttons, news tickers, and calendars. Designers and developers are now able to work in conjunction with each other by using and reusing components and modular code. Developers can create the components and pass them off to the designers, who just need to know a few parameters to make them work. This will demonstrate the process of separating the application logic from the display.

Currently the only limitation the Flash Player is the ability to display Flash MX content on PDAs, phones, and Web-enabled devices. Macromedia is currently addressing this, and it will be simple enough to port Flash to these devices in the near future.

Flash MX has new functionality that will enable users to store emails locally for offline viewing and to create folders. This will happen on a per-client basis, so each login will be unique to that specific user.

Flash MX looks like a prime candidate for the email application's GUI. Figure III-2.4 lists the pros and cons.

Figure III-2.4. Pros and cons of Flash MX.

graphics/03fig05.gif



Reality Macromedia ColdFusion MX. Macromedia Flash MX Integration
Reality Macromedia ColdFusion MX: Macromedia Flash MX Integration
ISBN: 0321125150
EAN: 2147483647
Year: 2002
Pages: 114

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net