Re: [WebDNA] maybe silly suggestion? [founditems]

This WebDNA talk-list message is from

2015


It keeps the original formatting.
numero = 111906
interpreted = N
texte = --54b80bb3_19495cff_12a Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline If you are going to add permanent variables, I would recommend using iden= tical syntax to =5Btext=5D for implementing =5Bsto=5D =5Bsto=5Dname=3Dvalue=5B/sto=5D =5Bsto multi=3DT=5Dname1=3Dvalue1&name2=3Dvalue2=5B/sto=5D Secondly, I'd recommend spelling out =5Bstore=5D and =5Brecall=5D - aside= from the retro 70s tech reference, there is no need to abbreviate terms = that can be simply and clearly spelled out in full. Even better, perhaps, would be adding a =E2=80=9Cuniverse=E2=80=9D or =E2= =80=9Csystem=22 scope for items the persist beyond the current page, then= any existing tag that supports scope could be used with full permanence.= This I could certainly find a use for. Expanding on that, you=E2=80=99d need to make sure no system-scope items = could supersede WebDNA keywords. If I could define functions in the system scope, I could essentially and = dynamically extend the WebDNA language without needing to include a funct= ion library. That would be awesome=21 (great power / great responsibility= caveats assumed) These discussions are exciting - I haven=E2=80=99t been as interested in = the future of WebDNA since the early days of Smith Micro ownership when t= hey listened to developers and implemented great suggestions from the tal= k list (functions, if/then/else, scoped variables). =E2=80=94 Brian =46ries On January 15, 2015 at 12:46:56 AM, christophe.billiottet=40webdna.us (ch= ristophe.billiottet=40webdna.us) wrote: I find the idea interesting. There is quite nothing in WebDNA that cannot= be done with a little bit of creativity, but if a tag (or =22codon=22 to= stick with biological language) can simplify coding, then I am for it. =20 The following is for debate: =20 We are currently working to add a simple tag that stores variables perman= ently (8.0.3), something that reminds me the Hewlett Packard way of perma= nently storing variables (back in 1978) on a hp29c (named =22Continuous M= emory=22). This has to survive a reboot, and the variable and the name sh= ould be as long as wanted and it would save the hassle of writing the cod= e to save those in a database. However, to avoid =22overheating=22, we wo= uld have only one name per variable, meaning that if you store name3 as =22= pink=22, and you later store name3 as =22black=22, then only the last val= ue will remain and =22pink=22 will be overwritten by =22black=22 =20 The process will use =5Bsto=5D and =5Brcl=5D (for store and recall) + the= name of the variable + the variable itself =20 There would be four possible ways to describe such a feature: =20 =5Bsto name=3Dvariable=5D =20 =5Bsto name=5Dvariable=5B/sto=5D =20 =5Bsto=5Dname=3Dvariable=5B/sto=5D =20 =5Bsto=5Dname1=3Dvariable1,name2=3Dvariable2,name3=3Dvariable3=5B/sto=5D = =20 The last one it obviously better as it allows to store multiple variables= and use long names, if requested. =20 Recall would work individually: =5Brcl name2=5D so we can just get the co= don replaced by the variable. =20 It should be possible from here to build a =5Bstofounditems=5D within a =5B= search=5D=5B/search=5D cell, but we would need first a =5Blistfounditems=5D= and it could bring up a *lot* of data in certain cases, as founditems wo= rks like a loop. Second, the names will be identical: Imagine a db with 1= 00,000 entries from 1 to 100,000 =20 =5Bsearch db=3Dallthethings.db&grnamedata=3D1=5D =20 =5Bfounditems=5D =20 =5Bname=5D=3D=5Bvariable=5D =20 =5B/founditems=5D =20 =5B/search=5D =20 Any idea welcomed there. =20 Then we could have a =5Brclfounditems=5D =20 Giving a name as Brian suggests, like =5Bstofounditems name=3Dpeoplenamed= dave=5D would be complicated: it would mean to create a global name that = would contains an unlimited number of names and variables. =20 Well, these are just ideas that go through my head. Debate welcomed. =20 - chris =20 > On 14 Jan 2015, at 23:57, Brian Burton wrote: =20 > =20 > to help separate my controller logic from my display code it would be a= wesome to have a shortcut like: =20 > =5Bsearch db=3Dallthethings.db&blahblahblah=5D=5Bsavefounditems name=3D= peoplenameddave=5D=5B/search=5D =20 > =20 > =20 > =20 > =20 > then later in the page, where i=E2=80=99m rendering the html =20 > =5Bdisplayfounditems use=3Dpeoplenameddave=5D html things =5B/displayfo= unditems=5D =20 > =20 > =20 > =20 > I know it looks like it=E2=80=99s not saving that much code, but I can = see switching which search I want in the controller, and still being able= to use a universal founditems loop lower in the code. Also the ability t= o reuse search results (if needed) without doing the same search again. =20 > =20 > ok, feel free to start telling me how you can do this with a table (you= =E2=80=99re missing the point) or how we don=E2=80=99t need more tags or = whatever :) =20 > =20 > =20 > -Brian B. Burton =20 > --------------------------------------------------------- =20 --54b80bb3_19495cff_12a Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline