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:

WebCat2b12plugin - [search] is broken ... not! (1997) Snake Bites (1997) [OT] Dedicated Image Uploader/Server [/OT] (2003) Search multiple fields (1997) Memory Error message (1998) I'm new be kind (1997) WebCat2b13MacPlugIn - syntax to convert date (1997) [createfolder] & [deletefolder] (1997) Online reference (1997) Proper file locations (1997) Help with dates (2001) Not really WebCat (1997) WebCatalog f2 Installation (1997) pop up menu's (1998) Inventory Adjustment (2000) Hiding usernames and passwords in URL (1998) X etc.... (1999) RE: .html to .tpl (1998) Quit revisited (1997) Append..... doesn't (2000)