Skip to content

Commit 0631a13

Browse files
DOC-9971 Install & hello world re-org
1 parent b8d3493 commit 0631a13

5 files changed

Lines changed: 256 additions & 170 deletions

File tree

modules/hello-world/pages/overview.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
= Couchbase .NET SDK 3.2
1+
= Couchbase .NET SDK 3.3
22
:page-type: landing-page
33
:page-layout: landing-page-top-level-sdk
44
:page-role: tiles
@@ -42,7 +42,7 @@ using var result = await collection.GetAsync(key, options => options.Transcoder(
4242
[.column]
4343
====== {empty}
4444

45-
== Couchbase .NET SDK 3.2
45+
== Couchbase .NET SDK 3.3
4646

4747
++++
4848
<div class="card-row three-column-row">
@@ -62,19 +62,19 @@ Dive right in with a xref:start-using-sdk.adoc[quick install and Hello World].
6262
Install using the NuGet Package Manager:
6363
[source,csharp]
6464
----
65-
> Install-Package CouchbaseNetClient -Version 3.2.0
65+
> Install-Package CouchbaseNetClient -Version 3.3.0
6666
----
6767
6868
Or using the CLI:
6969
[source,csharp]
7070
----
71-
> dotnet add package CouchbaseNetClient --version 3.2.0
71+
> dotnet add package CouchbaseNetClient --version 3.3.0
7272
----
7373
7474
Or using Package Reference
7575
[source,csharp]
7676
----
77-
<PackageReference Include="CouchbaseNetClient" Version="3.2.0" />
77+
<PackageReference Include="CouchbaseNetClient" Version="3.3.0" />
7878
----
7979
////
8080

modules/hello-world/pages/start-using-sdk.adoc

Lines changed: 97 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,70 @@ It offers an asynchronous API based on the link:https://docs.microsoft.com/en-us
1212
The Couchbase .NET client allows applications to connect to Couchbase Server using any Common Language Runtime (CLR) language, including C#, F#, and VB.NET.
1313
The SDK is written in C#, and some of its idiomatic patterns reflect that choice.
1414

15+
16+
== Hello Couchbase
17+
18+
On this page we show you how to quickly get up and running -- installing the Couchbase .NET SDK, and trying out the C# _Hello World_ code example against Couchbase Capella, or against a local Couchbase cluster.
19+
20+
We will go through the code sample step by step, but for those in a hurry to see it, here it is:
21+
22+
[{tabs}]
23+
====
24+
Couchbase Capella Sample::
25+
+
26+
--
27+
If you are connecting to https://docs.couchbase.com/cloud/index.html[Couchbase Capella], be sure to get the correct endpoint as well as user, password, and `couchbasecloudbucket` -- and see the <<cloud-connections, Cloud section>>, below.
28+
29+
[source,csharp]
30+
----
31+
include::devguide:example$dotnet/Cloud.cs[]
32+
----
33+
--
34+
35+
Local Couchbase Server::
36+
+
37+
--
38+
[source.try-it,csharp]
39+
----
40+
include::example$StartUsing.cs[tags=**]
41+
----
42+
--
43+
====
44+
45+
1546
== Installing the SDK
1647

48+
=== Requirements
49+
1750
include::partial$supported.adoc[]
1851
See the xref:project-docs:compatibility.adoc#dotnet-compatibility[Compatibility] section for more details.
1952

20-
The library is distributed in a number of ways:
2153

22-
|===
23-
|NuGet |NuGet package host at https://www.nuget.org/packages/CouchbaseNetClient/[nuget.org] (_recommended_)
24-
|Zip |Zip files for each release are linked from the Release Notes xref:project-docs:sdk-release-notes.adoc[here].
25-
|Build from Source |Build the library from https://github.com/couchbase/couchbase-net-client/[source available on GitHub] (not officially supported)
26-
|===
54+
=== Quick Install
2755

56+
The quickest way to get up and running is with NuGet, from the Package Manager Console, within your project:
2857

29-
== Hello Couchbase
58+
. From the Visual Studio menu bar, click *Tools*.
59+
. Select *NuGet Package Manager > Package Manager Console*.
60+
. In the console, enter the package installation command:
61+
** To install the latest version:
62+
63+
[source,console]
64+
----
65+
Install-Package CouchbaseNetClient
66+
----
67+
68+
All other installation methods can be found in our xref:project-docs:sdk-full-installation[full installation guide].
3069

31-
Start a new console project (in Visual Studio or VS Code, etc). +
70+
71+
== Step by Step
72+
73+
Start a new console project (in Visual Studio or VS Code, etc).
3274
Go to our xref:platform-help.adoc[Platform Introduction] if you don't already have an editor or IDE setup for working in .NET -- e.g. you are evaluating the .NET SDK, but .NET is not your normal platform.
3375

34-
Install the latest 3.2 https://www.nuget.org/packages/CouchbaseNetClient/[CouchbaseNetClient^] NuGet package.
76+
=== Prerequisites
77+
78+
Install the latest 3.3 https://www.nuget.org/packages/CouchbaseNetClient/[CouchbaseNetClient^] NuGet package -- see <<quick-install,above>>.
3579

3680
The following code samples assume:
3781

@@ -45,34 +89,50 @@ Firstly, you will need to have a few `using` statements at the top of *Program.c
4589
include::example$StartUsing.cs[tag=using,indent=0]
4690
----
4791

92+
=== Connection
93+
4894
Then you can connect to the cluster:
4995

96+
[{tabs}]
97+
====
98+
Capella::
99+
+
100+
--
101+
[source,csharp]
102+
----
103+
// TODO
104+
----
105+
--
106+
107+
Local Server::
108+
+
109+
--
50110
[source,csharp]
51111
----
52112
include::example$StartUsing.cs[tag=connect,indent=0]
53113
----
114+
--
115+
====
54116

55117
Couchbase uses xref:server:learn:security/roles.adoc[Role Based Access Control (RBAC)] to control access to resources.
56118
If you're developing client code on the same machine as the Couchbase Server, your URI can be _couchbase://localhost_.
57119

58-
Then open the bucket:
120+
=== Bucket, Scopes, and Collections
121+
122+
Open the bucket:
59123
[source,csharp]
60124
----
61125
include::example$StartUsing.cs[tag=bucket,indent=0]
62126
----
63127

64-
Substitute whatever bucket name you want for _bucket-name_ in the above example.
65-
66-
The 3.2 SDK is ready for the introduction of xref:concept-docs:collections.adoc[Collections] in the xref:{version-server}@server:introduction:whats-new.adoc#whats-new-server-700[7.0 release] of the Couchbase Data Platform.
67-
The latest release, Couchbase Server 7.0, brings Collections, allowing Documents to be grouped by purpose or theme, according to specified _Scope_.
128+
Collections allowi Documents to be grouped by purpose or theme, according to specified _Scope_.
129+
Our Travel Sample bucket has separate scopes for inventory (flights, etc.), and for tenants (different travel agents).
68130

69131
[source,csharp]
70132
----
71133
include::example$StartUsing.cs[tag=collection,indent=0]
72134
----
73135

74-
NOTE: This feature was previously avaiable as a _developer preview_ from Couchbase Server 6.6. _When connecting to a 6.6 cluster or earlier_, we must use the `DefaultCollection`, which covers the whole Bucket.
75-
76136
To get you started the following code creates a new document in a custom scope and collection and then fetches it again, printing the result.
77137

78138
[source,csharp]
@@ -94,47 +154,37 @@ include::example$StartUsing.cs[tag=n1ql-query,indent=0]
94154

95155
You can learn more about N1QL queries on the xref:howtos:n1ql-queries-with-sdk.adoc[Query page].
96156

97-
== Full Example
98157

99-
If you want to copy and paste to run the full example, here it is:
100158

101-
[{tabs}]
102-
====
103-
Local Couchbase Server::
104-
+
105-
--
106-
[source.try-it,csharp]
107-
----
108-
include::example$StartUsing.cs[tags=**]
109-
----
110-
--
111159

112-
Couchbase Capella Sample::
113-
+
114-
--
115-
If you are connecting to https://docs.couchbase.com/cloud/index.html[Couchbase Capella], be sure to get the correct endpoint as well as user, password, and `couchbasecloudbucket` -- and see the <<cloud-connections, Cloud section>>, below.
160+
== Next Steps
116161

117-
[source,csharp]
118-
----
119-
include::devguide:example$dotnet/Cloud.cs[]
120-
----
121-
--
122-
====
162+
Now you're up and running, try one of the following:
123163

164+
* Our xref:hello-world:sample-application.adoc[Travel Sample Application] demonstrates all the basics you need to know;
165+
* Explore xref:howtos:kv-operations.adoc[Key Value Operations] against a document database;
166+
* Or xref:howtos:n1ql-queries-with-sdk.adoc[Query] with our SQL-based N1QL language;
167+
// * Try longer-running queries with our xref:howtos:analytics-using-sdk.adoc[Analytics Service];
168+
// * A xref:howtos:full-text-searching-with-sdk.adoc[Full Text Search];
169+
* Or read up on xref:concept-docs:data-services.adoc[which service fits your use case].
124170

125-
== Cloud Connections
126171

127-
For developing on https://docs.couchbase.com/cloud/index.html[Couchbase Capella], if you are not working from the same _Availability Zone_, refer to the follorwing:
172+
=== Additional Resources
128173

129-
* Notes on xref:ref:client-settings.adoc#constrained-network-environments[Constrained Network Environments],
130-
* xref:project-docs:compatibility.adoc#network-requirements[Network Requirements],
131-
* If you have a consumer-grade router which has problems with DNS-SRV records review our xref:howtos:troubleshooting-cloud-connections.adoc#troubleshooting-host-not-found[Troubleshooting Guide].
132174

175+
The https://docs.couchbase.com/sdk-api/couchbase-net-client/api/index.html[API reference] is generated for each release.
176+
Older API references are linked from their respective sections in the xref:project-docs:sdk-release-notes.adoc[Release Notes].
133177

178+
xref:project-docs:migrating-sdk-code-to-3.n.adoc[The Migrating from SDK2 to 3 page] highlights the main differences to be aware of when migrating your code from our earlier 2.x .NET SDK.
134179

135-
== Additional Resources
180+
// Couchbase welcomes community contributions to the Python SDK.
181+
// The Python SDK source code is available on https://github.com/couchbase/couchbase-python-client[GitHub].
136182

137-
The https://docs.couchbase.com/sdk-api/couchbase-net-client/api/index.html[API reference] is generated for each release.
138-
Older API references are linked from their respective sections in the xref:project-docs:sdk-release-notes.adoc[Release Notes].
183+
=== Troubleshooting
139184

140-
xref:project-docs:migrating-sdk-code-to-3.n.adoc[The Migrating from SDK2 to 3 page] highlights the main differences to be aware of when migrating your code.
185+
* Couchbase Server is designed to work in the same WAN or availability zone as the client application.
186+
If you're running the SDK on your laptop against a Capella cluster, see further information on:
187+
** Notes on xref:ref:client-settings.adoc#constrained-network-environments[Constrained Network Environments].
188+
** xref:project-docs:compatibility.adoc#network-requirements[Network Requirements].
189+
** If you have a consumer-grade router which has problems with DNS-SRV records review our xref:howtos:troubleshooting-cloud-connections.adoc#troubleshooting-host-not-found[Troubleshooting Guide].
190+
* Our https://forums.couchbase.com/c/net-sdk/6[community forum] is a great source of help.

modules/project-docs/pages/compatibility.adoc

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,7 @@ It is best to upgrade either the SDK or the Couchbase version you are using.
2525
[#table_sdk_versions]
2626
[cols="40,20,25,20"]
2727
|===
28-
| | SDK 2.7 | SDK 3.0, 3.1 | SDK 3.2
29-
30-
| *Server 5.0-5.5*
31-
| ◎
32-
| ◎
33-
| *✔*
28+
| | SDK 3.0, 3.1 | SDK 3.2 | SDK 3.3
3429

3530
| *Server 6.0*
3631
| *✔*
@@ -45,7 +40,13 @@ It is best to upgrade either the SDK or the Couchbase version you are using.
4540

4641
| *Server 7.0*
4742
| *◎*
48-
| *◎*
43+
| *✔*
44+
| *✔*
45+
46+
47+
| *Server 7.1*
48+
| ◎
49+
| *✔*
4950
| *✔*
5051
|===
5152

@@ -58,39 +59,38 @@ See the notes there for Support details.
5859
[.table-merge-cells]
5960
[cols="7,7,5,6,5"]
6061
|===
61-
| | Server 5.0, 5.1, & 5.5 | Server 6.0 | Server 6.5 & 6.6 | Server 7.0
62+
| | Server 6.0 | Server 6.5 & 6.6 | Server 7.0 | Server 7.1
6263

6364
| Enhanced Durability
6465
4+| All SDK versions
6566

6667
| Durable Writes
67-
2+| Not Supported
68-
2+| Since 3.0
68+
| Not Supported
69+
3+| Since 3.0
6970

7071
| Analytics
71-
| DP in 5.5 with 2.6
72-
3+| Since 2.7
72+
4+| Since 2.7
7373

7474
| Distributed ACID Transactions
75-
2+| Not Supported
76-
2+| Since 3.0 & Server 6.6footnote:[3.1.4 or more recent required for 1.0.0GA; preferably, use the latest SDK release.]
75+
| Not Supported
76+
3+| Since 3.0 & Server 6.6footnote:[3.1.4 or more recent required for 1.0.0GA; preferably, use the latest SDK release.]
7777

7878
| Default Collections
79-
2+| Not Supported
79+
| Not Supported
8080
| Developer Preview in 6.5-6.6, SDK 3.0
81-
| Since 3.0.1
81+
2+| Since 3.0.1
8282

8383
| Scope-Level N1QL Queries & all Collections features
84-
3+| Not Supported
85-
| Since SDK 3.2.0
84+
2+| Not Supported
85+
2+| Since SDK 3.2.0
8686

8787
| Field Level Encryption v2
88-
2+| Not Supported
89-
2+| Since SDK 3.1.3footnote:[Field Level Encryption distributed as separate library.]
88+
| Not Supported
89+
3+| Since SDK 3.1.3footnote:[Field Level Encryption distributed as separate library.]
9090

9191
| Request Tracing
92-
2+| Not Supported
93-
2+| Since SDK 3.0.3
92+
| Not Supported
93+
3+| Since SDK 3.0.3
9494
|===
9595

9696

@@ -104,7 +104,7 @@ include::hello-world:partial$supported.adoc[]
104104
[#table_sdk_versions]
105105
[cols="40,20,25,20"]
106106
|===
107-
| | SDK 2.7 | SDK 3.0, 3.1 | SDK 3.2
107+
| | SDK 3.0, 3.1 | SDK 3.2 | SDK 3.3
108108

109109
| .NET Core 3.1 (Long Term Support)
110110
| *✔*
@@ -118,7 +118,8 @@ include::hello-world:partial$supported.adoc[]
118118

119119
| .NET Core 2.0, 2.1, 2.2, 3.0
120120
| *◎*
121-
| *◎*
121+
| *◎* +
122+
except *✖* 2.0, 2.1 xref:project-docs:sdk-release-notes.adoc#version-3-2-5-10-december-2021[from 3.2.5]
122123
| *◎* +
123124
except *✖* 2.0, 2.1 xref:project-docs:sdk-release-notes.adoc#version-3-2-5-10-december-2021[from 3.2.5]
124125

@@ -143,5 +144,5 @@ include::{version-server}@sdk:shared:partial$network-requirements.adoc[]
143144

144145
include::{version-server}@sdk:shared:partial$interface-stability-pars.adoc[tag=interface-stability-section]
145146

146-
include::7.0@sdk:shared:partial$api-version.adoc[tag=api-version]
147+
include::{version-server}@sdk:shared:partial$api-version.adoc[tag=api-version]
147148

0 commit comments

Comments
 (0)