Synchronization from remote client


Author
Message
Larry Tucker
Larry Tucker
StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)
Group: StrataFrame Users
Posts: 69, Visits: 308
ES apparently allows a remote client to access data via HTTP, then run disconnected from the central database.  So, I assume a salesperson could pull down a customer list on his or her laptop and work on it without further internet connection. 

My question is what kind of support does ES offer for synchronizing any changes made to the data once an internet connection is re-established? 

For example, if the salesperson changes a customer's phone number while working disconnected, how does this new phone number get applied to the main database when the salesperson reconnects to the internet? 

Are the synchronization tools built in to ES, or would I have to write it all by hand?  At reconnection, is there an opportunity to open both the local and the central (ES) tables simultaneously and do the needed comparison and updates?

TIA,

Larry

Lenard Dean
Lenard Dean
StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)
Group: Forum Members
Posts: 7, Visits: 25
Hi Trent,

Just wandering about Larry's question.  Does version 1.6 provide some mechanism to save to a local datastore while the smart client is disconnected from ES?

--Lenard

Trent Taylor
Trent Taylor
StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
My question is what kind of support does ES offer for synchronizing any changes made to the data once an internet connection is re-established?

You could do this with StrataFrame even prior to the ES.  This is more of a disconnected data feature rather than an ES feature.  For example, once you have data within the BO it can be modified and maintained and there is no "keep-alive" data session.  The connection is re-established when a request to the DAL (Data access layer) is performed, such as a Save(), SELECT, etc. 

The ES provides a way to communicate real-time from anywhere...fast!  So in the case of pulling data down and then updating it later there are a number of options.  The most common one would be to serialize the BO and save it to disk....once back in connection range (or in the office) then you can deserialize the BO and all of the unsaved content and call the Save just as you would any other time. 

Does version 1.6 provide some mechanism to save to a local datastore while the smart client is disconnected from ES?

Use the serialization methods on the BO:

Serialize to local file on disk

Dim loFile As New System.IO.FileStream("c:\temp\MyBO.ser", System.IO.FileMode.Create)
MyBO.SerializeToStream(loFile)

Restore a saved BO from disk

loFile = New System.IO.FileStream("c:\temp\MyBO.ser", System.IO.FileMode.Open)
MyBO = CType(MicroFour.StrataFrame.Business.BusinessLayer.DeserializeBusinessObject(loFile), MyBO)


Lenard Dean
Lenard Dean
StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)
Group: Forum Members
Posts: 7, Visits: 25
Hi Trent

So if a form had many BOs, one would have to manage each one of them separately, correct?  There is no top level "session" or "mechanism" that I could use to manage the saving/loading of the BOs while I was disconnected, right? 

Thanks.

--Lenard

Trent Taylor
Trent Taylor
StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You could create a class to do this for you in about 10 minutes.  All forms already have a collection of business objects that have been dropped on it:

MyForm.BusinessObjects

You can pass this collection to a shared class that you create that cycles through the BOs and saves them to disk:

Public Class MyBOSaver
   Public Shared Sub SaveBOsToDisk(ByVal MyBOs As MicroFour.StrataFrame.Business.BusinessObjectCollection)
       '-- Cycle through all of the BOs
       For Each loBO As BusinessLayer IN MyBOs
          '-- Add the serialization code here...
       Next
    End Sub
End Class

Larry Tucker
Larry Tucker
StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)
Group: StrataFrame Users
Posts: 69, Visits: 308
Trent,

Thanks for the reply.  Sounds like there are a lot of capabilities to "run disconnected".

Larry

Trent Taylor
Trent Taylor
StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Glad to help, Larry Smile.  Yes, there are a number of different methods of which you can take advantage.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search