The people   Coding standards   Design   Rewrite rule   TODO   DONE   Sun Java  

Javadocs   Class Hierarchy   Index   NAWS   MTRX   security   servlets   Skang   Squeal & Stuff   zen developer  


DONE

This is a temporary holding area for TODO items that are now DONE. Since I tend to write a large amount of descriptive text for TODO items, it is useful to use that as the starting point for documenting them once they are DONE. However, until I pull my finger out, the relevant text will just be cut and pasted into here. Note that some items that have not been DONE may get dragged into here, they will get dragged back when I pull my finger out. Also note that the DONE item may differ from the TODO item, but the documentation here will reflect the TODO item.


External

GetParameters currently scans through the current set of parameters each time a new module is loaded. This reprocesses all the old modules parameters, we should fix that. While args is an array of strings, and .properties is a Hashtable, applet parameters can only be accessed by name, making it hard to just list what we where passed. Gotta worry about important things like modules and skinURL getting overwritten by later modules.

New parameter parsing method. Get rid of "modules" USAGE parameter. Parameters are parsed in this order -

At any time during this, modules may be added or skang files may be run. This does not affect the first two in the above list. Everything else may be refering to new stuff in the new module. For properties and skang files, add any module BEFORE you use it's stuff. For the "After new modules" args, they will only set predifined things, not run new modules. While skinURL may be reset at this point, it won't change, and we have already processed it.

Command line args are String[]. Servlet (init, headers, cookies, parameters) args can be an Enumeration of Strings, or String getParameter(String name). Applet args are only String getParameter(String name).

Make the command line parameter getting MUCH more intelligent, try to support the common command line interfaces :- Ignore /,-,--,& except as arg introducers. Use = as value introducer. Expect arg or a. If type is String, expect a value. If type is integer, and next token is not an integer, increment current value, otherwise expect integer value. If type is boolean, value beginning with T, t, F, f, etc is true, otherwise value is false, unless next token starts with an introducer, then value is true.

For all parameters, keep track of the default, and where all the values came from. We can keep a priority stack of value/source pairs. Then we can intelligently decide what to write to .properties files. At any stage we can look at this stack to decide what the current value is, without having to process the sources in the proper order.
Make ThingSpace.params static, manage values through per user ThingSpace.sortedParameters and groking.
    ThingSpace.grokParameters(int aPriority, *)				- set sortedParameters[aPriority] from *
    ThingSpace.ungrokParameters(boolean shouldSet, String aName)	- maybe set Parameter aName from sortedParameters, 
									  return value
    ThingSpace.groakParameters(int aPriority, boolean inFullness)	- clear sortedParameters[aPriority]
									  maybe grokInFullness(null)
    ThingSpace.grokInFullness(ThingSpace that)				- set all Parameters from sortedParameters
									  if that, do it for that and create Parameters in that (used in ThingSpace.copy())
    ThingSpace.regrokAppletParameters(Skang base)			- grok(this, APPLET, , ) then ungrok(, true, )
									  with values from ((Applet)base).getParameter(thing.name)
									  only done during Skang.init, first time.


Squeal

Playing with OpenCMS's ContentDefinition has taught me the value of generalizing collections of stuff. I should do something similar. For the following, we could replace "table" with "ContentDefinition", then ContentDefinition becomes an abstraction layer. I should think this through carefully. Should call it "Stuff".

Things have a name which is the default field name, anything with a blank table name is not a database field. Things inherit their table name from their parent Thing.

Typical usage is that a window has a table asigned to it, it's widgets have fields assigned to them, but they default to the windows table.


Squeal.java
-----------

Vector  squealAtVector(String, boolean)
boolean squealOutOfDatabase(String, String, String, String)
boolean squealAtDatabase(String, String, String, String, Hashtable)
boolean squealIntoDatabase(String, String, String, Hashtable)

| -> %P
% -> %%

Vector
    if boolean then first element is ResultSetMetaData
    Each element is a Hashtable row
	Each row is String fieldName, String value pairs
4
fieldName|subStuff|meta,meta,meta
fieldName|subStuff|meta,meta,meta
fieldName|subStuff|meta,meta,meta
fieldName|subStuff|meta,meta,meta
3
value|value|value|value
value|value|value|value
value|value|value|value


Hashtable
	String fieldName, String value pairs

fieldName=value|fieldName=value|fieldName=value|fieldName=value


Problem types
    CHAR   - must escape or quote '|'
    BINARY - raw bytes
    NULL   -
    OTHER  - Object

ResultSetMetaData
		try
			{cols = meta.getColumnCount();}
		catch (Exception e)

	public MetaData(int column, String aName, ResultSetMetaData meta) throws SQLException
	{
		this( (aName == null) ? meta.getColumnName(column) : aName,
			meta.getColumnLabel(column),
			meta.getColumnType(column),
			meta.getColumnDisplaySize(column),
			meta.getPrecision(column),
			meta.getScale(column),
			meta.isNullable(column) == ResultSetMetaData.columnNullable,
			meta.isSigned(column),
			meta.isCurrency(column));
		this.isSQL = true;
	}

	public MetaData(String aName, String aHeading, int anSQLType, int aWidth, int aPrecision, int aScale, boolean maybeNullable, boolean maybeSigned, boolean maybeCurrency)
aName = "fieldName|subStuff|meta,meta,meta"
					switch (index++)
					{
						case 0 :  aHeading      = meta;                                 break;
						case 1 :  anSQLType     = stringToSQLType(meta);                break;
						case 2 :  aWidth        = new Integer(meta).intValue();         break;
						case 3 :  aPrecision    = new Integer(meta).intValue();         break;
						case 4 :  aScale        = new Integer(meta).intValue();         break;
						case 5 :  maybeNullable = What.isBoolean(meta).booleanValue();  break;
						case 6 :  maybeSigned   = What.isBoolean(meta).booleanValue();  break;
						case 7 :  maybeCurrency = What.isBoolean(meta).booleanValue();  break;
					}


This file was last modified on Saturday, 16-Jul-2005 08:25:48 EST