Re: [WebDNA] [store] and [recall]: default db location

This WebDNA talk-list message is from

2015


It keeps the original formatting.
numero = 112080
interpreted = N
texte = This is a very good idea. It would ensure that if a site was written for server edition it could = very easily be moved to fcgi version without having to muck around = ensuring global paths are converted. > On 7 Feb 2015, at 4:53 am, Donovan Brooke wrote: >=20 > A much more intelligent and useful improvement to the two products = relating to this would be to unify the functionality of the =93^=94 = character. >=20 > I propose this: > The default of =93^=94 is as always /Globals/ >=20 > Unless there is a path that is set in the WebDNA preferences.. then = use that.=20 >=20 > Server: > The path would be like any other pref.. and for the Server version, = which > utilizes sandboxes, the sandbox pref would only apply to within the = sandbox. >=20 > FastCGI: Path would point to whatever directory the FastCGI has = permissions > to access.=20 >=20 > Simple.. powerful.=20 >=20 > Donovan >=20 >=20 >=20 >=20 > On Feb 6, 2015, at 11:31 AM, Donovan Brooke wrote: >=20 >> Currently we have the =93^=94 character that points to a global = scope. >>=20 >> We also have the pre and post parse scripts. >>=20 >> What is so difficult about setting variables in the prepares script? >>=20 >> [text]constant1=3Dblah[/text] >> [math]pi=3D3.141592653[/math] >>=20 >>=20 >> If you need to have them in a database so that you can =91store=92 = and =91recall=92 a single value....=20 >>=20 >> simply create your reserved.db in globals.. >> =85.reserved.db=85 >> RE_NAMERE_VALUE >> constant1blah >>=20 >> then do this in your prepares script: >>=20 >> [function name=3Drecall] >> [return][lookup = db=3D^reserved.db&lookinfield=3DRE_NAME&value=3D[params_string]&returnfiel= d=3DRE_VALUE¬found=3DNF][/return] >> [/function] >>=20 >>=20 >> Then do this on any page server wide. >> [recall constant1] >>=20 >> or to save: >>=20 >> preparse script: >> [function name=3Dstore] >>=20 >> [/function name=3Dstore] >> [replace = db=3D^reserved.db&eqRE_NAMEdata=3D[name]&append=3DT]RE_VALUE=3D[value][/re= place] >> [/function] >>=20 >> To call it, use this in your page: >> [store name=3Dconstant1&value=3Dblah] >>=20 >>=20 >> There are many more options / variations to creating constants (that = amazing survive a reboot) ;-) too..=20 >>=20 >> ?? >>=20 >> I don=92t get it.=20 >>=20 >> Donovan >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >> On Feb 6, 2015, at 11:10 AM, Donovan Brooke wrote: >>=20 >>> I have an idea.. let=92s publicly spend resources rewriting the = WebDNA engine with basic tags and contexts that do things we already >>> easily have the ability to do, but with less power and different = names. >>>=20 >>> Donovan >>>=20 >>>=20 >>>=20 >>>=20 >>> On Feb 6, 2015, at 6:18 AM, Kenneth Grome = wrote: >>>=20 >>>>> A default "central" reserved.db is not a bad idea (could be=20 >>>>> stored inside /WebDNA folder) ... >>>>=20 >>>> I agree. I think the default location of reserved.db should be >>>> the /WebDNA folder since this is where all the other required db >>>> files are stored, at least in the FastCGI version. >>>>=20 >>>>=20 >>>>> but it would store all the information for the website which=20 >>>>> could make it big and difficult to handle ... >>>>=20 >>>> Why would it matter if the same volume of data were stored in a >>>> single db or in separate dbs? It's still the same amount of data >>>> either way. Or will the reserved.db work differently than our >>>> other dbs? >>>>=20 >>>> One thing that actually SHOULD work differently is that this db >>>> should ignore the prefs and be flushed to disk every time [store] >>>> is used. Otherwise newly stored values might be lost. >>>>=20 >>>>=20 >>>>> Then we will anyway have [store=20 >>>>> path=3D../../admin/reserved.db]var1=3DJoe[/store] and [recall=20 >>>>> var1&path=3D../../admin/reserved.db] to add flexibility. >>>>=20 >>>> Exactly! But here's another way to add similar flexibility: >>>>=20 >>>> Use these tags for the default server-wide scope: >>>>=20 >>>> [store]var1=3DJoe[/store] >>>> [recall var1] >>>>=20 >>>> Then use these for local scope which will default to using the >>>> reserved.db in the same folder: >>>>=20 >>>> [localStore]var1=3DJoe[/localStore] >>>> [localRecall var1] >>>>=20 >>>> Then if you really want to be flexible, allow the path option to >>>> be used in these "local scope" tags like this: >>>>=20 >>>> [localStore path=3Da/b/c/reserved.db]var1=3DJoe[/localStore] >>>> [localRecall name=3Dvar1&path=3Da/b/c/reserved.db] >>>>=20 >>>> But never allow the path option in the default [store] and >>>> [recall] tags -- because the default reserved.db will always be >>>> located in the /WebDNA folder, or in the location specified in the >>>> preference file which in this case is webdna.ini. >>>>=20 >>>> Using this approach means we have the flexibility to move our >>>> default reserved.db file somewhere else other than the /WebDNA >>>> folder, but there will still be only one default reserved.db file >>>> for WebDNA to deal with when it encounters [store] and [recall]. >>>> Any other reserved.db files will be referenced by [localstore] and >>>> [localrecall] and their locations will be the same folder when no >>>> path is specified, or optionally location specified by the path >>>> parameter. >>>>=20 >>>> :) >>>>=20 >>>> Regards, >>>> Kenneth Grome >>>> WebDNA Solutions >>>> http://www.webdnasolutions.com >>>> Web Database Systems and Linux Server Management >>>>=20 >>>> --------------------------------------------------------- >>>> This message is sent to you because you are subscribed to >>>> the mailing list . >>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>> Bug Reporting: support@webdna.us >>>=20 >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> Bug Reporting: support@webdna.us >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] [store] and [recall]: default db location (WebDNA TPP 2015)
  2. Re: [WebDNA] [store] and [recall]: default db location (Terry Wilson 2015)
  3. Re: [WebDNA] [store] and [recall]: default db location (Donovan Brooke 2015)
  4. Re: [WebDNA] [store] and [recall]: default db location (Donovan Brooke 2015)
  5. Re: [WebDNA] [store] and [recall]: default db location (Donovan Brooke 2015)
  6. Re: [WebDNA] [store] and [recall]: default db location (christophe.billiottet@webdna.us 2015)
  7. Re: [WebDNA] [store] and [recall]: default db location (Kenneth Grome 2015)
  8. Re: [WebDNA] [store] and [recall]: default db location (christophe.billiottet@webdna.us 2015)
  9. [WebDNA] [store] and [recall]: default db location (Kenneth Grome 2015)
This is a very good idea. It would ensure that if a site was written for server edition it could = very easily be moved to fcgi version without having to muck around = ensuring global paths are converted. > On 7 Feb 2015, at 4:53 am, Donovan Brooke wrote: >=20 > A much more intelligent and useful improvement to the two products = relating to this would be to unify the functionality of the =93^=94 = character. >=20 > I propose this: > The default of =93^=94 is as always /Globals/ >=20 > Unless there is a path that is set in the WebDNA preferences.. then = use that.=20 >=20 > Server: > The path would be like any other pref.. and for the Server version, = which > utilizes sandboxes, the sandbox pref would only apply to within the = sandbox. >=20 > FastCGI: Path would point to whatever directory the FastCGI has = permissions > to access.=20 >=20 > Simple.. powerful.=20 >=20 > Donovan >=20 >=20 >=20 >=20 > On Feb 6, 2015, at 11:31 AM, Donovan Brooke wrote: >=20 >> Currently we have the =93^=94 character that points to a global = scope. >>=20 >> We also have the pre and post parse scripts. >>=20 >> What is so difficult about setting variables in the prepares script? >>=20 >> [text]constant1=3Dblah[/text] >> [math]pi=3D3.141592653[/math] >>=20 >>=20 >> If you need to have them in a database so that you can =91store=92 = and =91recall=92 a single value....=20 >>=20 >> simply create your reserved.db in globals.. >> =85.reserved.db=85 >> RE_NAMERE_VALUE >> constant1blah >>=20 >> then do this in your prepares script: >>=20 >> [function name=3Drecall] >> [return][lookup = db=3D^reserved.db&lookinfield=3DRE_NAME&value=3D[params_string]&returnfiel= d=3DRE_VALUE¬found=3DNF][/return] >> [/function] >>=20 >>=20 >> Then do this on any page server wide. >> [recall constant1] >>=20 >> or to save: >>=20 >> preparse script: >> [function name=3Dstore] >>=20 >> [/function name=3Dstore] >> [replace = db=3D^reserved.db&eqRE_NAMEdata=3D[name]&append=3DT]RE_VALUE=3D[value][/re= place] >> [/function] >>=20 >> To call it, use this in your page: >> [store name=3Dconstant1&value=3Dblah] >>=20 >>=20 >> There are many more options / variations to creating constants (that = amazing survive a reboot) ;-) too..=20 >>=20 >> ?? >>=20 >> I don=92t get it.=20 >>=20 >> Donovan >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >> On Feb 6, 2015, at 11:10 AM, Donovan Brooke wrote: >>=20 >>> I have an idea.. let=92s publicly spend resources rewriting the = WebDNA engine with basic tags and contexts that do things we already >>> easily have the ability to do, but with less power and different = names. >>>=20 >>> Donovan >>>=20 >>>=20 >>>=20 >>>=20 >>> On Feb 6, 2015, at 6:18 AM, Kenneth Grome = wrote: >>>=20 >>>>> A default "central" reserved.db is not a bad idea (could be=20 >>>>> stored inside /WebDNA folder) ... >>>>=20 >>>> I agree. I think the default location of reserved.db should be >>>> the /WebDNA folder since this is where all the other required db >>>> files are stored, at least in the FastCGI version. >>>>=20 >>>>=20 >>>>> but it would store all the information for the website which=20 >>>>> could make it big and difficult to handle ... >>>>=20 >>>> Why would it matter if the same volume of data were stored in a >>>> single db or in separate dbs? It's still the same amount of data >>>> either way. Or will the reserved.db work differently than our >>>> other dbs? >>>>=20 >>>> One thing that actually SHOULD work differently is that this db >>>> should ignore the prefs and be flushed to disk every time [store] >>>> is used. Otherwise newly stored values might be lost. >>>>=20 >>>>=20 >>>>> Then we will anyway have [store=20 >>>>> path=3D../../admin/reserved.db]var1=3DJoe[/store] and [recall=20 >>>>> var1&path=3D../../admin/reserved.db] to add flexibility. >>>>=20 >>>> Exactly! But here's another way to add similar flexibility: >>>>=20 >>>> Use these tags for the default server-wide scope: >>>>=20 >>>> [store]var1=3DJoe[/store] >>>> [recall var1] >>>>=20 >>>> Then use these for local scope which will default to using the >>>> reserved.db in the same folder: >>>>=20 >>>> [localStore]var1=3DJoe[/localStore] >>>> [localRecall var1] >>>>=20 >>>> Then if you really want to be flexible, allow the path option to >>>> be used in these "local scope" tags like this: >>>>=20 >>>> [localStore path=3Da/b/c/reserved.db]var1=3DJoe[/localStore] >>>> [localRecall name=3Dvar1&path=3Da/b/c/reserved.db] >>>>=20 >>>> But never allow the path option in the default [store] and >>>> [recall] tags -- because the default reserved.db will always be >>>> located in the /WebDNA folder, or in the location specified in the >>>> preference file which in this case is webdna.ini. >>>>=20 >>>> Using this approach means we have the flexibility to move our >>>> default reserved.db file somewhere else other than the /WebDNA >>>> folder, but there will still be only one default reserved.db file >>>> for WebDNA to deal with when it encounters [store] and [recall]. >>>> Any other reserved.db files will be referenced by [localstore] and >>>> [localrecall] and their locations will be the same folder when no >>>> path is specified, or optionally location specified by the path >>>> parameter. >>>>=20 >>>> :) >>>>=20 >>>> Regards, >>>> Kenneth Grome >>>> WebDNA Solutions >>>> http://www.webdnasolutions.com >>>> Web Database Systems and Linux Server Management >>>>=20 >>>> --------------------------------------------------------- >>>> This message is sent to you because you are subscribed to >>>> the mailing list . >>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us >>>> Bug Reporting: support@webdna.us >>>=20 >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> Bug Reporting: support@webdna.us >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us WebDNA TPP

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

wild question (1998) I give up!! (1997) File commands and Wild Cards ?? (1998) Fun with dates (1997) [OT] Moving to Wisconsin (2002) [/application] error? (1997) Price written to db as scientific notation??? (1999) Credit Card Number checking (1997) Upgrade to WebCat2 from Commerce Lite (1997) Summing fields (1997) syntax question, not in online refernce (1997) CGI Request Time Out (1997) Up and running ... at last !! (1997) A few questions. . . (1997) shell problems again... (2003) WebCatalog can't find database (1997) Bug or syntax error on my part? (1997) [WebDNA] Encrypted templates (2009) Bug? (1997) multi-paragraph fields (1997)