Re: Storage — Server vs Client

2018-09-10 Thread Chris Belanger via 4D_Tech
Thanks for your input, everyone.

I have used calls to the server in my code quite extensively so I am competent 
and confident in doing that.
It’s good there is a simple method of getting the server to give a client the 
information it wants.

Maybe if I explain why I want(ed) to do this:

COMBO BOX MANAGEMENT
In pre-17 code, I typically keep a set of arrays up-to-date on the server with 
the values / keys of various records / selections for use as CHOICE LISTS.
Think of these as MASTER CHOICE LISTS maintained on the server. They are 
comprised of a combination of an ARRAY of NAMEs and of KEYS
The NAMEs are used to present to the user as the CHOICE LIST.  The KEYS are 
what get stored in the Many Field of the related table.

i.e.
PROJECT ENTRY SCREEN
CUSTOMER:  |-> this is a comboBox (with clairvoyance) that 
contains the [Customer]NAMES. As this changes, the [Project]Customer gets 
updated with the [Customer]ID  (both NAMES and ID are maintained in server 
arrays)

Whenever a record is updated or added, then the Server merely updates the 
MASTER CHOICE LISTS that are affected, then messages all processes on how to 
update their local copies of these CHOICE LISTS.

i.e. A CUSTOMER gets created and saved. The [Customer]Trigger method (running 
on the server) updates the associated VALUE / KEY arrays. Then it messages all 
processes with the update information, and so all processes on all clients make 
the same update into their local copies.

This works really slick, as even if a customer’s name was changed, this gets 
instantly reflected on all clients.



So this gives context to my question about storage (and if a client can access 
the storage on the server directly).

Thank you for all who answered. The 4D Community is great…



> On Sep 10, 2018, at 9:05 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Chris,
> To expand on this a little bit, Storage consists of shared objects only.
> It's not possible to share objects between clients or a client and the
> server. Nor would you really want to. Nor would you want to attempt using
> something like Variable to Variable.
> 
> As Lutz points out you can read something in Storage on the server using an
> EOS method:
> 
> // myMethod
> 
> $0:=Storage.someKey
> 
> You could use the same approach to write to Storage but I would avoid this
> on the server. This is not what Storage is designed for. I think it would
> become very sluggish if you were using it extensively especially if you are
> also writing to it. If you need something like this in your app I would
> look for a different way to accomplish it. Personally I'd look at some sort
> of record based solution.
> 
> On Sun, Sep 9, 2018 at 11:20 PM Chris Belanger via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> I am intrigued by the storage object.
>> 
>> The documentation says that there will be a storage object for the server
>> and for each client.
>> 
>> But I have not been able to see an explanation of how you directly use
>> both.
>> 
>> So how are they differentiated in code?
>> 
>> — Thanks
>> **
>> 4D Internet Users Group (4D iNUG)
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> 
> 
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *We go vote - they go home*
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Storage — Server vs Client

2018-09-10 Thread Kirk Brooks via 4D_Tech
Chris,
To expand on this a little bit, Storage consists of shared objects only.
It's not possible to share objects between clients or a client and the
server. Nor would you really want to. Nor would you want to attempt using
something like Variable to Variable.

As Lutz points out you can read something in Storage on the server using an
EOS method:

// myMethod

$0:=Storage.someKey

You could use the same approach to write to Storage but I would avoid this
on the server. This is not what Storage is designed for. I think it would
become very sluggish if you were using it extensively especially if you are
also writing to it. If you need something like this in your app I would
look for a different way to accomplish it. Personally I'd look at some sort
of record based solution.

On Sun, Sep 9, 2018 at 11:20 PM Chris Belanger via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I am intrigued by the storage object.
>
> The documentation says that there will be a storage object for the server
> and for each client.
>
> But I have not been able to see an explanation of how you directly use
> both.
>
> So how are they differentiated in code?
>
> — Thanks
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
Kirk Brooks
San Francisco, CA
===

*We go vote - they go home*
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Storage — Server vs Client

2018-09-10 Thread Epperlein, Lutz (agendo) via 4D_Tech
Maybe I didn't answer exactly enough: If you want to access the storage object 
of the server *from the client* you can use something like EXECUTE ON SERVER or 
the appropriate attribute of the method.
If you want the storage object of another client, EXECUTE ON CLIENT comes into 
my mind ...

Regards
Lutz

> Subject: Re: Storage — Server vs Client
> 
> I was hoping there was a way to access the storage object on the server from 
> a client.
> it would make a lot of things very simple. For example, the record key 
> sequencing
> would be very simple.
> 
> Is there a way to access the shared objects of another machine (i.e. server 
> or another
> client)?
> 
> regards,
> Chris
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Storage — Server vs Client

2018-09-10 Thread Stephen J. Orth via 4D_Tech
Chris,

What is wrong with the suggestion made by Lutz concerning the use of the 
"Execute On Server" method attribute?


Best,


Steve

-Original Message-
From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Chris Belanger 
via 4D_Tech
Sent: Monday, September 10, 2018 9:33 AM
To: 4D iNUG Technical <4d_tech@lists.4d.com>
Cc: Chris Belanger 
Subject: Re: Storage — Server vs Client

I was hoping there was a way to access the storage object on the server from a 
client.
it would make a lot of things very simple. For example, the record key 
sequencing would be very simple.

Is there a way to access the shared objects of another machine (i.e. server or 
another client)?

regards,
Chris


> On Sep 10, 2018, at 1:47 AM, Epperlein, Lutz (agendo) via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> If I'm not wrong the explanation is simple. If you access the storage on the 
> client you get the storage of the client, on the server you get the storage 
> object of the server. If you want to access the server's storage you can use 
> something like EXECUTE ON SERVER or the appropriate attribute of the method.
> 
> Please correct me, if I'm wrong
> 
> Regards
> Lutz

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

Re: Storage — Server vs Client

2018-09-10 Thread Chris Belanger via 4D_Tech
I was hoping there was a way to access the storage object on the server from a 
client.
it would make a lot of things very simple. For example, the record key 
sequencing would be very simple.

Is there a way to access the shared objects of another machine (i.e. server or 
another client)?

regards,
Chris


> On Sep 10, 2018, at 1:47 AM, Epperlein, Lutz (agendo) via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> If I'm not wrong the explanation is simple. If you access the storage on the 
> client you get the storage of the client, on the server you get the storage 
> object of the server. If you want to access the server's storage you can use 
> something like EXECUTE ON SERVER or the appropriate attribute of the method.
> 
> Please correct me, if I'm wrong
> 
> Regards
> Lutz
> 
>> -Original Message-
>> From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Chris 
>> Belanger via
>> 4D_Tech
>> Sent: Monday, September 10, 2018 8:20 AM
>> To: 4D iNUG Technical <4d_tech@lists.4d.com>
>> Cc: Chris Belanger 
>> Subject: Storage — Server vs Client
>> 
>> I am intrigued by the storage object.
>> 
>> The documentation says that there will be a storage object for the server 
>> and for each
>> client.
>> 
>> But I have not been able to see an explanation of how you directly use both.
>> 
>> So how are they differentiated in code?
>> 
>> — Thanks
>> *

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

RE: Storage — Server vs Client

2018-09-10 Thread Epperlein, Lutz (agendo) via 4D_Tech
If I'm not wrong the explanation is simple. If you access the storage on the 
client you get the storage of the client, on the server you get the storage 
object of the server. If you want to access the server's storage you can use 
something like EXECUTE ON SERVER or the appropriate attribute of the method.

Please correct me, if I'm wrong

Regards
Lutz

> -Original Message-
> From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Chris 
> Belanger via
> 4D_Tech
> Sent: Monday, September 10, 2018 8:20 AM
> To: 4D iNUG Technical <4d_tech@lists.4d.com>
> Cc: Chris Belanger 
> Subject: Storage — Server vs Client
> 
> I am intrigued by the storage object.
> 
> The documentation says that there will be a storage object for the server and 
> for each
> client.
> 
> But I have not been able to see an explanation of how you directly use both.
> 
> So how are they differentiated in code?
> 
> — Thanks
> *
> *
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> *
> *
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Storage — Server vs Client

2018-09-09 Thread Chris Belanger via 4D_Tech
I am intrigued by the storage object.

The documentation says that there will be a storage object for the server and 
for each client.

But I have not been able to see an explanation of how you directly use both.

So how are they differentiated in code?

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