|
User Interface
The front end is completely developed using Flash MX. All data is loaded through Flash Remoting. A chat system was provided to let the customers communicate with Metal Tracer agents. This component uses Flash Communication Server as it is seamlessly integrated with the Flash user interface.
We strongly believe in the power of an Object Oriented approach. Thus we have created a set of components using classes, inheritance and interfaces. Moreover, we have organized every part of Metal Tracer as a package of dedicated classes that manage that section's logic and interaction with the CFCs. To even further centralize the code, we opted to use only a few frames in the main time line.
Everything including windows and their shadow, title and dimension is an Action Script Object.
The most significant component we developed is a full-featured data grid. In the process, we went through three different versions, every one of each made from the ground up, ever more optimized and more featured than the previous version. Some of its features are:
Multiple row selection
Removing rows (one or more) with an appealing visual effect
Customizable row selection listener
Column sorting in ascending or descending order, by numeric or string data
Resizing of columns by mouse dragging
Automatic column headers trimming upon column resizing
Tooltip for any or all columns with customized message
Break down into pages according to specified number of records to show per page
Navigation with page numbering, next and previous page
Multiple filtering options on the current data
Recordset loading from Flash Remoting
Vertical and horizontal scrolling
For filtering of records and sorting, we had the option of making new queries each time one of these actions were triggered by the user. However, we opted to download the data only once and process sorting or filtering of records on the client side. In this manner, we are able to apply multiple filters on the current recordset without making new calls to the server, thus reducing enormously the bandwidth and server load.
Other general purpose components we developed:
Windows
Tabs
Combo Boxes
Checkboxes
Tree
Buttons
Text Fields
These components are used thoroughly and they are the basic structure of the application.
A total of 73 classes with 8000 lines of Action Script code comprise the whole application. It is worth noting that in spite of the enormous functionality of the application, the size of the Flash file is only 200K. No other file is loaded.
Backend
Cold Fusion components were used to handle the database logic and delivery of data to Flash MX. ColdFusion provided the encapsulation and programming model needed for a clear separation between presentation and business logic.
There are several parts in Metal Tracer that require special functionality. For those parts, we developed custom java classes that complete their task and turn back to ColdFusion with the results.
An example of them is Load Maker. Because of the massive physical nature of steel and all metal products load limits and travel parameters are standardized. Within each of the transportation methods (truck, rail or vessel), each load must be no greater than a regulated weight, although regardless of load weight, the cost of transport is static. Therefore, the primary objective in shipping is to maximize weight, per load, while maintaining regulated standards.
A java load distribution program insures the lowest transportation cost per unit transported. It distributes items in the most efficient way to maximize weight per load, and minimize total number of loads.
Thanks to the ease of communication between ColdFusion and Java, when a buyer is ready to make the purchase, ColdFusion will call the distribution Java program and it will receive back all the loads calculated.
One important feature of Metal Tracer is a notification system that let customers know of newly added items. Metal Tracer's methods of notification are: e-mail, fax, cellular messaging and instant messaging through the popular messaging systems Yahoo!, MSN, ICQ and AOL. This completely integrated java system runs as a service in a different server. It directly communicates with MS SQL database to get new items information and customer notification preferences. Using Java Messaging Server, it maintains a queue of messages to be sent in the many different ways to the customers. For the instant messages, it logs onto the systems as MetalTracer buddy and delivers the messages. In some instances it would store the message until the client logs in onto the messaging system.
Because each delivery method requires a different format (i.e.: e-mail contains graphics and link whereas a fax only contains text), we use Xalan-Java to make XSL Transformations (XSLT) from the same sources. Therefore, we use the same source message transmitted by JMS and formatted by a XSL template.
Another java component is used to prepare every uploaded picture of inventory items. Pictures are resized and a thumbnail is created.
Further Integration
Because many providers supply Metal Tracer of inventory, it was necessary to develop a system flexible enough to be able to handle all the different formats in which inventory data was presented. By means of a java program that reads Excel files, we developed a system of templates by which any time a new format (or a new supplier) arrives, the administrator can define each field data to match with Metal Tracer's own set of ids and definitions.
These new items will later be matched with photographs and prices through a proprietary system developed in .NET for the Tablet PC. This program also utilizes the Canon SDK for the Powershot camera. From the tablet PC, it takes control over the attached camera, allowing zooming, modifying lighting settings and shooting mode. It takes then a bar code scanned from the tablet pc and prepares the data to be sent to Cold Fusion. Through a web service, ColdFusion receives photographs and scanned ids along with some other information. The puzzle then is completed: data from the suppliers is matched to photographs and barcode number and items are ready to be presented to the market.
To print and create the bar codes and items IDs we have also developed a proprietary application. It uses Apache Axis to connect to a ColdFusion web service that provides unique sequences of IDs. The program takes those sequences and prints the specified amount of barcodes stickers to be placed on the items themselves. These barcodes are what the tablet PC then scans. This system guarantees unique IDs for every item throughout the offline photographing and scanning system among the different Metal Tracer agents that may be working simultaneously.
|