Skip to content

Commit 8aac1a4

Browse files
authored
First pass at the documentation. (#76)
1 parent 89697c1 commit 8aac1a4

File tree

676 files changed

+65447
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

676 files changed

+65447
-3
lines changed

.github/workflows/build-docs.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Deploy Hugo site to Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths: [ 'docs/**' ]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
defaults:
19+
run:
20+
shell: bash
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
env:
26+
HUGO_VERSION: 0.132.0
27+
steps:
28+
- name: Install Hugo CLI
29+
run: |
30+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
31+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
32+
33+
# - name: Install Dart SASS
34+
# run: sudo snap install dart-sass
35+
36+
- name: Checkout Repository
37+
uses: actions/checkout@v4
38+
with:
39+
submodules: recurisive
40+
fetch-depth: 0
41+
42+
- name: Setup Pages
43+
id: pages
44+
uses: actions/configure-pages@v5
45+
46+
- name: Install Node.js dependencies
47+
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
48+
49+
- name: Build with Hugo
50+
env:
51+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
52+
HUGO_ENVIRONMENT: production
53+
TZ: America/Los_Angeles
54+
run: hugo --gc --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
55+
56+
- name: Upload artifact
57+
uses: actions/upload-pages-artifact@v3
58+
with:
59+
path: ./public
60+
61+
deploy:
62+
environment:
63+
name: github-pages
64+
url: ${{ steps.deployment.outputs.page_url }}
65+
runs-on: ubuntu-latest
66+
needs: build
67+
steps:
68+
- name: Deploy to GitHub Pages
69+
id: deployment
70+
uses: actions/deploy-pages@v4
71+

docs/.hugo_build.lock

Whitespace-only changes.

docs/archetypes/default.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
+++
2+
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
3+
date = {{ .Date }}
4+
draft = true
5+
+++

docs/content/_index.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
+++
2+
archetype = "home"
3+
title = "Datasync Community Toolkit"
4+
description = "A set of .NET libraries for synchronizing data between cloud and device databases."
5+
+++
6+
7+
## What is the Datasync Community Toolkit
8+
9+
The Datasync Community Toolkit is a free [dotnet Foundation] [Community Toolkit] set of libraries that assists in providing offline data to your desktop and mobile applications. The data is stored in the cloud and synchronized to a local Sqlite database.
10+
11+
{{% badge style="primary" title="Version" %}}8.0.0{{% /badge %}}
12+
13+
## Get started
14+
15+
* Step 1: [Set up your datasync service.](setup/server.md)
16+
17+
* Step 2: [Update your desktop or mobile app.](setup/client.md)
18+
19+
## Samples
20+
21+
* [A sample server](samples/server.md)
22+
* [Sample clients](samples/todoapp)
23+
* [AvaloniaUI](samples/todoapp/avalonia.md)
24+
* [MAUI](samples/todoapp/maui.md)
25+
* [Uno Platform](samples/todoapp/uno.md)
26+
* [WinUI3](samples/todoapp/winui3.md)
27+
* [WPF](samples/todoapp/wpf.md)
28+
29+
## More information
30+
31+
* [In-depth with your ASP.NET Core datasync server](in-depth/server/)
32+
* [In-depth with your client application](in-depth/client/)
33+
34+
<!-- Links -->
35+
[dotnet Foundation]: https://dotnetfoundation.org/
36+
[Community Toolkit]: https://learn.microsoft.com/dotnet/communitytoolkit/

docs/content/in-depth/_index.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
+++
2+
title = "In-depth"
3+
weight = 100
4+
+++
5+
6+
## Offline data synchronization
7+
8+
Offline data synchronization is a useful tool that synchronizes data from a cloud-based database to a Sqlite database stored with your application. When you app is offline, you can still create, modify, and search the data. Data is synchronized when your device is online.
9+
10+
Offline data synchronization has several benefits:
11+
12+
* Improves app responsiveness
13+
* Improves app reliability when there is bad network connectivity
14+
* Limits network use on high-latency or metered networks
15+
* Supports disconnected use.
16+
17+
## How does offline sync work?
18+
19+
Your client code implements a special Entity Framework Core database context using a Sqlite database. As you make changes to the data within the database context on the local store, each operation is stored in an operations queue. No network communication happens until you push the changes stored in the operations queue to the remote service. Similarly, you pull changes from the remote service to be stored in the local store.
20+
21+
### Incremental synchronization
22+
23+
The Datasync Community Toolkit implements incremental synchronization. Only records that have changed since the last pull operation are fetched. Incremental synchronization saves time and bandwidth when you are processing large tables.
24+
25+
For each unique query, the `UpdatedAt` property of the last successfully transferred record is stored as a "delta token" in the local database context.
26+
27+
### Performance and consistency
28+
29+
Synchronization sometimes stops prematurely. For example:
30+
31+
* The network that you are using for synchronization becomes unavailable during the synchronization process.
32+
* You force-close the application during synchronization.
33+
34+
When fetching records, data is transmitted in pages - each page contains a number of records. The database context is updated and then the records are saved to the database at the end of each page of records (unless you disable that facility).

0 commit comments

Comments
 (0)