wiki:BluePrintGISLayerClass

Version 1 (modified by Fran Boon, 16 years ago) ( diff )

--

The GIS module may benefit from writing a LAYER class.
Layer Types would extend this base class.

Each Layer Type would be a single Table & hence could use the standard RESTlike controller.
This should ease maintenance compared to the current process.

Have the Map Service Catalogue have a tab per Type(*).
Each has its own self-processing SQLFORM (generated by T2)
(This would make it like S2, which works well)

It should make us friendlier to non-JavaScript browsers (such as Mobile devices), since currently we rely on gis_layers.js to show us only relevant fields. (An alternative use for this script would be to pull in new SQLFORM object via ?format=plain instead of adjusting fields displayed/hidden).

This gives us better control of the display order for Layers & better modularity of Layer-processing JS code (1 file per layer type).

*: Alternatives could be collapsible sections (like appadmin) or submenus on left-hand navigation.

--- Objects contain both data and functionality together.
A Class in essence defines a new data type.

=> The Class is not the Controller alone, but the Resource (including Controller)
=> Each Resource type should extend a base Resource (which extends...?)

Currently our resources are defined in the model & hence of type gluon.sql.SQLTable (inc SQLFields)


NB A similar solution probably applies for 'PERSON' as well.


GIS BluePrints

Note: See TracWiki for help on using the wiki.