System/Beta/Grid API

Grid API Usability Test

Here are the results of the Grid API Usability test. [JForum]programming/2006-June/002530

  1. Grid API Usability Test
    1. Requirements
  2. CSV Edit
    1. Tracking
    2. Notes
    3. Methods vs Commands
  3. CSV Grid
    1. Notes

Goal
  • Determine how fast and easy it is to create a simple Grid-based application

Process
  • Creating a simple Grid-based application and tracking the progress

Requirements

CSV Edit

CSV Edit is an application submitted by OlegKobchenko. See help inside the package for notes on installation and details of implementation.

csvedit.png

Tracking

Initial version development time and issue tracking. The following categories are used

app

general application code: menus, CSV processing, etc.

grid

grid-specific code

doc

using grid documentation

Tracking log

00:10 app basic isigraph window with menu
00:10 grid basic grid from grid_class.htm; column/row headers from grid_options.htm; - how to specify headers - PACK? HDRCOL, HDRROW, HDRTOP - why three header, should be 2, what's TOP? pack 'celldata HDRCOL' doesn't work,
00:05 doc how do I specify headers? ...take a break; docs should have info how to set options next to options grid_options.htm; trying demo... not helping, because it's not standalone
00:08 grid finally got headers: its 0 not i.20 for 0-based; works with and without pack -- what's pack for? grid seems to block menu shortcuts--no need to specify in code
00:30 app basic reading file and populating grid using 'csv' script
00:20 app debugging a stupid control error (elseif.) -- leaving basic read
00:15 app fixed control error with different control: euristic headers read
00:15 grid write using CSV write: problem: excessive quotes; handler for dirty/position?
00:10 doc unclear how to enable grid_handler: in debugger, it's 1: -- should grid_gridhandler: error in help or impl -- grid_events.htm error in example: select. control
00:30 grid dirty+indicator; position indicator status bar
00:20 app check dirty with save option
00:30 grid insert/append/delete column/row takes long time -- no API support
00:10 grid missing value - no supported for DEL key in grid; DEL key sets only top-left cells to 0, others to blank.
00:20 app fixed CSV output format: quote only comma, double quote
00:20 app made help HTML; Is it possible to bind grid to non-form locale?
00:40 grid edit headers - again, no support
00:20 grid select row/column, fixed insert/edit headers; How to start editing with keyboard preserving content
00:20 app finished help

Summarizing,

'T K'=: (0&".&>@{. ; <@{:)|:;:;._2 (0 : 0)
10 app
10 grid
...
)
   (~.K) ,. <@(24 60&#:)"0 K +//. T
+----+----+
|app |2 35|
+----+----+
|grid|2 43|
+----+----+
|doc |0 15|
+----+----+

Notes

I added some comments to these notes, and otherwise will try to address the points for the 601 release. (Marked [CB]) -- ChrisBurke 2006-06-26 03:00:41

Thanks Chris, I added a few reponses. (Marked [OK]) -- OlegKobchenko 2006-06-26 10:02:39

Methods vs Commands

[JUser]Grid Methods are high-level control functions, which modify the grid at large. For example, reading, writing data, setting selection, etc.

Grid Commands are yet undocumented functions which are invoked upon specific user actions with keyboard and mouse. For example, clear cells (DEL key), copy, paste, extend selection etc. Typically in editors, like wordprocesors, such commands are mapped to the user actions in a configurable way. It would be good to document them so that they can be used custom applications. For example, a command to start edit mode could be hooked up to a keyboard command (typically F2 on Windows and Enter on Mac).

CSV Grid

An interesting and useful exercise!

Here is another quick and dirty implementation, in the public repository. Download and load [WWW] csvgrid.ijs, then:

  run_pcsvgrid_'' 

and select a Demo to populate the grid.

I did not time individual steps, but it was roughly 4 hours app and 1 hour on the rest (grid + doc).

There are some features in CSV Edit not in CSV Grid, and vice versa.

Notes

Much of this functionality should be added to the core Grid code, for example:

Missing values need 3 definitions: value in file, value in actual data and value shown in grid. Where data is all numeric (as in the specs), the missing value in data itself has to be numeric (e.g. __).

It would be nice to have an method for defining cell type, for example, CSV files where the second row gives column type.

Other comments are appended to Oleg's notes above.

last edited 2006-07-05 15:11:13 by OlegKobchenko