Re: [WebDNA] feature request - .hdr files

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 106563
interpreted = N
texte = OMG, a 5 year old post of mine, and it's still relevant :) I've been extensively redoing 2 websites in WebDNA over the last few = months, and... Wow, did I write bad code in the old days, lol. I've come = to realize that the [function] tag is one of the most underutilized tag = that makes WebDNA closer to other programming languages.=20 Additionally, after playing with Django (Python) and Rails (Ruby) one of = the things that still irritates me the most about WebDNA is the = primitive handling of the databases. Specifically the header file. example: inventory.hdr (webdna) RID SKU AddDate ModDate ModTime OnWeb = status mfg model description prices.hdr PID SKU QTY PRICE updated_on the current header file is just the first title line from a tab = delimited file, stripped out and made into its own file. What if instead it was totally different, it more like a Django model: Inventory.hdr=20 (id field is implied, you dont need to define it, it's always the = first field of every (database/table) and always auto incremented for a = new record) sku =3D CharField(max_length=3D20, db_index=3DTrue, unique=3DTrue) created_at =3D DateTimeField(auto_now_add=3DTrue, ) updated_at =3D DateTimeField(auto_now=3DTrue, ) is_public =3D BooleanField(default=3DTrue) #onweb. note that the = pound sign lets you comment a field status =3D CharField(max_length=3D8, choices=3DSTATUS_CHOICES, = default=3D"X") mfg =3D CharField(max_length=3D100, ) model =3D CharField(max_length=3D150) description =3D TextField(, blank=3DTrue) STATUS_CHOICES =3D ('X', 'Normal'), ('N', 'New'), ('C', 'Clearance'), ('H', 'Showcase'), ('S', 'Special Order'), ('R', 'Rebuild'), ('O', 'Obsolete'), ('D', 'Discontinued'), Price.hdr (id field is implied, you dont need to define it, it's always the = first field of every (database/table) and always auto incremented for a = new record) product =3D ForeignKey('Inventory.db') qty =3D IntegerField(max_length=3D11) price =3D DecimalField(max_digits=3D11, decimal_places=3D2, = blank=3DTrue) updated_at =3D DateTimeField(auto_now_add=3DTrue, auto_now=3DTrue, ) This would put us a little closer to using "models" around our data, and = help cut down on "webdna isn't a modern language" arguments, while also = cleaning up significantly our search and append code. It also allows up = to better document (thru comments) reasons why a field exists or what it = is used for, etc. Very handy for multiple developer projects or projects = that run for years unattended, then need maintenance years later... Brian B. Burton brian@burtons.com "Remember though, it is not the jar that is important but the empty = space inside that is of value." On Apr 17, 2011, at 2:55 PM, Govinda wrote: > Hi Chris >=20 > I do respect and really enjoy the rich feature set that is webdna.. = but we do still need development. I try to keep my requests to a = practical minimum.. and not just complain. >=20 > Here is a real need I have had many times in the last year: > We need a quick way to debug RAM tables. It is a slow pain to find an = issue when tables are involved. Brian described it well here: >=20 > = http://dev.webdna.us/TalkListArchive/DetailResults.tpl?command=3Dsearch&db= =3Dwebdna-talk.db&eqIDdata=3D57773&max=3D1&words=3DListFields%20table%20bu= g >=20 > Once small quick fix might be to add [Table]s to [ListFields]'s = capabilities. >=20 > - Govinda Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] feature request - .hdr files (Kenneth Grome 2011)
  2. Re: [WebDNA] feature request - .hdr files ("Brian B. Burton" 2011)
OMG, a 5 year old post of mine, and it's still relevant :) I've been extensively redoing 2 websites in WebDNA over the last few = months, and... Wow, did I write bad code in the old days, lol. I've come = to realize that the [function] tag is one of the most underutilized tag = that makes WebDNA closer to other programming languages.=20 Additionally, after playing with Django (Python) and Rails (Ruby) one of = the things that still irritates me the most about WebDNA is the = primitive handling of the databases. Specifically the header file. example: inventory.hdr (webdna) RID SKU AddDate ModDate ModTime OnWeb = status mfg model description prices.hdr PID SKU QTY PRICE updated_on the current header file is just the first title line from a tab = delimited file, stripped out and made into its own file. What if instead it was totally different, it more like a Django model: Inventory.hdr=20 (id field is implied, you dont need to define it, it's always the = first field of every (database/table) and always auto incremented for a = new record) sku =3D CharField(max_length=3D20, db_index=3DTrue, unique=3DTrue) created_at =3D DateTimeField(auto_now_add=3DTrue, ) updated_at =3D DateTimeField(auto_now=3DTrue, ) is_public =3D BooleanField(default=3DTrue) #onweb. note that the = pound sign lets you comment a field status =3D CharField(max_length=3D8, choices=3DSTATUS_CHOICES, = default=3D"X") mfg =3D CharField(max_length=3D100, ) model =3D CharField(max_length=3D150) description =3D TextField(, blank=3DTrue) STATUS_CHOICES =3D ('X', 'Normal'), ('N', 'New'), ('C', 'Clearance'), ('H', 'Showcase'), ('S', 'Special Order'), ('R', 'Rebuild'), ('O', 'Obsolete'), ('D', 'Discontinued'), Price.hdr (id field is implied, you dont need to define it, it's always the = first field of every (database/table) and always auto incremented for a = new record) product =3D ForeignKey('Inventory.db') qty =3D IntegerField(max_length=3D11) price =3D DecimalField(max_digits=3D11, decimal_places=3D2, = blank=3DTrue) updated_at =3D DateTimeField(auto_now_add=3DTrue, auto_now=3DTrue, ) This would put us a little closer to using "models" around our data, and = help cut down on "webdna isn't a modern language" arguments, while also = cleaning up significantly our search and append code. It also allows up = to better document (thru comments) reasons why a field exists or what it = is used for, etc. Very handy for multiple developer projects or projects = that run for years unattended, then need maintenance years later... Brian B. Burton brian@burtons.com "Remember though, it is not the jar that is important but the empty = space inside that is of value." On Apr 17, 2011, at 2:55 PM, Govinda wrote: > Hi Chris >=20 > I do respect and really enjoy the rich feature set that is webdna.. = but we do still need development. I try to keep my requests to a = practical minimum.. and not just complain. >=20 > Here is a real need I have had many times in the last year: > We need a quick way to debug RAM tables. It is a slow pain to find an = issue when tables are involved. Brian described it well here: >=20 > = http://dev.webdna.us/TalkListArchive/DetailResults.tpl?command=3Dsearch&db= =3Dwebdna-talk.db&eqIDdata=3D57773&max=3D1&words=3DListFields%20table%20bu= g >=20 > Once small quick fix might be to add [table]s to [listfields]'s = capabilities. >=20 > - Govinda "Brian B. Burton"

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:

Upload and WebCat (1998) [WebDNA] Seriously what is wrong here? (2011) Undeliverable Mail (1997) Concerning Emailer under Linux... does it exist? (2000) [WebDNA] Email time bug? (2011) Blog solution (2006) Share Bulletin Board? (1998) Separate SSL Server (1997) Erotic Sites (1997) [WebDNA] WebDNA code displaying on page (2012) Country & Ship-to address & other fields ? (1997) purchase.log file (1997) [WebDNA] Date error (2017) Looking up two prices in Formulas.db (1997) Alcatraz must have been nicer than this... (2000) Online reference (1997) Upgrading old WebCat Database Files (1997) Multiple prices (1997) Emailer pref's won't save (2005) Targeted Redirect (1999)