Sinclair x ZK Framework Part 2

A Developer's Diary by Ron Grimes

The Project: Sinclair Distributor Services Web App

The Distributor Services web application is designed to meet the needs of the wholesale customers of Sinclair Oil Corporation. This is where hundreds of users come daily to view their Sinclair Oil related business documents, which includes invoices, draft notices, credit memos, chargebacks, adjustments, fuel price history, along with several other business critical reports and features.

This project was designed as a business portal layout due to how it lends itself to user-specific content. For each distributor, we initially assign a single administrator login, who then may in turn define as many users as s/he likes for their business. The administrator may give such users as much, or as little, authority to view business documents as the administrator sees fit. This authority can be limited by document type (e.g., invoices, price history, credit memos) and it can also be limited to a list of authorized locations (e.g., fuel stations). This authority definition, at the user level, determines which portlets each user may add to their portal. This design also allows each portlet to be “maximized” to take up the entire portlet area, and thereby allowing for easier navigation of the data.
The individual user has the flexibility to define, from the ‘Add Content’ panel, which of their authorized portlets will actually appear upon each login. When a portlet is initially added to the layout, the user may define the column where it will appear. S/he may also move the portlets around, via drag and drop, and the application will remember the user’s choice of column and row for each portlet so that it appears in the same order the next time they log in.


The design is deliberately a muted color theme, with only the focused portlet (determined by mouseover) coming to “life” with a more colorful theme, along with the appearance of buttons , links and a ‘Selection Criteria’ section that are not activated on non-focused portlets. This keeps the screen from appearing too busy where everything is demanding the users’ attention at once.
Not only may the user define which portlets are automatically shown upon login, but which set of data is pre-loaded for each portlet. This is accomplished by letting the user define a “launch rule”. To illustrate, assume today is Jan 3, 2013 and the user selects “ALL” authorized locations and a date range of Jan 1, 2013 thru Jan 3, 2013. The user may then use these selection criteria as the basis to create an automatic launch rule for the given portlet. In this case, the rule would be, “Upon login, automatically show me all credit memo batches, for ALL authorized locations, for 2 days ago through today.”

The application is designed to store a different launch rule for each portlet, further increasing the user’s productivity as s/he visits the Sinclair portal.
Every portlet, and every pop-up detail window, has the option to export the displayed data as a delimited file, PDF document, or Excel spreadsheet.
Most portlets also have the ability built-in to drill down, or up. For example, the following “Batch Summary” appears, as a pop-up, when the user clicks batch number 4230682 within the “Credit Memo Batches” portlet.
The application also allows for a one-way communication mechanism from Sinclair Oil to its wholesale customers. This is accomplished through two non-removable panels, within the left sidebar.


First, is the “Announcements/Resources” panel, which provides links to resources and announcements that Sinclair wants available to the customer for a longer term.
Second, is our “Sinclair Alerts” panel, where we can immediately push messages out to a single customer or a group of customers. The alerts are of four types: Emergency, General Info, Pricing Changes, and Supply issues, and are intended to be of a shorter life, having a 5 day lifespan and availability.

Summary

It has been our goal to provide to our wholesale customers with on-demand business documents, as well as real time communications that might impact the distributor’s business planning and operations. This has provided an element of efficiency on both ends. Sinclair no longer has to pull physical documents that the distributor may have lost and needs another copy of it; thus consuming Sinclair’s internal staffing resources. And, due to the applications’ capacity to allow a user to define his/her own portal content, along with automatic pre-loading of relevant data, the time they have to spend retrieving information for their balancing, reconciliation, and other processes, is greatly reduced.

In addition, the business portal layout design, more effectively accommodates both desktop and tablet devices. This represents the second generation of the Distributor Services web application. The first iteration was written nearly 10 years ago as a DHTML/J2EE application that was really only designed to work with Internet Explorer, since the audience was limited and Internet Explorer owned a browser market share in the mid-90 percentile. So, at the time, for a one person web application developer shop, it seemed like a good economy of resources. But, over the years, that design decision has created its share of problems with the advent of Firefox and the rather recent demand that web applications be responsively designed.

The ZK framework now provides cover for the developer in multiple ways through its responsive design built into version 6.5 and its HTML5/jQuery solution on the client-side.

You can download the PDF version of this article here or read part 1.

About Potix

Potix Corporation develops and supports highly productive open source solutions in the area of Java and growing Dart. Our flagship product ZK, is the leading Java web framework for enterprise level web & mobile applications. Leveraging the powers of Dart & HTML 5, Rikulo is a framework for creating cross-platform web & native mobile applications.

Innovation is the most driving force behind the growing Potix. Potix delivered the first Server+client Fusion architecture, first embeddable Java web spreadsheet, first true pivot table and first Ajax framework to bring applications from mouse to touch in one codebase and component set.

About Sinclair

Sinclair Services Company is the parent corporation for Sinclair Oil Corporation, Little America hotel chain, Grand America hotel, Westgate hotel, Snowbasin resort, Sun Valley resort (Idaho), and Sunlight Ranch.