In my mind a variable is the same thing as a key value pair. The variable name 
is the key and the data the variable contains is the value. I name all 
variables with a user readable name so what is the difference between a 
variable named vFirstName that contains “John” and oObj.firstname that equals 
“John”.  

        If (vFirstName=“John”)   0r    If (oObj.firstname =“John”)

In this vein, I am looking at any blob field that contains an ObjectTools 
object, as a potential candidate for replacement with a c_object field. I say 
looking at, as I am not sure it is worth the effort to replace existing code 
unless I decide to drop the use of the OT plugin.

I am thinking going forward, however, that in a process where I know I need to 
store “state” for revisits, I can use an object field instead of a blob field 
with OT object. Hey, instead of using variables at all,  why not use a c_object 
from the get go. With dot notation it becomes really easy to work with the 
c_object just like you would a variable. Store the c_object in the database 
when the process closes and retrieve it when the process is revisited.

John




> On Sep 12, 2017, at 9:27 PM, David Adams via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>> Here´s my real-world use:
>> I wrote an iPhone app that collects data (scans barcodes).
>> That data is in JSON format and transferred via HTTP to a 4D Server.
>> The server stores that data in an object field (which is never queried. It
>> just holds the collected data).
> 
> That's a great example of a classic use for a JSON field, by whatever name.
> (And one of the reasons I would like compression options for JSON fields in
> 4D.) This an example that I'd file under "storing logging or API result
> data", something that makes sense to me for a doc field, if you need the
> data in the database for some reason.
> 
> By default, I don't want most logging data in 4D, but do when it's for
> auditing/troubleshooting. I like text files pushed into a log analyzer. I
> should be working on that again shortly, actually.
> 
>> The same would work with a text- or blob-field to store the data, but an
>> object field makes it a bit easier.
> 
> Great example, thanks for sharing.
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************

John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com





**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to