| | 1 | The GIS module may benefit from writing a LAYER class.[[BR]] |
| | 2 | Layer Types would extend this base class. |
| | 3 | |
| | 4 | Each Layer Type would be a single Table & hence could use the standard RESTlike controller.[[BR]] |
| | 5 | This should ease maintenance compared to the [wiki:DeveloperGuidelinesGIS current process]. |
| | 6 | |
| | 7 | Have the Map Service Catalogue have a tab per Type(*).[[BR]] |
| | 8 | Each has its own self-processing SQLFORM (generated by T2)[[BR]] |
| | 9 | (This would make it like S2, which works well) |
| | 10 | |
| | 11 | 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). |
| | 12 | |
| | 13 | This gives us better control of the display order for Layers & better modularity of Layer-processing JS code (1 file per layer type). |
| | 14 | |
| | 15 | *: Alternatives could be collapsible sections (like appadmin) or submenus on left-hand navigation. |
| | 16 | |
| | 17 | * [http://jqueryfordesigners.com/jquery-tabs/ JQuery-Tabs]: "if the markup is well designed, it will automatically degrade nicely without JavaScript enabled" |
| | 18 | --- |
| | 19 | Objects contain both data and functionality together.[[BR]] |
| | 20 | A Class in essence defines a new data type.[[BR]] |
| | 21 | => The Class is not the Controller alone, but the Resource (including Controller)[[BR]] |
| | 22 | => Each Resource type should extend a base Resource (which extends...?)[[BR]] |
| | 23 | Currently our resources are defined in the model & hence of type gluon.sql.SQLTable (inc SQLFields) |
| | 24 | * http://openbookproject.net/thinkcs/python/english2e/ch13.xhtml |
| | 25 | * http://diveintopython.org/object_oriented_framework/defining_classes.html |
| | 26 | * http://www.freenetpages.co.uk/hp/alan.gauld/tutclass.htm |
| | 27 | ---- |
| | 28 | NB A similar solution probably applies for 'PERSON' as well. |
| | 29 | ---- |
| | 30 | [wiki:BluePrintGeographicInformationSystems GIS BluePrints] |