Saturday, April 7, 2007

OCS -- In Detail

So.. You are ready to add OCS in your project. Its very easy. In the "Add New Item" dialogue, among a number of new options, you will see one named "Local Database Cache". This is the one you need. Click on it and it will ask pop up the "Synchronization Dialogue" on the screen.

Following is the description of the fields you will see in this dailogue

  • Server Connection: The connection of the main database server from which you want to download the data
  • Client Connection: The connection of a local database which OCS will use for storing local data. OCS will give you a default connection whenever you choose a server connection. But you can create your own local database connection by clicking the "New" button next to the client connection field.
  • Cached Object List: This is a tree view that displays all the tables selected for Synchornization and offlin usage.
  • Add Item: Use this button to add a table for synchronization
  • Remove Item: Use this button to remove an already selected table from the "Cached Object List"
  • Advanced: Advanced section consists of some options used for the N-Tier scenario i.e. when you want to spread your OCS Sync Code over multiple layers. I am leaving this section for further discussions.
  • Show Code: Now this is a very nice idea to guide the user in the right direction. If the user has selected tables for synchronization, this code will guide him how to synchronize the tables later within the code.

Once you choose the server connection, you will notice that the cached object list shows the status "Loading..." at the top. This is when OCS is loading the server schema which will be displayed to the user upon clicking the "Add Item" Button. You will also notice the "Ok" button to be disabled until you add at least 1 table for synchronization.

This blog covers the whole UI Interface of the OCS Sync Designer Dialogue. There are a few more dialogues which may pop up in different scenarios and I would discuss them later. The most important of them is the "Configure Tables for Offline Use" dialogue which appears when you click the "Add Item" Button. You can read more about these dialogues tomorrow

OCS -- The Big Picture

Ok!!! so you are building an application with lots of lookup values and right now facing problems with the time your page takes for loading. No problem at all, with the OCS (Occassionally Connected Systems) Synchorize Dialogue, you can do it all in no time.

OCS will allow you to select tables for offline use. OCS will automatically synchronize those tables after a specific interval and you are good to go. Use the locally stored data in a much quicker time then it is used to be...

Friday, April 6, 2007

Ocassionally Connected Systems

OCS, Occasionally Connected Systems, is a framework that has been added in Microsoft Visual Studio Codename Orcas (or Visual Studio 2007). It facilitates the user to download data from a remote database server onto the client machine and then use it offline (i.e. without going to the database server again and again). The data would be synchronized by the OCS automatically after a specific interval.

OCS uses SQL Compact (earlier known as SQL Server Mobile Edition or SQL Server Compact Edition)to store and manipulate data. OCS allows the user to add new tables, remove already added tables and provides multiple options for the synchronization process.

The synchronization requires some changes to be made in the database scheme at the server side. Both the SQL Scripts and the SQL Undo Scripts are provided and can be used in order to undo every change that OCS has made in the schema.

OCS is going to be shipped in the Visual Studio 2007 Beta 1. I am open to accept comments/feedback regarding OCS from you. You can rely on me as a mean to transfer your concerns to the Microsoft Visual Basic Team. Waiting for your responses