Knop has support for quite liberal folder structures in knop_nav now. This lets you group files of different types (cfg, lib, act and cnt) together in folders to me able to modularize a solution. For example all files relating to customer could be kept in a _mod_customer folder. It might also be preferable to put all Knop related files in a single sub directory _knop. It also lets you choose how you want to name the files, with name prefixes, suffixes or file extensions.
It's mostly automatic, you only have to tell knop if you use .inc extensions or different extensions. This is specified with a new parameter -filenaming when creating the top level nav object. -filenaming can be one of prefix, suffix or extension.
Prefix is "the old way". lib_customer.inc. This is the default if -filenaming is not specified. Suffix is a hybrid, for example customer_lib.inc. Extension is the "Greg way", for example customer.lib
The use of -filenaming is entirely optional. The default is prefix.
So now we look for includes in no less than 10 locations, and with 3 different file naming schemes we have 30 possible variations. The principle is to start looking at the most specific location and then look at more and more generic locations, to be able to do the local override.
For example to find the lib file for the path customer/edit:
A) -filenaming='prefix' (default) 1. _mod_customer/lib_customer_edit.inc // modular prefixed with module name 2. _mod_customer/lib_edit.inc // modular 3. _mod_customer/_library/lib_customer_edit.inc // modular separated, prefixed with module name 4. _mod_customer/_library/lib_edit.inc // modular separated 5. _library/lib_customer_edit.inc // collective ("all modules together") separated 6. _knop/_mod_customer/lib_customer_edit.inc 7. _knop/_mod_customer/lib_edit.inc 8. _knop/_mod_customer/_library/lib_customer_edit.inc 9. _knop/_mod_customer/_library/lib_edit.inc 10. _knop/_library/lib_customer_edit.inc
B) -filenaming='suffix' 1. _mod_customer/customer_edit_lib.inc // modular prefixed with module name 2. _mod_customer/edit_lib.inc // modular 3. _mod_customer/_library/customer_edit_lib.inc // modular separated, prefixed with module name 4. _mod_customer/_library/edit_lib.inc // modular separated 5. _library/customer_edit_lib.inc // collective ("all modules together") separated 6. _knop/_mod_customer/customer_edit_lib.inc 7. _knop/_mod_customer/edit_lib.inc 8. _knop/_mod_customer/_library/customer_edit_lib.inc 9. _knop/_mod_customer/_library/edit_lib.inc 10. _knop/_library/customer_edit_lib.inc
C) -filenaming='extension' 1. _mod_customer/customer_edit.lib // modular prefixed with module name 2. _mod_customer/edit.lib // modular 3. _mod_customer/_library/customer_edit.lib // modular separated, prefixed with module name 4. _mod_customer/_library/edit.lib // modular separated 5. _library/customer_edit.lib // collective ("all modules together") separated 6. _knop/_mod_customer/customer_edit.lib 7. _knop/_mod_customer/edit.lib 8. _knop/_mod_customer/_library/customer_edit.lib 9. _knop/_mod_customer/_library/edit.lib 10. _knop/_library/customer_edit.lib
It may look like a whole lot of work to do just to find an include but there is actually almost no measurable speed penalty for this. The entire search is typically performed in 1 ms.
-- Johan Sölve [FSA Member, Lasso Partner] Web Application/Lasso/FileMaker Developer MONTANIA SOFTWARE & SOLUTIONS http://www.montania.se mailto:joh-n@montania.se (spam-safe email address, replace '-' with 'a')
############################################################# This message is sent to you because you are subscribed to the mailing list <knop@lists.montania.se>. To unsubscribe, E-mail to: <knop-off@lists.montania.se> Send administrative queries to <knop-request@lists.montania.se> List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html Project homepage http://montania.se/projects/knop/ Google Code has the latest downloads at http://code.google.com/p/knop/
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!