Re: [WebDNA] maybe silly suggestion? [founditems]
This WebDNA talk-list message is from 2015
It keeps the original formatting.
numero = 111940
interpreted = N
texte = One comment concerning the debate about "advanced programming concepts". =I have no shame to confess that I am not a OOP guru.What interest me is giving WebDNA a set of powerful and modern new tools =that can be understood by someone without an engineering degree.Existing developers in OOP languages are probably not interested in =WebDNA anyway: learning an OOP language has needed a personal investment =that few will consider to drop to move to WebDNA.WebDNA is a different concept, it is smart, elegant, easy and powerful. =It can be easily learned in a week by a beginner and gives advanced =users the satisfaction to design their applications the way they want, =whatever it is.So, don=92t expect WebDNA to start adopting other languages syntax and =architecture if there is a WebDNA way to do things.For instance, I don=92t like the current implementation of xml or some =aspects of arrays: it is not "webdna-like" and can be difficult to =understand.There have been many good ideas and my to-do list is full :-)- chris> On 16 Jan 2015, at 00:29, Donovan Brooke
wrote:>=20> All great food for thought (as usual) Brian=85 and your example below =takes clues from OOP (in the context of what we can deliver with WebDNA =anyway).>=20> These ideals are harking on more =93advanced=94 programming concepts =(encapsulation, inheritance, etc..) which not everyone will get, =especially those that have not worked in other languages. The idea is =not only separation of code, but encapsulation of data, code-reuse, =etc..=20>=20> Anytime this sort of thing is discussed, I think it needs to be =thought about in the context of standardized> programming styles (MVC, OOP features, etc.)=85 especially for =attracting existing developers to WebDNA.>=20> Unfortunately, understanding these concepts to the point of anything =that resembles a good implimentation is just not something WSC is =equipped to do at the moment (no offense to WSC).=20>=20> Keeping programming styles out of it and the discussion limited to =saving found item sets=85>=20> I personally think, since there currently exists workarounds, WSC has =enough higher (more easily understood) priorities that would keep them =busy until they can hire the right people they need to make steps that =involve these kinds of changes for =93contemporary programming ideals=94.=20=>=20> Right now, your Table example, or even writing data sets to a file or =a variable, works.=20>=20> Personally, I get excited when people like you (and Brian Burton, =etc..) start commenting on the forum. ;-) Now we just need to hear from =people like John peacock, Bob minor, Jay, John, grant, scott, etc.. =All you guys helped me advance in server-side web programming in some =fashion.=20>=20> my .02=A2> Donovan>=20>=20> Just a side note.. I certainly think that OOP (and even MVC) is not =necessarily necessary in most of the projects being created in the Web =Programming world. Many would say different... especially .NET schooled =people. ;-) But it is over-kill in many cases IMO. Sometimes you just =want the ability to easily display and edit some data from a table. ;-)>=20>=20>=20>=20>=20>=20> On Jan 15, 2015, at 1:41 PM, iPhonzie@G wrote:>=20>> Chris ->> I think I addressed your question briefly before:>>=20>> "Internal to the WebDNA engine, this may well leverage the same code =as [table] - the [savefounditems] could create a private table and =[listfounditems] could execute a generic unranked search of that table=94>>=20>> So a saved found item set would essentially be a private table, that =the engine has access to but the developer can only access via =[listfounditems].>>=20>> I do similar things with currently available syntax in some cases, =but it=92s messy and could be much more efficient done in the WebDNA =engine.>>=20>> Here=92s the example using tables (sans performance optimizations):>>=20>> [table name=3Dnamepeople&fields=3D[listfields =people.db][fieldname],[/listfields]][/table]>> [search =db=3Dpeople.db&eqfirstnamedatarq=3D[firstname]&allhit=3D1&lastnamesort=3D1=&max=3D25]>> [if [numfound]=3D0][then]>> [DO ERROR STUFF]>> [/then][else]>> [founditems]>> [append table=3Dnamepeople][listfields people.db][showif =[index]>1]&[/showif][fieldname]=3D[url][interpret][[fieldname]][/interpret=][/url][/listfields][/append]>> [/founditems]>> [/else][/if]>> [/search]>>=20>> [table name=3Dcitypeople&fields=3D[listfields =people.db][fieldname],[/listfields]][/table]>> [search =db=3Dpeople.db&eqcitydatarq=3D[city]&allhit=3D1&lastnamesort=3D1&firstname=sort=3D2&max=3D25]>> [if [numfound]=3D0][then]>> [DO ERROR STUFF]>> [/then][else]>> [founditems]>> [append table=3Dcitypeople][listfields people.db][showif =[index]>1]&[/showif][fieldname]=3D[url][interpret][[fieldname]][/interpret=][/url][/listfields][/append]>> [/founditems]>> [/else][/if]>> [/search]>>=20>> [function name=3Dshowpeople]>> >> [search =table=3D[params_string]&nefirstnamedatarq=3D_bogus_&rank=3Doff]>> [founditems]>> >> >> >> >> >> >> >> [/founditems]>> [/search]>> [index]] | [firstname] | [lastname] | [city] | [any field in people.db] |
>> [/function]>>=20>> =85>>=20>> People named [firstname]:>> [showpeople namepeople]>>=20>> People from [city]:>> [showpeople citypeople]>>=20>>=20>> =97 Brian Fries>>=20>> On January 15, 2015 at 11:16:15 AM, christophe.billiottet@webdna.us =(christophe.billiottet@webdna.us) wrote:>>=20>>> It seems to me a little complicated: let=92s take your example=20>>>=20>>> [search =people.db&eqfirstnamedatarq=3D[firstname]&allhit=3D1&lastnamesort=3D1&max=3D=25]=20>>> [if [numfound]=3D0][then]=20>>> [DO ERROR STUFF]=20>>> [/then][else]=20>>> [savefounditems namepeople]=20>>> [/else][/if]=20>>> [/search]=20>>>=20>>>=20>>> This is fine for a two columns database, but if the database =includes 10 columns, is [savefounditems] supposed to store everything? =what should be the format of the data stored? how would it be sorted by =[showpeople namepeople]=20>>>=20>>> we could do that instead of [savefounditems namepeople]:=20>>>=20>>> [text]name[index]=3D[firstname],[/text]=20>>>=20>>>=20>>> which will give us=20>>>=20>>> name1=3DJim,name2=3DBob,name3=3DChris,name4=3DBrian=20>>>=20>>>=20>>>=20>>> - chris=20>>>=20>>>=20>>>=20>>>=20>>>=20>>>=20>>>=20>>>=20>>>> On 15 Jan 2015, at 21:27, iPhonzie@G wrote:=20>>>>=20>>>> I really like the idea of [savefounditems] / [displayfounditems] =(or maybe [listfounditems] for consistency with other looping context =names).=20>>>>=20>>>> Chris, if your [sto] concept is about persistent globally available =values, then I don=92t think that applies to the need here - the saved =results generally only need to persist for the life of the current page.=20=>>>>=20>>>> Internal to the WebDNA engine, this may well leverage the same code =as [table] - the [savefounditems] could create a private table and =[listfounditems] could execute a generic unranked search of that table=20=>>>>=20>>>> With [savefounditems], you could save several sets of searches on =the same database, such as =93peoplenameddave=94 and ==93peoplefromalbuquerque=94, gathered at the top of your page with =appropriate error responses, etc. Later in the display portion of your =page you could call a common function to display HTML tables of Daves =and Albequerqians.=20>>>>=20>>>> So, given a page with formvariables =93firstname=94 and =93city=94, =the top of your code could do:=20>>>>=20>>>> [search =people.db&eqfirstnamedatarq=3D[firstname]&allhit=3D1&lastnamesort=3D1&max=3D=25]=20>>>> [if [numfound]=3D0][then]=20>>>> DO ERROR STUFF]=20>>>> [/then][else]=20>>>> [savefounditems namepeople]=20>>>> [/else][/if]=20>>>> [/search]=20>>>>=20>>>> [search =people.db&eqcitydatarq=3D[city]&allhit=3D1&lastnamesort=3D1&firstnamesort=3D=2&max=3D25]=20>>>> [if [numfound]=3D0][then]=20>>>> DO ERROR STUFF]=20>>>> [/then][else]=20>>>> [savefounditems citypeople]=20>>>> [/else][/if]=20>>>> [/search]=20>>>>=20>>>> [function name=3Dshowpeople]=20>>>> =20>>>> [listfounditems [params_string]]=20>>>> ==20>>>> [/listfounditems]=20>>>> [index]] | [firstname] | [lastname] | [city] | [any field in people.db] |
=20>>>> [/function]=20>>>>=20>>>> Later in the display code you could do:=20>>>>=20>>>> People named [firstname]:=20>>>> [showpeople namepeople]=20>>>>=20>>>> People from [city]:=20>>>> [showpeople citypeople]=20>>>>=20>>>>=20>>>> =97 Brian Fries=20>>>>=20>>>> On January 15, 2015 at 9:55:07 AM, Terry Wilson =(terry@terryfic.com) wrote:=20>>>>=20>>>>> Or just put the search parameters in a variable up top to retrieve =as needed with showifs. This is quite handy for repurposing found items =loops, such as a nicely formatted table of info that is sorted by =various fields (just discussed this a few days ago). This has the added =benefit of letting you keep constants like eventdatetype=3Ddate, max=3D25,= etc in the actual search code to keep your parameters easier to read =and manage. This would certainly put your controller logic separate from =your display code.=20>>>>>=20>>>>> [showif =[somesearch]=3Dt][text]searchforwhat=3Ddb=3Dallthethings.db&blahblahblah[/=text][/showif]=20>>>>> [showif =[someothersearch]=3Dt][text]searchforwhat=3Ddb=3Dallthethings.db&blahblahb=lah[/text][/showif]=20>>>>>=20>>>>> [search [searchforwhat]&max=3D25&lastnamesort=3D1]=20>>>>>=20>>>>>>=20>>>>>>=20>>>>>> On Jan 14, 2015, at 2:57 PM, Brian Burton =wrote:=20>>>>>>=20>>>>>>> to help separate my controller logic from my display code it =would be awesome to have a shortcut like:=20>>>>>>> [search db=3Dallthethings.db&blahblahblah][savefounditems =name=3Dpeoplenameddave][/search]=20>>>>>>>=20>>>>>>>=20>>>>>>>=20>>>>>>>=20>>>>>>> then later in the page, where i=92m rendering the html=20>>>>>>> [displayfounditems use=3Dpeoplenameddave] html things =[/displayfounditems]=20>>>>>>>=20>>>>>>>=20>>>>>>>=20>>>>>>> I know it looks like it=92s 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 to 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=92re missing the point) or how we don=92t need more tags or =whatever :)=20>>>>>>>=20>>>>>>>=20>>>>>>> -Brian B. Burton=20>>>>>=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>>>=20>>> ---------------------------------------------------------=20>>> This message is sent to you because you are subscribed to=20>>> the mailing list .=20>>> To unsubscribe, E-mail to: =20>>> archives: http://mail.webdna.us/list/talk@webdna.us=20>>> 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:
One comment concerning the debate about "advanced programming concepts". =I have no shame to confess that I am not a OOP guru.What interest me is giving WebDNA a set of powerful and modern new tools =that can be understood by someone without an engineering degree.Existing developers in OOP languages are probably not interested in =WebDNA anyway: learning an OOP language has needed a personal investment =that few will consider to drop to move to WebDNA.WebDNA is a different concept, it is smart, elegant, easy and powerful. =It can be easily learned in a week by a beginner and gives advanced =users the satisfaction to design their applications the way they want, =whatever it is.So, don=92t expect WebDNA to start adopting other languages syntax and =architecture if there is a WebDNA way to do things.For instance, I don=92t like the current implementation of xml or some =aspects of arrays: it is not "webdna-like" and can be difficult to =understand.There have been many good ideas and my to-do list is full :-)- chris> On 16 Jan 2015, at 00:29, Donovan Brooke wrote:>=20> All great food for thought (as usual) Brian=85 and your example below =takes clues from OOP (in the context of what we can deliver with WebDNA =anyway).>=20> These ideals are harking on more =93advanced=94 programming concepts =(encapsulation, inheritance, etc..) which not everyone will get, =especially those that have not worked in other languages. The idea is =not only separation of code, but encapsulation of data, code-reuse, =etc..=20>=20> Anytime this sort of thing is discussed, I think it needs to be =thought about in the context of standardized> programming styles (MVC, OOP features, etc.)=85 especially for =attracting existing developers to WebDNA.>=20> Unfortunately, understanding these concepts to the point of anything =that resembles a good implimentation is just not something WSC is =equipped to do at the moment (no offense to WSC).=20>=20> Keeping programming styles out of it and the discussion limited to =saving found item sets=85>=20> I personally think, since there currently exists workarounds, WSC has =enough higher (more easily understood) priorities that would keep them =busy until they can hire the right people they need to make steps that =involve these kinds of changes for =93contemporary programming ideals=94.=20=>=20> Right now, your Table example, or even writing data sets to a file or =a variable, works.=20>=20> Personally, I get excited when people like you (and Brian Burton, =etc..) start commenting on the forum. ;-) Now we just need to hear from =people like John peacock, Bob minor, Jay, John, grant, scott, etc.. =All you guys helped me advance in server-side web programming in some =fashion.=20>=20> my .02=A2> Donovan>=20>=20> Just a side note.. I certainly think that OOP (and even MVC) is not =necessarily necessary in most of the projects being created in the Web =Programming world. Many would say different... especially .NET schooled =people. ;-) But it is over-kill in many cases IMO. Sometimes you just =want the ability to easily display and edit some data from a table. ;-)>=20>=20>=20>=20>=20>=20> On Jan 15, 2015, at 1:41 PM, iPhonzie@G wrote:>=20>> Chris ->> I think I addressed your question briefly before:>>=20>> "Internal to the WebDNA engine, this may well leverage the same code =as [table] - the [savefounditems] could create a private table and =[listfounditems] could execute a generic unranked search of that table=94>>=20>> So a saved found item set would essentially be a private table, that =the engine has access to but the developer can only access via =[listfounditems].>>=20>> I do similar things with currently available syntax in some cases, =but it=92s messy and could be much more efficient done in the WebDNA =engine.>>=20>> Here=92s the example using tables (sans performance optimizations):>>=20>> [table name=3Dnamepeople&fields=3D[listfields =people.db][fieldname],[/listfields]][/table]>> [search =db=3Dpeople.db&eqfirstnamedatarq=3D[firstname]&allhit=3D1&lastnamesort=3D1=&max=3D25]>> [if [numfound]=3D0][then]>> [DO ERROR STUFF]>> [/then][else]>> [founditems]>> [append table=3Dnamepeople][listfields people.db][showif =[index]>1]&[/showif][fieldname]=3D[url][interpret][[fieldname]][/interpret=][/url][/listfields][/append]>> [/founditems]>> [/else][/if]>> [/search]>>=20>> [table name=3Dcitypeople&fields=3D[listfields =people.db][fieldname],[/listfields]][/table]>> [search =db=3Dpeople.db&eqcitydatarq=3D[city]&allhit=3D1&lastnamesort=3D1&firstname=sort=3D2&max=3D25]>> [if [numfound]=3D0][then]>> [DO ERROR STUFF]>> [/then][else]>> [founditems]>> [append table=3Dcitypeople][listfields people.db][showif =[index]>1]&[/showif][fieldname]=3D[url][interpret][[fieldname]][/interpret=][/url][/listfields][/append]>> [/founditems]>> [/else][/if]>> [/search]>>=20>> [function name=3Dshowpeople]>> >> [search =table=3D[params_string]&nefirstnamedatarq=3D_bogus_&rank=3Doff]>> [founditems]>> >> >> >> >> >> >> >> [/founditems]>> [/search]>> [index]] | [firstname] | [lastname] | [city] | [any field in people.db] |
>> [/function]>>=20>> =85>>=20>> People named [firstname]:>> [showpeople namepeople]>>=20>> People from [city]:>> [showpeople citypeople]>>=20>>=20>> =97 Brian Fries>>=20>> On January 15, 2015 at 11:16:15 AM, christophe.billiottet@webdna.us =(christophe.billiottet@webdna.us) wrote:>>=20>>> It seems to me a little complicated: let=92s take your example=20>>>=20>>> [search =people.db&eqfirstnamedatarq=3D[firstname]&allhit=3D1&lastnamesort=3D1&max=3D=25]=20>>> [if [numfound]=3D0][then]=20>>> [DO ERROR STUFF]=20>>> [/then][else]=20>>> [savefounditems namepeople]=20>>> [/else][/if]=20>>> [/search]=20>>>=20>>>=20>>> This is fine for a two columns database, but if the database =includes 10 columns, is [savefounditems] supposed to store everything? =what should be the format of the data stored? how would it be sorted by =[showpeople namepeople]=20>>>=20>>> we could do that instead of [savefounditems namepeople]:=20>>>=20>>> [text]name[index]=3D[firstname],[/text]=20>>>=20>>>=20>>> which will give us=20>>>=20>>> name1=3DJim,name2=3DBob,name3=3DChris,name4=3DBrian=20>>>=20>>>=20>>>=20>>> - chris=20>>>=20>>>=20>>>=20>>>=20>>>=20>>>=20>>>=20>>>=20>>>> On 15 Jan 2015, at 21:27, iPhonzie@G wrote:=20>>>>=20>>>> I really like the idea of [savefounditems] / [displayfounditems] =(or maybe [listfounditems] for consistency with other looping context =names).=20>>>>=20>>>> Chris, if your [sto] concept is about persistent globally available =values, then I don=92t think that applies to the need here - the saved =results generally only need to persist for the life of the current page.=20=>>>>=20>>>> Internal to the WebDNA engine, this may well leverage the same code =as [table] - the [savefounditems] could create a private table and =[listfounditems] could execute a generic unranked search of that table=20=>>>>=20>>>> With [savefounditems], you could save several sets of searches on =the same database, such as =93peoplenameddave=94 and ==93peoplefromalbuquerque=94, gathered at the top of your page with =appropriate error responses, etc. Later in the display portion of your =page you could call a common function to display HTML tables of Daves =and Albequerqians.=20>>>>=20>>>> So, given a page with formvariables =93firstname=94 and =93city=94, =the top of your code could do:=20>>>>=20>>>> [search =people.db&eqfirstnamedatarq=3D[firstname]&allhit=3D1&lastnamesort=3D1&max=3D=25]=20>>>> [if [numfound]=3D0][then]=20>>>> DO ERROR STUFF]=20>>>> [/then][else]=20>>>> [savefounditems namepeople]=20>>>> [/else][/if]=20>>>> [/search]=20>>>>=20>>>> [search =people.db&eqcitydatarq=3D[city]&allhit=3D1&lastnamesort=3D1&firstnamesort=3D=2&max=3D25]=20>>>> [if [numfound]=3D0][then]=20>>>> DO ERROR STUFF]=20>>>> [/then][else]=20>>>> [savefounditems citypeople]=20>>>> [/else][/if]=20>>>> [/search]=20>>>>=20>>>> [function name=3Dshowpeople]=20>>>> =20>>>> [listfounditems [params_string]]=20>>>> ==20>>>> [/listfounditems]=20>>>> [index]] | [firstname] | [lastname] | [city] | [any field in people.db] |
=20>>>> [/function]=20>>>>=20>>>> Later in the display code you could do:=20>>>>=20>>>> People named [firstname]:=20>>>> [showpeople namepeople]=20>>>>=20>>>> People from [city]:=20>>>> [showpeople citypeople]=20>>>>=20>>>>=20>>>> =97 Brian Fries=20>>>>=20>>>> On January 15, 2015 at 9:55:07 AM, Terry Wilson =(terry@terryfic.com) wrote:=20>>>>=20>>>>> Or just put the search parameters in a variable up top to retrieve =as needed with showifs. This is quite handy for repurposing found items =loops, such as a nicely formatted table of info that is sorted by =various fields (just discussed this a few days ago). This has the added =benefit of letting you keep constants like eventdatetype=3Ddate, max=3D25,= etc in the actual search code to keep your parameters easier to read =and manage. This would certainly put your controller logic separate from =your display code.=20>>>>>=20>>>>> [showif =[somesearch]=3Dt][text]searchforwhat=3Ddb=3Dallthethings.db&blahblahblah[/=text][/showif]=20>>>>> [showif =[someothersearch]=3Dt][text]searchforwhat=3Ddb=3Dallthethings.db&blahblahb=lah[/text][/showif]=20>>>>>=20>>>>> [search [searchforwhat]&max=3D25&lastnamesort=3D1]=20>>>>>=20>>>>>>=20>>>>>>=20>>>>>> On Jan 14, 2015, at 2:57 PM, Brian Burton =wrote:=20>>>>>>=20>>>>>>> to help separate my controller logic from my display code it =would be awesome to have a shortcut like:=20>>>>>>> [search db=3Dallthethings.db&blahblahblah][savefounditems =name=3Dpeoplenameddave][/search]=20>>>>>>>=20>>>>>>>=20>>>>>>>=20>>>>>>>=20>>>>>>> then later in the page, where i=92m rendering the html=20>>>>>>> [displayfounditems use=3Dpeoplenameddave] html things =[/displayfounditems]=20>>>>>>>=20>>>>>>>=20>>>>>>>=20>>>>>>> I know it looks like it=92s 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 to 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=92re missing the point) or how we don=92t need more tags or =whatever :)=20>>>>>>>=20>>>>>>>=20>>>>>>> -Brian B. Burton=20>>>>>=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>>>=20>>> ---------------------------------------------------------=20>>> This message is sent to you because you are subscribed to=20>>> the mailing list .=20>>> To unsubscribe, E-mail to: =20>>> archives: http://mail.webdna.us/list/talk@webdna.us=20>>> 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
christophe.billiottet@webdna.us
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:
Happy New Year (2008)
international time (1997)
autosensing lanague selection (1997)
re: How can I record purchases to a database? (1998)
So many lookers, hey smith micro (2003)
showif errors (1998)
Superfilous Characters (1998)
Email (1998)
Preventing Safari caching (2003)
HTML Editors (1997)
Error after loading WebDNA (2004)
sort problems....bug or brain fart? (1997)
test (2002)
A simple email page? (1999)
RE: [WebDNA] TCPConnect/cURL alternative for windows? (2010)
searching by date range help needed (1997)
Attention SM: Trigger Bug? (2000)
Date problems (1997)
Re:Need help... (1997)
MasterCounter and capitalization (1997)