Windows Develop Bookmark and Share   
 index > Windows Forms Sample Applications > Storage and Syc of local data
 

Storage and Syc of local data

Does anyone know how IssueVision is storing its local data?  Also, how is it synchronizing with the web service?

MigrationUser 1  Monday, September 13, 2004 1:34 PM
Issue Vision uses SOAP Web Service to transfer files.

2 offline files involved. 

-from app.config under "IssueVision" project
    <add key="DataSetFileName" value="IssueDetails.bin"/>
    <add key="SettingsFileName" value="Settings.bin"/>

IssueDetails.bin contains xml datasets that populated from DB at "IssueVisionWeb" (server).
Settings.bin contains user information and used as authentication "KEY" and created everytime and you login, and deleted when you logoff.  Application.UserAppDataPath under IssueSubject.vb ("IssueVision" project) excute these write, delete functions.  So files are saved in C:\Documents and Settings\<username>\Local Settings\Application Data\....
Which means, deleting those 2 offline files will always let you start your app fresh.  

Both of the files are encrypted using DPAPI and encoded using base64.
HTTP port is used to communicate between client and web service.

Also, there several config files which you can specify destination of web service (IIS) and database.

To change IIS destination:
app.config under "IssueVision" project
To change DB destination:
web.config under "IssueVisionWeb" project

BTW, database destination configured by web.config, 
    <add key="sqlConn.UsePlainText" value="true" />
This specify which above 2 dbconnection strings to use.  default is "false" which means use protected strings.  "true" will use first line, which is the plain text string.  

Far as sync goes, utilizing the last modified date to determin either to sync, or spit out as a conflict (when you have same modified client record exists) or just update.

Is this what you are asking?  Hope it helped either way..  :)

Tomo
MigrationUser 1  Friday, September 17, 2004 6:25 PM
Thanks for the post!  It is extremely helpful.
MigrationUser 1  Saturday, September 25, 2004 4:02 PM
Tomo,
I wonder if you could give me a further explanation of how the Conflicts are created. I have looked thru the code extensively and this is one area I just dont seem to grasp.

Many Thanks,
Rob
.... To Blog or Not To Blog .... That is the question
MigrationUser 1  Tuesday, April 19, 2005 10:11 PM

First, let me say that I appreciate the work done to get this application out there for me to look over.  I continually refer to it and I think I am ready to design an application using this model.  Without samples like this, I would not be enlightened enough to ask more question, so, thank you.

 

I have a few questions about IssueVision concerning its scalability and performance.  Rather, if I were to implement techniques described here into another application, how would it perform, how well will it scale, and what considerations should I be take into account?

 

Let’s say we have the proverbial order entry application, in this case we sell products and services.  Each client application would need the ability to work in a disconnected mode from time to time. 

 

The application flow would resemble this:

 

Sales Rep Prepares a Quote

-         Quote Header

-             Date/Time

-             Sales Rep ID

-             Customer Information

-             Billing Address

-             Mailing Address

-         Quote Details

-             Product Kits (Grouping of Parts)

-             Parts

-             Services (Installation)

 

 

Sales Rep Converts a Quote to Sale (Workorder and Invoice)

-         Order Header

-             Date/Time

-             Sales Rep ID

-             Customer Information

-             Billing Address

-             Mailing Address

-             Payment Terms

-         Order Details

-             Product Kits (Grouping of Parts)

-             Parts

-             Services (Installation)

 

Data in Synchronized with Central Data Store

 

Fulfillment Rep processes the order

-         Opens Workorder Ticket

-         Locates and freezes parts

-           Backorder status

-           Warehouse transfer request

-         Check Service Rep Availability

-            Assign Technician

-         Monitor Workorder status

 

Billing Processes Invoice / Payments

 

Sales Rep Monitors Order Activity for this Sale

 

While Finance and Fulfillment would most likely be connected to the server at all times, the sales force will be required to host a lot of data locally.  What’s more, it would seem that the sales rep would have to load a lot of data into memory at one time. 

 

  1. Is there a way to minimize how much data is loaded into memory at a time and still use Subject/Observer and Disconnected methods?
  2. According to the documentation on Microsoft’s site about the Model-Controller-View model, there is a propensity to code memory leaks into the system, how do I avoid them?  How do I test for them?
  3. It would seem that to convert the GUI to a web application, it would require some major code changes to make it work.  For example:
    1. Helper functions (While not required for a web client) use the Application namespace, and therefore could not be included into a generic assembly)
    2. The only piece that you could isolate into a common assembly would be the Controller (IssueSubject) and the patterns (IObserver, ISubject). 

 

It appears as though the goal in IssueVision was to make a narrow data model.  I think I understand why it was designed that way, first of because it is efficient, and second this was to demonstrate technologies in use.  However, in the case of our ordering system, our Orders table would have two or three foreign keys (depending on how you model your data) Shipping Address, Billing Address, and Customer.  I have a few questions concerning this: 

  1. Using the IssueVision model, how would one implement Transactions?  I would create a transaction object in my Version of the IVData object and create a transaction as I needed.  Would I still be informed of conflicts as they occur and would they be only for when the client/server copies differ?
  2. Using the dataadapter’s Update() method and handling the row updated event for addresses, how would I know which address row represents the mailing address and which represents the billing address (Assuming the addressed is an autonumber int)
  3. Using the IVData component implicitly instantiates all the data adapters and command objects at once.  Is there an overhead associated with that, is there a better way?  If I were to instantiate the objects that I need as I need them, do I introduce other issues or affect performance?
  4. Would it be more efficient to send/receive the data serialized than to pass a dataset?

 

When loading the data, I can easily see that the parts catalog would be lookup reference data.  I can further see that this data only needs to be updated on demand or periodically and not every time the application is launched.  I think I get that well enough.

 

When loading the open orders though, I have a question about the Orders foreign key partner tables.  In the case of addresses I would not need to load that data while displaying the information in the data list.  I would need to load that data while working with the individual item though.  Enter the dataview and my next set of questions:

  1. First, is there a better way then dataviews?
  2. How do I cast a datarowview back to table.rows()?
  3. When looking up the shipping address, I assume I would need to extend the subject object to include a method for returning datarowview (dataview seems to be the only object to allow filtering of loaded data), when updating this information is the data still a member of the dataset?

 

When creating an application a bit more complex than IssueVision, what are some considerations to take into account, pitfalls of development (besides debugging a webservice), and finally is this the right model to implement for an application larger than IssueVision?

 

 

Thank you for your time.

AMDRIT  Monday, July 11, 2005 8:17 PM

You can use google to search for other answers

Custom Search

More Threads

• Terranium Error
• Two taskbar icons appears while opening new form
• Where can i get the issuevision's c# code??
• duplicate image finder
• What is the user id and password for task vision client
• Terrarium communication problems
• what is the best practice ??????
• A Bug in TaskVision ?!? ( for those puzzled about selections in DataGrid )
• draw a waveform
• TASKVISION DataLayer - How many table can the datalayer support