Managed application scheme poster

Understanding basics of 1C:Enterprise platform. To start working with 1C:Enterprise platform visit Getting started page

#1
People who like this:0Yes/0No
Interested
Rating: 32
Joined: Oct 27, 2011
Company: Abaco Soluciones S.A.

1c, please make a big poster with scheme how in managed application you can handle data. Which procedures you could call fr om client, which data objects supported by XDTO,  where you could store your variables.

It really take a lot of time finding solution how to pass the data and wh ere to temporary store it. Would help a lot to all of us.

 
#2
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

The quick answer is that you should use object attributes to store data, form attributes for temporary data and pass large amount of data between client and server using the temporary storage.

It is not a good idea to pass complicated objects between client and server as a parameter of function due to it will be serialized into a large XML (if it will at all). If you are trying to pass an object instead of data, you will have to think how to initialize this object (any way the data can be passed, not the object), otherwise it will not work properly.

Note that if you call a server procedure/function from client, it takes time to connect to the server, pass data through the network, deserialize, process, serialize the result and get it back. Thus the good practice is to lower the number of server calls.

On the other side you should take care on security: if you will trust the data which came from client, you will have a security hole. All critical data should be calculated on server. The client can calculate previews and presentations, item visibility and so on.
For example, the total that should be paid for the order is calculated on client and a user uses a debugger in Web client. The debugger allows to change data in Total field, thus when the request to payment system will be passed, a user will have to pay the amount he wants, not the correct value.

Hope this helped. Because the scheme with everything will be too large.

P.S.: Please pay attention to differences between Web and Thin client.

 
#3
People who like this:0Yes/0No
Interested
Rating: 32
Joined: Oct 27, 2011
Company: Abaco Soluciones S.A.

Quote
Timofey Bugaevsky wrote:
On the other side you should take care on security: if you will trust the data which came from client, you will have a security hole. All critical data should be calculated on server. The client can calculate previews and presentations, item visibility and so on.
For example, the total that should be paid for the order is calculated on client and a user uses a debugger in Web client. The debugger allows to change data in Total field, thus when the request to payment system will be passed a user will have to pay the amount he wants, not the correct value.
This is an interesting idea. I think we could have some holes like this.

My problem was to store ADODB object in document form. I used client side connection and needed to keep connection opened between user actions. So I have tried Form Attribute, Form module variable, but nothing worked for me. Look like variable outside the procedure in form module was ignored. So I had to move it to Managed application module. But isn't is bad to store some locally used variable globally?

 
#4
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Are you sure that you need to keep the connection between user actions? What if the user will take a walk and return back? The expired connection will loose the temporary data and you will have to reconnect.

And please provide a test example to check that using variables with &AtClient modifier in the form module did not worked.

 
#5
People who like this:0Yes/0No
Interested
Rating: 32
Joined: Oct 27, 2011
Company: Abaco Soluciones S.A.

It take a long time to reconnect, so I keep a connection alive while user is making some actions with this database.

With &AtClient directive it works! That's why I need this big poster. No matter if it will be 1,5 by 2 meters. Will decorate our office.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.