Raju's GUI Classes are highly flexible, yet simple to Build & Use | ||
The power of the ready-to-assemble and replaceable parts is, the ease at which one can build component hierarchies. One could employ intelligent and highly customizable GUI Classes to build parts of large image (i.e. interactive component). This substantially cuts development effort (once we have sufficient number of fine grained reusable GUI building blocks, by using them again and again). For example, consider a pie chart has three parts: a Title, Legend, pop-up tool-tips and of course the Pie-chart. How can we make each part, for example the Title, highly customizable? Answer
is quite simple, just allow any CCG (GUI or CF Object) for the Title: The CF for title can be any other GUI Component: It can be a scrolling stock ticker that gets stock quotes using Ajax methods; or any other chart such as line chart. No restrictions, what so ever (except of course the space allotted on the screen, if don't wish to see the Title component in scrolled area-please see below). This same technique can be used for each of the subcomponents.
|
Please install Adobe's SVG-Viewer 3.0 (ASV3.0) plug-in from Adobe-site to view the SVG Components (& Proof): http://www.adobe.com/svg/viewer/install/ |
Please move the mouse over to the Legends. |
|
Layout
Code in JSP format for a chart that has following parts: |
// Location to Place the Title of the chart <g transform="translate(0,0)"> <% Title.CGM(out); %> // Call CCG's CGM to place Title's Code here </g> // Location to Place Code for Chart <g transform="translate(0,25)"> // Start Drawing area for chart <% DrawChart.CGM(out); %> </g> // End Drawing Area for chart // Location to Place the Code for the Legend <g transform="translate(0,250)"> <% Legend.CGM(out); %> // call CGM-Code Generation Method </g> // Here includes "integration logic" which generates communication // code for the three subcomponents to collaborate with each other. |
The above JSP code is equivalent to the following 3-lines |
Title.CGM(out,0,0,null);
//
Place at X-Y-location: 0,0 DrawChart.CGM(out,0,25,null); // Place below leaving 25 for Title Legend.CGM(out,0,250,null); // Place right side of Chart leaving 250 // Here includes "integration logic" which generates communication // code for the three subcomponents to collaborate with each other. |
//If you want an info table
to show data up on mouse over a part Table.CGM(out,275,0,null); // Place below Chart leaving 250 // Include communication code to send data to Table for display |
Please Scroll the Legends. If a component is bigger than the place allocated, it is possible to display it automatically in scrolled area |
The GUI Class for the above Tab component can be designed to take an array of subcomponents and an array that contains Titles/CCGs for the respective tabs. |
For example: (The
following CFs/CCGs for the charts are usually Dynamic Data Driven) |
Please
notice the unprecedented ease for building Component hierarchies! |
Note: To understand how it works, please think each part (i.e. subcomponent) is just a GIF image. JavaScript is embedded to make them intelligent and interactive, but JavaScript should not let you think that they are different from ordinary GIF images. We demonstrated many example to prove that, absolutely there is no reason left why XML images need to be treated differently than GIF images. Now you should not have any problem to imagine, how to combine various parts (i.e. image fragments) as Lego blocks to build larger and larger image hierarchy. |
Many smart people trouble understanding simple logic: To build superior online GUI applications, we need superior reusable Ajax GUI-Classes than possible for any traditional GUI platforms such as Java/Swing or Windows/VC++.Aren't we building the desktop GUI applications for nearly quarter century? Then don't we know, what is the required capabilities for a complete reusable GUI Class? The web site has more than sufficient evidence to prove that it is possible to create reusable GUI Class for any GUI component one can find on any traditional GUI applications. |
One needs to compose many GUI components to build the Applications. The cost and complexity of the application is directly proportional to the cost of composing or integration of the components. No other GUI platform can offer simpler or better ways for composing component hierarchies or abstractions. Hence Raju’s GUI-API can offer superior GUI platform than possible for the traditional GUI platforms. |
Although, any new framework takes time to master, the CBSDF is the most easy to work with and takes less time to master than any other GUI frameworks. |
Just
instantiate, use simple set-methods to input data/subcomponents to
initialize and call its CGM to display great interactive GUI
Component |
What
else the Online GUI-API needs to be widely used and successful? ... |
Future web applications will be richer than the rich desktop applications! |
Appendix-A |
The Raju’s GUI framework offers excellent component reuse and flexibility for the GUI Widget designers and end users. The objective of the following is to show how one may be able to build large GUI Widgets using one or more fine-grained GUI Widgets. |
To illustrate this, lets consider an example of how a Chart component vendor may create reusable GUI Widgets for many charts. Usually charts support many layout options, some of them are shown in the following figure. |
|
The following is pseudo code for a generic Chart Class, which implements most of the Chart functionality and layout. It uses fine-grained Widgets to build subcomponents such as Legend, ToolTip and Title. |
//
Copyright(c) 2004 All Rights Reserved...Raju Chiluvuri
Object Title =
null;
int chart_x = 0,
chart_y = 0;
public ToolTip Tips[] =
null;
// Constructor, which also initializes the Object.
int setLegentNames(Strings
names[], int count, int colors[]) {
// if special icons/components need to be
used.
// Caliculates the layout coordinates
// The Pseudo Code Generation Method:
CGM
public int CGM (PrintWriter out) {
// Here includes "integration
logic" to generate communication
// The Chart component must implement this
Abstract method. //
The following two methods must be implemented in this class
// Please see the note below. This function writes code for
//Just find a way to get code for component/image
(nothing fancy) |
Then one needs to implement the Chart to fill the chart area. The following is pseudo code for bar chart. Since all the generic functionality is implemented in the base class, there is very little else is left for this class. |
//
Copyright(c) 2004 All Rights Reserved...Raju Chiluvuri //
Other basic Widgets and utilities, such as
// Constructor, which also initializes the Object.
//The following methods are called in the CGM of
base class. |
Note
for the function GetComponentCode:
All of our GUI Widgets can take either GUI Widgets or pure raw SVG/HTML
code for most subcomponents. For example, one may pass a GUI Objects or
SVG code for chart Title. For example: The raw SVG statement eliminates nearly 10 calls to set each style attribute for GUI Widget for Text. On the other hand this raw SVG approach may not be portable to different viewers. However, we feel that for HTML the raw HTML is better for many cases. I wanted to give full flexibility, while providing higher level component abstraction. I think, Java developers should have basic knowledge of HTML and should be able to use it, if they feel it necessary. These ideas are reflected in my first prototype testing of GUI Widget for HTML Table (That was badly coded, because it was only to see, if it really works). Please click here for sample GUI Widget for HTML table. Choice is great thing. If I am the architect of GUI Widgets, you know what I do. But others vendors may prevent developers from using raw HTML/SVG code. Developers can choose what ever best suites his needs. In fact, the choice is not either this or that. One can use some Objects from one vendor's GUI-API and others from another's GUI-API in the same page (as shown in the function GetComponentCode). Raju's GUI-API can co-exist with any other frameworks. For example, one may even use just one GUI Object in his application along with other Ajax frameworks. Just instantiate, initialize and call its CGM() ... Isn't it simple? Please download class library, which contains base classes & utilities. The total code is about 300 lines. That's it. One can start creating great Ajax GUI classes in no time, if he gets license from Pioneer-soft. He owns his source code and no vendor lock-in. |
|