<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Steve Lasker's Web Log - www.SteveLasker.com/Blog : offline</title><link>http://blogs.msdn.com/stevelasker/archive/tags/offline/default.aspx</link><description>Tags: offline</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Demos, Presentations, Links, Screencasts and Videos for SQL Server Compact</title><link>http://blogs.msdn.com/stevelasker/archive/2008/11/25/demos-presentations-links-screencasts-and-videos-for-sql-server-compact.aspx</link><pubDate>Wed, 26 Nov 2008 00:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9142840</guid><dc:creator>Steve.Lasker</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/stevelasker/comments/9142840.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevelasker/commentrss.aspx?PostID=9142840</wfw:commentRss><description>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 12"&gt;&lt;meta name="Originator" content="Microsoft Word 12"&gt;&lt;link href="file:///C:%5CUsers%5CSTEVEL%7E1.RED%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 
  
  
 
&lt;/xml&gt;&lt;![endif]--&gt;&lt;link href="file:///C:%5CUsers%5CSTEVEL%7E1.RED%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;link href="file:///C:%5CUsers%5CSTEVEL%7E1.RED%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 
  Normal
  0
  
  
  
  
  false
  false
  false
  
  EN-US
  X-NONE
  X-NONE
  
   
   
   
   
   
   
   
   
   
   
   
   
  
  
  
   
   
   
   
   
   
   
   
   
   
   
  
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 
&lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt;

&lt;/style&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-qformat:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin-top:0in;
	mso-para-margin-right:0in;
	mso-para-margin-bottom:10.0pt;
	mso-para-margin-left:0in;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;p&gt;I often find it hard to find my own demos scattered
throughout my blog, so figured I'd just create a single posting that had all my
current demos and powerpoints.&lt;/p&gt;&lt;h1&gt;Recent Presentations at PDC and Tech Ed&lt;br&gt;&lt;/h1&gt;&lt;p&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 12"&gt;&lt;meta name="Originator" content="Microsoft Word 12"&gt;&lt;link href="file:///C:%5CUsers%5CSTEVEL%7E1.RED%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 
  
  
 
&lt;/xml&gt;&lt;![endif]--&gt;&lt;link href="file:///C:%5CUsers%5CSTEVEL%7E1.RED%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;link href="file:///C:%5CUsers%5CSTEVEL%7E1.RED%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 
  Normal
  0
  
  
  
  
  false
  false
  false
  
  EN-US
  X-NONE
  X-NONE
  
   
   
   
   
   
   
   
   
   
   
   
   
  
  
  
   
   
   
   
   
   
   
   
   
   
   
  
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 
&lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt;

&lt;/style&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-qformat:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin-top:0in;
	mso-para-margin-right:0in;
	mso-para-margin-bottom:10.0pt;
	mso-para-margin-left:0in;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;/p&gt;&lt;p&gt;&lt;a href="http://steve.lasker.members.winisp.net/Presentations/SQLServerCompactHighLevel.pptx"&gt;&lt;b&gt;SQL Server Compact Overview (lots of demos with
supporting slides)&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&amp;nbsp; &lt;br&gt;
&lt;/b&gt;This was a very demo heavy deck with supporting slides.&amp;nbsp; Covers
many of our SQL Server Compact goals and non-goals, including the tooling
scenarios, split between VS and Management Studio.&amp;nbsp; Slides and demo on
ASP.NET soft block, programming models with DataSet and SqlCeResultSet.&amp;nbsp;
(This deck was before we had LINQ to Entity support available).&amp;nbsp; Covers a
quick overview of optimized online, offline enabled architectures, with demos
of Sync Services for ADO.NET, including 2 tier and N Tier.&amp;nbsp; Then wraps up
with Logical Queuing as the overall architecture for client based apps.&amp;nbsp; I
had a lot of fun with this presentation, but it was hard to fit in an hour.&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08UnlockingThePowerOfCompact.pptx"&gt;&lt;b&gt;Unlocking the Power of SQL Server Compact (Tech Ed
EMEA 08)&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;br&gt;
&lt;/b&gt;Covered several topics, such as the questions on how fast can SQL
Server Compact insert data.&amp;nbsp; For Tech Ed EMEA, I added the section
discussing stored procedures, and how a common DAL layer can actually provide
more functionality than sprocs for both local data and server data. (yes, I'm
sure there will be lots more to debate on this topic, but here's our thought
process J)&lt;/p&gt;

&lt;p&gt;With some coverage on private deployment, including 64bit,
deep dive on perf and the managed sprocs demos, I bubbled back up to cover
several interesting aspects for using SQL Server Compact, including a
TraceListener to capture information from the field and sync it back with Sync
Services for ADO.NET.&amp;nbsp; Then covered read only databases on DVD's and using
Compact as a custom Document format.&lt;/p&gt;

&lt;p&gt;&lt;i&gt;&lt;u&gt;Associated Demos:&lt;/u&gt;&lt;/i&gt;&lt;/p&gt;

&lt;ul type="disc"&gt;&lt;li&gt;&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SQLcePerformance.zip"&gt;SQL Server Compact Bulk
     Insert Performance Test Harness (Compares Compact &amp;amp; Express)&lt;/a&gt;&lt;br&gt;
     Demonstrates the power of an embedded database and how much faster it can
     run than SQL Server for many operations.&amp;nbsp; By implementing a few
     things, such as "connection pooling" and caching your SqlCeCommand
     objects, you can achieve similar functionality provided by SQL Server's
     connection pooling and Query Plan caching.&amp;nbsp; However, because Compact
     is "in-proc" with your application, you can get the benefits of not having
     to work through additional networking, process and security layers
     required by SQL Server which is designed to work over the network.&lt;/li&gt;&lt;li&gt;&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/ManagedSprocs.zip"&gt;Managed Stored
     Procedures (A Common DLL for data access to Compact and SQL Server)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SqlServerCeTraceListener.zip"&gt;SQL Server Compact Trace
     Listener&lt;/a&gt;&lt;br&gt;
     Demo for using Compact as a TraceListener to capture the output of
     System.Diagnostics.Trace.WriteLine and then synchronize that info back to
     the server providing visibility into what's happening out on the
     client.&amp;nbsp; This deck includes animation, which looks a bit like Missile
     Command, demonstrating how this sample works.&lt;/li&gt;&lt;li&gt;&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/RunFromReadOnlyMedia.zip"&gt;Running Compact from
     Read Only Media (DVD, CD, Locked USB Key)&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/RecipeManager.zip"&gt;Using Compact as a
     Custom Doc Format (Recipe Manager)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;&lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08ScriptBasedDeployment.pptx"&gt;&lt;b&gt;Managing and Versioning Client Databases (Tech Ed EMEA
08)&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Discusses the pros and cons of managing database deployment
on the client.&amp;nbsp; Why deploying databases as files, through MSI's, ClickOnce
or other technologies can be easy for V1, but could lead to data loss in
V2.&amp;nbsp; Why a little investment up front can yield you productive results
long term, and make for a better user experience.&lt;/p&gt;

&lt;p&gt;&lt;i&gt;&lt;u&gt;Associated Demos:&lt;/u&gt;&lt;/i&gt;&lt;/p&gt;

&lt;ul class="unIndentedList"&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/CreatingDatabaseSchemaInCode.zip"&gt;Creating
&amp;amp; Managing Local Database Versions through Scripts&lt;/a&gt; &lt;br&gt;
When deploying applications with a local database, deploying the database with
the app can seem easy at first, but once the user starts making changes to the
local database, it gets messy quickly. If you're not careful, you can
even lose the local data created/updated by the user. In &lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08ScriptBasedDeployment.pptx"&gt;this
presentation&lt;/a&gt;, I created several animated slides that explain the
complications and why script based deployment and versioning is the only
practical way to manage local databases. This sample walks through the
creation and versioning of local tables. To focus on the script based
versioning aspects, I excluded any interaction with synchronized tables as that
just gets even more complicated.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/VersioningSchema.zip"&gt;Versioning
Local Databases with Scripts when using Sync Services for ADO.NET&lt;/a&gt;&lt;br&gt;
In this demo we see how to version schemas when using Sync Services for
ADO.NET. This includes two projects. One for the initial
installation of V1, and another for the upgrade, or initial creation of
V2. V1 includes creating a set of tables that aren't synchronized, such
as state management for submitting orders to an existing service. Once sync
completes, there are a set of additional scripts to create foreign keys between
the synched tables, and between the synched tables and the local tables.&lt;br&gt;
V2 enhances the synchronized tables with additional columns. The setup of
this demo is a bit more complex as I've configured the server side sync
components in a dll, then hosted the dll in a WCF Web Project. The WCF
Web Project is published to an IIS instance, but uses different sub
directories: for V1-http://localhost/VersionSchema/&lt;b&gt;V1/&lt;/b&gt;LookupSyncService.svc,
for V2-http://localhost/VersionSchema/&lt;b&gt;V2/&lt;/b&gt;LookupSyncService.svc.
Using this versioning scheme we can publish V2, allowing apps to slowly migrate
over to V2, while the V1 apps continue to function and the business continues
to function. The animation in this &lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08ScriptBasedDeployment.pptx"&gt;presentation&lt;/a&gt;
helps explain this somewhat complex subject. &lt;/li&gt;&lt;/ul&gt;



&lt;h1&gt;&lt;b&gt;Just the demos, and nothing but the demos...&lt;/b&gt;&lt;/h1&gt;

&lt;ul class="unIndentedList"&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SqlServerCeTraceListener.zip"&gt;&lt;b&gt;SQL
Server Compact Trace Listener&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;br&gt;
&lt;/b&gt;Demo for using Compact as a TraceListener to capture the output of
System.Diagnostics.Trace.WriteLine and then synchronize that info back to the
server providing visibility into what's happening out on the client. &lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08UnlockingThePowerOfCompact.pptx"&gt;This
deck&lt;/a&gt; includes animation, which looks a bit like Missile Command,
demonstrating how this sample works.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SQLceUnderASPnet.zip"&gt;&lt;b&gt;Using
SQL Server Compact under ASP.NET&lt;/b&gt;&lt;/a&gt;&lt;br&gt;
Demonstrates how to "unblock" SQL Server Compact for usage under ASP.NET.
I discussed our reasoning in this &lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/11/27/sql-server-compact-edition-under-asp-net-and-iis.aspx"&gt;post&lt;/a&gt;.
A quick recap: The reason we blocked Compact for ASP.net scenarios was simply
to not set expectations Compact is meant to be a replacement for SQL
Server. It performs better than Jet. For the most part, we
unblocked it for pre-building a SQL Server Compact database for sync scenarios
where it's faster to download the database as a stream, then to sync the
initial snapshot of data. It's also perfectly fine for small websites or
other services. The main intention is strictly to make sure developers
know, this is not meant to compete with SQL Server. There are coding
differences between Compact and SQL Server, so we really didn't want developers
to start with Compact, only to later find out it doesn't scale to thousands of
concurrent website/service users for updating data. As long as developers
understand the scope, it's perfectly fine to use for ASP.NET, WCF, or other
service scenarios...&lt;/li&gt;&lt;li&gt;
&lt;b&gt;SqlCeResultSet Demos - Scrollable,
Updateable, ISAM like cursors&lt;br&gt;
&lt;/b&gt;Demonstrates how developers can take advantage of embedded a database
directly into your app. The best thing about the SqlCeResultSet is it
works directly over the data in your local database. No queries that
bring the results into another copy in memory that you must mange potential
conflicts with the local store, or potential conflicts between the local store
and the remote server. With the SqlCeResultSet you can scroll directly
over the local table, even setting the index to filter and order the rows
you're viewing. The SqlCeResultSet is a scrollable, updateable cursor and
can really improve the perf and overall working set of your application. &lt;/li&gt;&lt;ul&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SqlCeResultSet.zip"&gt;&lt;b&gt;Direct
Access (ISAM) with the SqlCeResultSet&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;br&gt;
&lt;/b&gt;Why do we need to make copies of the data, update it, then send it
back? In a shared database environment, where you're likely connecting to
the database across the network, and sharing with potentially thousands of
others, because it's the only way we can scale. However, when the
database is local, in-proc with the app, things can be much simpler. In
this demo, you can easily update data, and as soon as you move off the row,
it's committed to the database. To get the most of this demo, run the
same app twice (CTRL+F5). Make changes in one of the instances, move off
the row. In the other instance, move to the row that was just updated,
(note: if you're already on the row, you'll need to move off then back).
You'll see the change made by the other app and can make the change back.
The one piece missing from this scenario is an implementation of eventing so
that instance 2 would see the changes made by instance one. This is why
you must move off, then back to the row to see the change. As you move
across the rows, the DataGridView requests the data. The data is fetched
directly from the local database/table.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SQLceISAM.zip"&gt;&lt;b&gt;Another
ISAM/SqlCeResultSet demo&lt;/b&gt;&lt;/a&gt;&lt;br&gt;
In this demo we see how the index can be set to control the order of the data.
Using a system view, we can populate the ListBox with the list of potential
indexes. As you change the index, the view is updated to reflect the data
sorted by that index. What isn't covered in this demo is the ability to
"filter" the values using the SqlCeCommand.SetRange() api which uses the index
to directly filter the visible rows.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SQLcePerformance.zip"&gt;&lt;b&gt;SQL
Server Compact Bulk Insert Performance Test Harness (Compares Compact &amp;amp;
Express)&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;br&gt;
&lt;/b&gt;Demonstrates the power of an embedded database and how much faster it can
run than SQL Server for many operations. By implementing a few things,
such as "connection pooling" and caching your SqlCeCommand objects, you can
achieve similar functionality provided by SQL Server's connection pooling and
Query Plan caching. However, because Compact is "in-proc" with your
application, you can get the benefits of not having to work through additional
networking, process and security layers required by SQL Server which is designed
to work over the network.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SQLce3264.zip"&gt;&lt;b&gt;Privately
deploying both the 32 and 64bit versions of SQL Server Compact with your app&lt;/b&gt;&lt;/a&gt;&lt;br&gt;
Do your users know whether they have 32bit or 64bit machines? If they are
64bit, are they running a 64bit version of the OS? Should they have to
figure this out? Using private deployment, developers can include both
the 32 and 64bit versions of Compact so the user never has to make a choice.
Yes, it's a bit more k to include in your app, but if it "just works", is that
a small price to pay?&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/RunFromReadOnlyMedia.zip"&gt;&lt;b&gt;Running
Compact from Read Only Media (DVD, CD, Locked USB Key)&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;&lt;br&gt;
Ever get a CD or DVD in the mail. Pop it in the drive to see what's on
it, and it prompts you to install some software - yikes! Let's see if you
can use this as a Frisbee and get it in the trash across the room, J With this demo, you can deploy a large
amount of content, but stored in a Compact database so your users can run the
app, search the data, and with private deployment, you can include the Compact
engine so your users can "view the data" without having to install
anything. &lt;br&gt;
The demo is simply an extension of private deployment, but modifies the
connection string to tell Compact to open the database in ReadOnly mode, and
specifies a temp directory: &lt;br&gt;
connStr = String.Format("Data Source = {0}\Northwind.sdf;Mode = Read
Only;Temp Path={1} ", Windows.Forms.Application.StartupPath,
My.Computer.FileSystem.SpecialDirectories.Temp)&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/RecipeManager.zip"&gt;&lt;b&gt;Using
Compact as a Custom Doc Format (Recipe Manager)&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;&lt;br&gt;
Need to save data from your app in a "document"? Want to post that
"document" to a SharePoint site or email it to another team member? Want
to double click your document and launch the associated app? Since SQL
Server Compact uses a single file, code free, file format, and since it doesn't
care what extension you use, developers can use custom extensions for the
database file to launch their app. In this demo I use Click Once
enhancements in .NET FX 3.5 SP1 to associate the custom extension with my
ClickOnce installed application.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/ManagedSprocs.zip"&gt;&lt;b&gt;Managed
Stored Procedures (A Common DLL for data access to Compact and SQL Server)&lt;/b&gt;&lt;/a&gt;&lt;b&gt;
&lt;br&gt;
&lt;/b&gt;The great debate will forever continue on the debate of sprocs and its
religion or science. I wrote about this &lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/02/11/stored-procedures-and-sql-server-compact-the-great-debate.aspx"&gt;here&lt;/a&gt;,
but rather than debate the topic, here's a sample that shows how you can write
a common data access layer to target against SQL Server (Express included) and
Compact (SQLce) As outlined in &lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08UnlockingThePowerOfCompact.pptx"&gt;this
presentation&lt;/a&gt;, you can get far better scalability from your database by
moving the logic out of the database as you can create several front end
services to a single database, but you can only scale up a database so far
before you need to scale out, which today is a difficult task.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/LogicalQueuing.zip"&gt;&lt;b&gt;Logical
Queuing&lt;/b&gt;&lt;/a&gt;&lt;br&gt;
In a service oriented world, is it really practical to assume all "services"
can be synchronized? Or, is it a mixture of synchronizing some data, and
submitting to existing, non synchable services that really touches on
reality? In this demo, associated by this &lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/08/21/sync-services-forado-net-and-sql-server-compact-presentation.aspx"&gt;blog
post&lt;/a&gt;, I demonstrate why using a database as your "queue" to services
provides much more practical and realistic methods for working with existing
services than expecting all the existing services to rev to support
"sync". Sync is a very important technology, but no one technology
serves all. In this &lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/10/18/evolution-or-revolution-for-moving-to-offline-architectures.aspx"&gt;blog
post&lt;/a&gt; I noted down some thoughts, but not as polished as I was hoping to
post.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/ExcelWorkbook.zip"&gt;&lt;b&gt;Using
Compact within Excel&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;br&gt;
&lt;/b&gt;Ginny Caughey and I co-presented at Tech Ed US in 08. Ginny assembled
some great demos on using SQL Server Compact within VSTO, particularly within
Excel. &lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/DatabaseViewer.zip"&gt;&lt;b&gt;Database
Viewer&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;&lt;br&gt;
Every wanted to just look inside a SQL Server Compact Database, but didn't want
to install Visual Studio or SQL Server Management Studio Express? With
this little utility you can see the list of tables, and the data within each
table. Not a full featured app, but rather a utility I use to show
encryption or the ability to open a database across multiple users. It
does show how to query the system views to get the list of tables.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/CreatingDatabaseSchemaInCode.zip"&gt;&lt;b&gt;Creating
&amp;amp; Managing Local Database Versions through Scripts&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;br&gt;
&lt;/b&gt;When deploying applications with a local database, deploying the database
with the app can seem easy at first, but once the user starts making changes to
the local database, it gets messy quickly. If you're not careful, you can
even lose the local data created/updated by the user. In &lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08ScriptBasedDeployment.pptx"&gt;this
presentation&lt;/a&gt;, I created several animated slides that explain the
complications and why script based deployment and versioning is the only
practical way to manage local databases. This sample walks through the
creation and versioning of local tables. To focus on the script based
versioning aspects, I excluded any interaction with synchronized tables as that
just gets even more complicated.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/VersioningSchema.zip"&gt;&lt;b&gt;Versioning
Local Databases with Scripts when using Sync Services for ADO.NET&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;br&gt;
&lt;/b&gt;In this demo we see how to version schemas when using Sync Services for
ADO.NET. This includes two projects. One for the initial
installation of V1, and another for the upgrade, or initial creation of
V2. V1 includes creating a set of tables that aren't synchronized, such
as state management for submitting orders to an existing service. Once sync
completes, there are a set of additional scripts to create foreign keys between
the synched tables, and between the synched tables and the local tables.&lt;br&gt;
V2 enhances the synchronized tables with additional columns. The setup of
this demo is a bit more complex as I've configured the server side sync
components in a dll, then hosted the dll in a WCF Web Project. The WCF
Web Project is published to an IIS instance, but uses different sub
directories: for V1-http://localhost/VersionSchema/&lt;b&gt;V1/&lt;/b&gt;LookupSyncService.svc,
for V2-http://localhost/VersionSchema/&lt;b&gt;V2/&lt;/b&gt;LookupSyncService.svc.
Using this versioning scheme we can publish V2, allowing apps to slowly migrate
over to V2, while the V1 apps continue to function and the business continues
to function. The animation in this &lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08ScriptBasedDeployment.pptx"&gt;presentation&lt;/a&gt;
helps explain this somewhat complex subject. &lt;/li&gt;&lt;/ul&gt;





























&lt;p&gt;&lt;strong&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/strong&gt;&lt;a href="http://steve.lasker.members.winisp.net/Demos/TechEdEMEA07/Express/ExpressScriptDeploy.zip"&gt;&lt;b&gt;Deploying
Express with Scripts&lt;/b&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Similar to the Compact deployment model, but with the
additional steps required to create the physical mdf/ldf combination.&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul class="unIndentedList"&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/CompactEntityProviderPrivateDeployment.zip"&gt;Private
Deployment using the ADO.NET Entity Provider&lt;/a&gt;&lt;br&gt;
One of the most popular features of SQL Server Compact is its ability to
privately deploy the Compact runtime as a set of dlls directly within your
application. But when using the ADO.NET Entity framework, things get a
little more difficult as the Entity Framework uses the Provider Factory model
for loading the individual data providers. I discussed this in more
detail in &lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/10/22/privately-deploying-sql-server-compact-with-the-ado-net-entity-provider.aspx"&gt;this
post&lt;/a&gt;, but here's a sample showing how to include the dlls and changes in
app.config to work properly. &lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/CommonDataDeviceDesktop.zip"&gt;Common
Programming between Desktop &amp;amp; Device&lt;/a&gt; &lt;br&gt;
While SQL Server Compact provides the same apis between desktop and device
(.NET Framework and the .NET Compact Framework), it can get a little more
complex as the surrounding apis, such as the lack of the |DataDirectory| macro,
and the lack of settings make it more difficult. This project shows a
strategy for filling in the missing pieces of the .NET Compact framework so you
can compile the same sourcecode for desktop, then device.&lt;/li&gt;&lt;/ul&gt;



&lt;h1&gt;Other interesting
links to previous posts:&lt;/h1&gt;

&lt;ul class="unIndentedList"&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/04/10/SqlEverywhereInfo.aspx"&gt;Information
about SQL Server Compact Edition (SQLce) &lt;/a&gt;- the original post when we
unlocked SQL Server Mobile for desktop usage&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/07/06/SQLServerEverywhereDeploymentOptions.aspx"&gt;Screencast
of Deployment Options for SQL Server Compact&lt;/a&gt; - shows how to deploy Compact
privately. This has changed now that we've incorporated 64bit deployment
as well, so suggest you also look at: &lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/10/22/privately-deploying-sql-server-compact-with-the-ado-net-entity-provider.aspx"&gt;Privately
Deploying SQL Server Compact with the ADO.NET Entity Provider&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/07/07/SqlServerEverywhereResultSet.aspx"&gt;ADO.net
Programming options for SQL Server Compact&lt;/a&gt; discussion of DataSets,
SqlCeResultSet, and the pending LINQ programming models (this was originally
posted before we launched VS 2008)&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/11/08/comparing-sql-server-express-and-compact-editions-whitepaper.aspx"&gt;Comparing
SQL Server Express and Compact Editions Whitepaper&lt;/a&gt; - an older, but still
relevant and accurate discussion Mike Wachal and I put together describing the
pros and cons of each engine&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/11/13/doc-storage-in-sqlce-and-the-4gb-limit.aspx"&gt;Doc
storage in SQLce and the 4gb limit&lt;/a&gt; a bit of discussion on why we have a 4gb
limit, and how this is a technical, not business reason. At some point,
in a future version/incarnation of SQL Server Compact, we will remove this
limitation.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/11/14/bill-vaughn-writes-an-ebook-on-sql-server-compact-edition.aspx"&gt;Bill
Vaughn writes an eBook on SQL Server Compact Edition&lt;/a&gt; - A good, cheap, quick
book to get you started&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/11/27/sql-server-compact-edition-under-asp-net-and-iis.aspx"&gt;SQL
Server Compact Edition under ASP.net and IIS&lt;/a&gt; - why is this blocked by
default?&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/03/18/QAforOCS_2D00_SyncServicesForAdoNet.aspx"&gt;Q&amp;amp;A
on OCS &amp;amp; Sync Services for ADO.NET&lt;/a&gt; - an initial discussion on the
positioning of Sync Services for ADO.NET, RDA and Merge Replication. This
was posted prior to us announcing the Sync Framework. &lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/03/21/additional-q-a-on-the-visual-studio-orcas-sync-designer.aspx"&gt;Additional
Q&amp;amp;A on the Visual Studio Orcas Sync Designer&lt;/a&gt; - Additional information
on the VS 2008 Sync Designer, including what it does and doesn't attempt to
solve.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/03/22/first-look-at-the-visual-studio-orcas-sync-designer.aspx"&gt;First
look at the Visual Studio Orcas Sync Designer&lt;/a&gt; - A screencast showing how to
use the VS 2008 Sync Designer&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/03/23/going-n-tier-w-wcf-synchronizing-data-using-sync-services-for-ado-net-and-sql-server-compact-edition.aspx"&gt;Going
N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server
Compact Edition &lt;/a&gt;- A screencast showing how to take the default "2
tier" configuration to "N-Tier"&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/05/14/empowering-your-users-with-reference-data-and-knowledge.aspx"&gt;Empowering
your users with reference data and knowledge&lt;/a&gt; - A discussion related to
whether it's realistic to assume we can implement a common programming model
between the server and local database (regardless of whether you use Express or
Compact locally)&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/08/07/configuring-visual-studio-2005-for-use-wtih-sql-server-2005-compact-edition.aspx"&gt;Configuring
Visual Studio 2005 for use with SQL Server 2005 Compact Edition &lt;/a&gt;- SQL
Server Compact 3.1 shipped just after VS 2005 SP1. So how do you get
these working together?&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/08/10/notification-to-pull.aspx"&gt;Notification
to Pull&lt;/a&gt; - A bit of an architectural conversation on where Sync, existing
services, queuing, and local data fit into an application architecture.
The demo for this discussion is &lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/LogicalQueuing.zip"&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/08/30/sql-server-compact-3-5-features.aspx"&gt;SQL
Server Compact 3.5 Features&lt;/a&gt; - A quick recap of what shipped in Compact 3.5&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/02/11/stored-procedures-and-sql-server-compact-the-great-debate.aspx"&gt;Stored
Procedures and SQL Server Compact - the Great Debate&lt;/a&gt; - the title says it
all&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/01/15/msdn-webcast-introducing-sql-server-compact-3-5.aspx"&gt;MSDN
Webcast: Introducing SQL Server Compact 3.5 &lt;/a&gt;a webcast covering our 3.5
release&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/11/07/presentations-demos-from-tech-ed-barcelona-07.aspx"&gt;Presentations
&amp;amp; Demos from Tech Ed Barcelona 07&lt;/a&gt; - There are more up to date demos,
but this is where we first announced the deprecation of RANU or otherwise known
as User Instances. This deck also covered the script based deployment and
management of SQL Server Express.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/10/18/evolution-or-revolution-for-moving-to-offline-architectures.aspx"&gt;Evolution
or Revolution for moving to offline architectures&lt;/a&gt; - a high level discussion
on mapping today's programming concepts (get &amp;amp; put), and converging them to
a more "occasionally connected" or online optimized model where get=cache,
put=queue, and we add sync to the common verbs used with working with data&lt;/li&gt;&lt;/ul&gt;





































&lt;h1&gt;Some great partner
tools&lt;/h1&gt;

&lt;ul class="unIndentedList"&gt;&lt;li&gt;
&lt;a href="http://www.primeworks-mobile.com/Products/DataPortConsole.html"&gt;Data Port
Console&lt;/a&gt; by Primeworks&lt;br&gt;
Great tool for scripting tables from SQL Server Compact. For only $50,
it's hard to beat&lt;/li&gt;&lt;li&gt;
&lt;a href="http://www.gui-innovations.com/html/remotesqlce.html"&gt;Remote SQLce&lt;/a&gt;&lt;br&gt;
Great tool for managing a Compact database on the device, from the desktop &lt;/li&gt;&lt;li&gt;
&lt;a href="http://www.codeplex.com/"&gt;CodePlex&lt;/a&gt;&lt;br&gt;
Codeplex is starting to collect several great code projects related to SQL
Server Compact. I'm sure this will continue to grow, so it's a great
place to look for what pain someone else has already endured &lt;/li&gt;&lt;ul&gt;&lt;li&gt;
&lt;a href="file:///C:/Users/SteveLas.REDMOND/AppData/Local/Temp/Search%20for%20SQLce"&gt;Search
for SQLce&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
&lt;a href="http://www.codeplex.com/Project/ProjectDirectory.aspx?ProjectSearchText=sql%20compact"&gt;Search
for SQL Compact&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;









&lt;h1&gt;Great books&lt;/h1&gt;

&lt;ul class="unIndentedList"&gt;&lt;li&gt;
&lt;a href="http://www.hitchhikerguides.net/"&gt;&lt;b&gt;HitchhikerGuides.net
&lt;/b&gt;&lt;/a&gt;&lt;b&gt;- &lt;/b&gt;Bill Vaughn&lt;br&gt;
Bill has a great, no BS style that just helps you get to the facts. It's
a quick read, and at only $10, it's hard to pass up when you want to get up to
speed quickly on Compact.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://www.amazon.com/Microsoft-SQL-Server-2005-Compact/dp/0672329220/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1225297297&amp;amp;sr=8-1"&gt;&lt;b&gt;Microsoft
SQL Server 2005 Compact&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;- Prashant Dhingra&lt;br&gt;
Prashant originally worked in the Compact team, and provides a great insiders
look at SQL Server Compact&lt;/li&gt;&lt;li&gt;
&lt;a href="http://shop.campusmvp.com/Product-SQL-Server-Compact-2008-SP1-Referencia-Completa_34.aspx"&gt;&lt;b&gt;SQL
Server Compact &lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;i&gt;(In Spanish)&lt;/i&gt;&lt;/b&gt;- Jose M. Torres &lt;br&gt;
If you're looking for a book on Compact in Spanish, here you go. I wish I
could say I've read it, but, it's been years since I was at all fluent in
Spanish. From what I have flipped through, it looks like it's covered all
the topics. Jose has been active in the community, so I'd say it's a
great bet.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://www.amazon.com/Windows-Mobile-Synchronization-Server-Compact/dp/0979891205/ref=pd_bbs_sr_2?ie=UTF8&amp;amp;s=books&amp;amp;qid=1225297297&amp;amp;sr=8-2"&gt;&lt;b&gt;Windows
Mobile Data Synchronization&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;- Rob Tiffany&lt;br&gt;
Need some help, or want to know about Merge Replication? Might as well
get it from the mast of Merge - Rob Tiffany. Rob spends his time
traveling around the world helping customers scale and configure Merge.
If it's been done, Rob has seen it, and likely has helped get it working.&lt;/li&gt;&lt;/ul&gt;







&lt;h1&gt;Other Support/Info
Channels&lt;/h1&gt;

&lt;h2&gt;SQL Server Compact
Blogs &amp;amp; Forums&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/SteveLasker"&gt;Steve Lasker's
Blog&lt;/a&gt;&lt;br&gt;
The blog you got this document from, :) Lots of information on how we got here,
demos and powerpoints.&amp;nbsp; But, since I've moved off the team, won't be able
to maintain the information going forward, so I'd recommend the following blogs
going forward.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/SqlServerCompact"&gt;SQL Server
Compact Team Blog&lt;/a&gt;&lt;br&gt;
Where most of the team posts info.&amp;nbsp; Everything from our encryption
details, Entity support, query processor details, etc.&amp;nbsp; You can think of
it as the authoritative source.&amp;nbsp; Even Laxmi posts to the Team Blog as well
as his own...&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/Laxmi"&gt;Laxmi's Blog&lt;/a&gt;&lt;br&gt;
One of great and passionate developers on the SQL Server Compact team.&amp;nbsp; Be
careful what you ask for, ‘cause Laxmi will tell you J.&amp;nbsp; Seriously, Laxmi spends a lot of time in the forums
listening and answering the issues and has a lot of experience with the
product.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://forums.microsoft.com/msdn/showforum.aspx?forumid=152&amp;amp;siteid=1"&gt;SQL
Server Compact Forums&lt;/a&gt;&lt;br&gt;
Where the team and our MVPs hang out to answer your questions.&amp;nbsp; In
addition to the product team, you'll also find answers from those that are
actually using the product.&amp;nbsp; We've gotten some great info here as well for
how the product is actually used, as opposed to what we thought developers
would do with Compact &amp;lt;g&amp;gt;&lt;/p&gt;

&lt;h1&gt;Sync Framework/Sync
Services for ADO.NET Blogs &amp;amp; Forums&lt;/h1&gt;

&lt;p&gt;&lt;a href="http://msdn.com/sync"&gt;Sync Development Center&lt;/a&gt;&lt;br&gt;
The home for the sync team and discusses the Sync Framework as well as Sync
Services for ADO.NET.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/sync/"&gt;Sync Team Blog&lt;/a&gt;&lt;br&gt;
Less formal information on Sync Services and the Sync Framework&lt;/p&gt;

&lt;p&gt;&lt;a href="http://forums.microsoft.com/sync/default.aspx?ForumGroupID=529&amp;amp;SiteID=75"&gt;Sync
Framework/Sync Services for ADO.NET Forums&lt;/a&gt;&lt;br&gt;
A great place to post questions and find answers from the Sync team&lt;/p&gt;





&lt;p&gt;&lt;a href="http://www.syncguru.com/"&gt;Syncmaster Rafik website&lt;/a&gt;
and &lt;a href="http://blogs.msdn.com/synchronizer/"&gt;Blog&lt;/a&gt;&lt;br&gt;
Rafik Robeal was one of our core developers for Sync Services for ADO.NET and
has all the nuts and bolts knowledge for what we originally built.&amp;nbsp;
Unfortunately, Rafik has moved onto other ventures.&amp;nbsp; However, he's still
got some great content on his site.&lt;/p&gt;&lt;p&gt;Enjoy the holidays,&lt;/p&gt;&lt;p&gt;Steve&amp;nbsp;



&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9142840" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Code+Samples/default.aspx">Code Samples</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Presentations/default.aspx">Presentations</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Q_2600_amp_3B00_A/default.aspx">Q&amp;amp;A</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/SQLce/default.aspx">SQLce</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Sync+Services/default.aspx">Sync Services</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/SQL+Server+Compact+Edition/default.aspx">SQL Server Compact Edition</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/OCS/default.aspx">OCS</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/offline/default.aspx">offline</category></item><item><title>Evolution or Revolution for moving to offline architectures</title><link>http://blogs.msdn.com/stevelasker/archive/2008/10/18/evolution-or-revolution-for-moving-to-offline-architectures.aspx</link><pubDate>Sat, 18 Oct 2008 03:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9003995</guid><dc:creator>Steve.Lasker</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/stevelasker/comments/9003995.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevelasker/commentrss.aspx?PostID=9003995</wfw:commentRss><description>&lt;P&gt;There's been a lot of talk, momentum and questioning for where and how occasionally connected designs fit into the application landscape.&amp;nbsp; There have been a lot of questions for "if and how" developers can take their existing apps "offline".&amp;nbsp; There have been a number of efforts for enabling offline apps and some longer term plans.&amp;nbsp; In VS 2008 (Orcas) we introduced Sync Services for ADO.NET as a developer focused way to synchronize data.&amp;nbsp; The roadmap continues with the Microsoft Sync Framework releases.&amp;nbsp; We've started to show "Astoria Offline" as a means to enable sync over REST based HTTP protocols enabling more generic services.&amp;nbsp; But do any of these "solve the problem".&amp;nbsp; It's been a while since I've done a brain dump on some thoughts related to the evolution vs. revolution of app models, so what better way to dump thoughts than a blogicle.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Can you take your current app and make it offline?&lt;BR&gt;&lt;/B&gt;The reality is "it depends".&amp;nbsp; There are so many app designs, it's hard to say definitely what works and what doesn't.&amp;nbsp; There are some well established things that have worked and haven't, but it's not fair to say these apply 100% of the time.&amp;nbsp; One size doesn't fit all.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Intercept/fall back&lt;BR&gt;&lt;/B&gt;Do you go with the intercept model?&amp;nbsp; When online and connected, the app communicates directly to the service.&amp;nbsp; (Note I'm using "service" here to represent any remote source.&amp;nbsp; It could be a database "service" a Web Service, a WCF service, or some other API that's only available when your device is connected to "the network").&amp;nbsp; When the network falls away, the app &lt;B&gt;"falls back"&lt;/B&gt; to a local "cache".&lt;/P&gt;
&lt;P&gt;This is generally a bad (opinion), or complicated (fact) model.&amp;nbsp; This assumes one of two things.&amp;nbsp; Either your user knows they're going offline and they synchronize before they yank the cable or they predict when the network fails.&amp;nbsp; Of course the application can constantly synchronizing data in the background.&amp;nbsp; Crystal ball? When do you really know or have time to sync beforehand?&amp;nbsp; You're working in your office, and Outlook pops up reminder.&amp;nbsp; Or worse, you get an IM or Text message asking "where are you".&amp;nbsp; You grab your laptop and run... oh, wait, you forgot to sync.&amp;nbsp; Do you have the info needed for the meeting?&amp;nbsp; &lt;/P&gt;
&lt;P&gt;For the background sync, one of two things could be happening.&amp;nbsp; When you "fall offline", your view of data suddenly changes because your local copy is so out of date compared to the data you were just looking at, or your synching often enough that there's no difference, asking why you're even trying to work online in the first place.&amp;nbsp; Or, you've effectively created a denial of service attack by asking, has anything changed, has anything changed, has anything changed?&lt;/P&gt;
&lt;P&gt;Outlook 2003 (I think that was the version) tried this fallback model.&amp;nbsp; It was awful.&amp;nbsp; You're sitting in your office, writing an email, looking at your inbox.&amp;nbsp; The network goes down, your inbox view completely changes, or worse Outlook froze, and you lost that message you were carefully wording.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Always work locally&lt;BR&gt;&lt;/B&gt;In this model, you synchronize everything you need, and make all your interactions against the local store.&amp;nbsp; This is sort of the Outlook model today (Outlook 2007).&amp;nbsp; There are equal problems here.&amp;nbsp; Is it realistic to have all the data locally?&amp;nbsp; Even Outlook data can be significantly large, and that's clearly your data.&amp;nbsp; What about public folders?&amp;nbsp; By default, these are only available online.&amp;nbsp; If you're online, they work.&amp;nbsp; If you're not, they don't.&amp;nbsp; Fairly straight forward; but what about historical data for all the products the company has shipped?&amp;nbsp; What about your list of customers, or the current list of stocks and their prices?&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The reality is data volume is growing at an exponential rate.&amp;nbsp; Storage continues to get cheaper and faster.&amp;nbsp; 1TB disks and Solid State storage are becoming mainstream.&amp;nbsp; The problem is while connectivity is getting better; the bandwidth isn't increasing at the same rate.&amp;nbsp; And, even as it does, is it realistic to have everything local?&amp;nbsp; Do you keep one of everything that Home Depot or Safeway keeps in stock?&amp;nbsp; Would be really nice, but not all that practical.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;One size fits nobody&lt;BR&gt;&lt;/B&gt;The reality is there's no easy answer.&amp;nbsp; This is really an architectural and user model change is required to make this happen.&amp;nbsp; We've been through these before.&amp;nbsp; In the "old times", families ate what they grew.&amp;nbsp; Corn, milk, meat, etc.&amp;nbsp; Others only had Ice or Milk that was delivered to their house daily.&amp;nbsp; You could think of this as the "online model".&amp;nbsp; Today, we go shopping to &lt;A href="http://www.safeway.com/"&gt;Safeway&lt;/A&gt;, &lt;A href="http://dagnyc.com/"&gt;D'Agostino&lt;/A&gt;, or your local grocery store.&amp;nbsp; The stores don't grow anything locally.&amp;nbsp; They stock goods they get from somewhere else.&amp;nbsp; You take stuff home and stock it in your pantry, frig, freezer.&amp;nbsp; When you throw out the garbage it goes into the can.&amp;nbsp; The can gets picked up on Thursday.&amp;nbsp; It gets taken to &lt;A href="http://www.beavertonoregon.gov/departments/recycling/information/graphics/garbpath.jpg"&gt;the transfer station&lt;/A&gt;, and then off to the dump.&amp;nbsp; The point is we have lots of "store and forward"/sync models already in place.&amp;nbsp; What's really interesting is the "online" things are actually more expensive.&amp;nbsp; It turns out it's cheaper to stock goods that may be used, and accept a percentage of loss for things that don't sell than it is to create on demand.&amp;nbsp; Why do we think electronic bits and bytes should be "online" only?&amp;nbsp; Why are 1's and 0's more expensive than physical goods?&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Evolutionary approach: Mapping concepts&lt;BR&gt;&lt;/B&gt;If we look at the concepts we have today in web/service/stateless models, they break down into two common, and one advanced models:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Get&lt;BR&gt;&lt;/B&gt;Get maps very easily to HTTP:Get.&amp;nbsp; Essentially you make a request to a domain, application and method.&amp;nbsp; You likely pass parameters and of course all the authentication goo.&amp;nbsp; The result of the get is returned and you now have a copy of information relevant to that point in time, and the specific question you've asked.&amp;nbsp; Most likely, but no guarantee it's accurate by the time you quickly display it on your 64bit, quad laptop with a gigabit connection to the internet.&amp;nbsp; Even historical data is subject to "correctness"- remember the Florida elections J&amp;nbsp; But, we live with "copies" all the time.&amp;nbsp; Copies are tangible, things that are "just there".&amp;nbsp; There's a separate question of how "out of date" the copy is.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Submit&lt;BR&gt;&lt;/B&gt;You have some information you're sending back.&amp;nbsp; You expect some action to be taken on the data you're submitting.&amp;nbsp; That submit can be accepted, rejected or modified.&amp;nbsp; You get an immediate response, but no guarantee what you've submitted will be accepted.&amp;nbsp; That might happen later on, it might not.&amp;nbsp; You hope, or expect to be notified if something changes.&amp;nbsp; But is that concept built into our app models?&amp;nbsp; Or, do we just assume the world is globally connected, and everything is always running so things can be asked and answered immediately, with 100% accuracy, in one big transaction so no two people can allocate the same "goods".... Whew, that's as ridiculous to assume as it is to type.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Can Get and Submit evolve?&lt;BR&gt;&lt;/B&gt;With &lt;B&gt;Get&lt;/B&gt;, you &lt;I&gt;can&lt;/I&gt; implement a "caching" model.&amp;nbsp; Rather than Get directly from the source, imagine you &lt;B&gt;Get&lt;/B&gt; through an abstraction layer.&amp;nbsp; For each Get the abstraction layer keys off the domain/app/method and name/value pairs for parameters.&amp;nbsp; Let's say I make a service call to: &lt;A href="http://acmeservices.com/Books/GetBookByName.asmx"&gt;http://AcmeServices.com/Books/GetBookByName.asmx&lt;/A&gt;.&amp;nbsp; I pass in:&amp;nbsp; Title=SQL Server Compact&amp;nbsp; &lt;/P&gt;
&lt;P&gt;In the GetCache, it looks for the service and name/value pairs that match.&amp;nbsp; If it finds a result, it may not have to actually make the network call.&amp;nbsp; It &lt;I&gt;could&lt;/I&gt; just return the cached result.&amp;nbsp; But what about stale data?&amp;nbsp; You can put an expiration policy on the cache.&amp;nbsp; For a list of states, a day is likely more than generous.&amp;nbsp; For pricing, maybe an hour.&amp;nbsp; The point is you can customize this per source.&amp;nbsp; For many things, one could argue most queries, the data is fairly static and the app could benefit immensely by caching the "gets".&amp;nbsp; If, however, you were to look online first, than only if the resource wasn't available look in the local cache than what benefit are you getting?&amp;nbsp; Sure, the app would "work offline", but you don't see any benefit in the online mode.&amp;nbsp; Each request still takes the time to roundtrip.&amp;nbsp; If you implement a smart caching model you can provide dramatically faster user responses. ...and in most cases, the data is perfectly accurate.&amp;nbsp; Now it would sure be nice to know when something changes, so if California does sink, Iraq or Canada become the 51&lt;SUP&gt;st&lt;/SUP&gt; state, you don't have to watch CNN and ask all your clients to either wait for the cache to update, or "invalidate" the cache.&amp;nbsp; I talked about notifications a bit &lt;A href="http://blogs.msdn.com/stevelasker/archive/2007/08/10/notification-to-pull.aspx"&gt;here&lt;/A&gt;, so I'll keep going. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Submit&lt;BR&gt;&lt;/B&gt;This one gets interesting as well.&amp;nbsp; You have an order to submit for some widgets.&amp;nbsp; Sure, you can submit directly to a "Web Service", or web page.&amp;nbsp; But in many situations the order submission doesn't actually mean the order will ship.&amp;nbsp; Accounting needs to verify your credit.&amp;nbsp; The products that were supposed to be in stock may have been routed to a bigger customer, or "fell off the truck".&amp;nbsp; Again, the point is just because you may get an immediate acknowledgement the order was accepted, doesn't mean it will be fulfilled.&amp;nbsp; So, why not accept this as the model, and when it works, it just works.&amp;nbsp; When a problem occurs, it's not really a problem because it's built into the system.&amp;nbsp; What if you "queued it up" for sending?&amp;nbsp; In this case we save the message locally, in a "logical queue", and when the service is available, we send it on its way.&amp;nbsp; I used the term "logical queuing" as I'm not implying you must use something like SQL Server Broker, MSMQ or WCF Queues, etc.&amp;nbsp; These tend to be a bit over complicated for what you need on the client, and it makes it difficult to act, query or evaluate the data in its transient state.&amp;nbsp; A while back I wrote a blogicle on and some samples for &lt;A href="http://blogs.msdn.com/stevelasker/archive/2007/08/21/sync-services-forado-net-and-sql-server-compact-presentation.aspx"&gt;Logical Queuing&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Sync&lt;BR&gt;&lt;/B&gt;This is what some might assume is the answer to all of these problems.&amp;nbsp; If I can synchronize changes from other nodes (the server and other clients) with my local store, and I can make changes locally and have them synchronize back "up" to the other nodes, doesn't that solve everything?&amp;nbsp; In the land of demos, sure.&amp;nbsp; But in the real world there are just too many complications.&amp;nbsp; The volume of data, requirements for business logic, and workflow make it difficult to assume Sync can solve all the problems.&amp;nbsp; Where sync does do really well is for synchronizing reference data.&amp;nbsp; That list of states, codes, or even larger volumes like the product catalog.&amp;nbsp; The &lt;A href="http://blogs.msdn.com/stevelasker/archive/2007/08/21/sync-services-forado-net-and-sql-server-compact-presentation.aspx"&gt;Logical Queuing&lt;/A&gt; blogicle and sample demonstrate some thoughts here.&amp;nbsp; I recently saw some work the Microsoft Mobile Line of Business CRM team, and it also uses a similar model.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Revolution is on the horizon&lt;BR&gt;&lt;/B&gt;With all the complications and half way solutions, you have to wonder what's the real answer to all this mess.&amp;nbsp; Will this problem just go away because we'll have high speed internet available everywhere?&amp;nbsp; Even if you could be guaranteed internet access everywhere, do we think that every service will be available all the time?&amp;nbsp; As the world gets more connected, will systems be more reliable and capable of enlisting in massive distributed transactions?&amp;nbsp; Or, will computing systems evolve to what every other large scale system as evolved to. Queuing, Caching, Reserving, Buffering, Acknowledgement, Conflict Detection &amp;amp; Resolution and Notifications.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;While I talked a bit about the food supply earlier, this is also a bit like the VB Classic to Web transition.&amp;nbsp; For those old enough to remember the great 90's there was a big transition from "fat clients" to "thin clients".&amp;nbsp; No subtle suggestion of which is better there J&amp;nbsp; When developers first started building ASP Classic (pre .net) apps they simply moved their session state to the ASP Session object.&amp;nbsp; Which meant web servers could serve about 5-10 people before falling over.&amp;nbsp; Not exactly the promise we had all hoped for.&amp;nbsp; It took a while to realize the app models had to change. But, moving from Client apps to Web apps was a bit more obvious.&amp;nbsp; Mostly because the UI changed (for the worse), but at least users could get their work done because we couldn't get the VB apps deployed.&amp;nbsp; (yes, I'm over simplifying things, but run with me for a minute).&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Since developers had to re-write their UI anyway, it was an obvious change.&amp;nbsp; Making the transition from online to offline mode apps isn't as obvious.&amp;nbsp; The only UI required is the UI really telling them when problems occur.&amp;nbsp; Who wants that?&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;The reality is things are a changing.&amp;nbsp; Nothing to announce, nothing to promise, but there is a revolution on the way.&amp;nbsp; Revolutions take time for people to live through denial that it's coming, but it comes as a wave of reality that just smacks you with "duhh, I guess that was a stupid assumption".&lt;/P&gt;
&lt;P mce_keep="true"&gt;While we all wait for the revolution, you can look at things like ADO.NET Sync Services, the Sync Framework, Astoria Offline, and lots of goodies the Patterns and Practices team has done.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Steve&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9003995" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Microsoft+Synchronization+Platform/default.aspx">Microsoft Synchronization Platform</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Sync+Services/default.aspx">Sync Services</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/OCS/default.aspx">OCS</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/offline/default.aspx">offline</category></item></channel></rss>