Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCSP-32269 atlas top 250 revamp connection page #458

Merged
merged 4 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 24 additions & 13 deletions source/fundamentals/connection/connect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
Connect to MongoDB
==================

In this guide, you can learn how to connect to a MongoDB instance or
replica set using the Java driver.
This guide shows you how to connect to a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick/Suggestion: I think the phrase "This guide shows you" is personifying the page. It seems more clear to me to stick with the "you can learn" format. (This is probably pretty subjective so feel free to take or leave this comment)

Suggested change
This guide shows you how to connect to a
In this guide, you can learn how to connect to a

`MongoDB Atlas deployment <https://www.mongodb.com/docs/atlas>`__,
a MongoDB instance, or a replica set using the {+driver-short+}.

You can view sample code to :ref:`connect to an Atlas cluster <connect-atlas-java-driver>`
or continue reading to learn more about the ``MongoClient`` class and
Expand Down Expand Up @@ -50,13 +51,18 @@ connect to a MongoDB deployment. It instructs the driver on how it should
connect to MongoDB and how it should behave while connected. The following
figure explains each part of a sample connection URI:

.. figure:: /includes/figures/connection_uri_parts.png
:alt: Connection String parts figure
.. figure:: /includes/figures/dns_seedlist_connection_string_parts.png
:alt: Each part of the connection string

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use better alt text here for accessibility. It should be meaningful to someone who can't see this image. Something like:

Suggested change
:alt: Each part of the connection string
:alt: An example of a connection string that demonstrates the protocol, credentials, hostname or IP, port, and connection options


This figure uses the :manual:`Standard Connection String Format </reference/connection-string/#std-label-connections-standard-connection-string-format>`,
``mongodb`` for the protocol. You can also use the :manual:`DNS Seed List Connection Format </reference/connection-string/#dns-seed-list-connection-format>`,
``mongodb+srv``, if you want more flexibility of deployment and the ability
to change the servers in rotation without reconfiguring clients.
In this example, we connect to an Atlas MongoDB deployment that has a

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style: Write to the user by using second person. (ref)

Suggested change
In this example, we connect to an Atlas MongoDB deployment that has a
In this example, you connect to an Atlas MongoDB deployment that has a

DNS SRV record. For more details, see the :manual:`DNS Seed List
Connection Format
</reference/connection-string/#dns-seed-list-connection-format>`
documentation. This format offers flexibility in deployment and the
ability to change the servers in rotation without reconfiguring clients.

This format offers flexibility in deployment and the ability to change
the servers in rotation without reconfiguring clients.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repeated line


.. note::

Expand All @@ -65,11 +71,16 @@ to change the servers in rotation without reconfiguring clients.
and select Java from the language dropdown to retrieve your connection
string.

The next part of the connection URI contains your credentials if you are
using a password-based authentication mechanism. Replace the value of ``user``
with your username and ``pass`` with your password. If your
authentication mechanism does not require credentials, omit this part of
the connection URI.
If you are connecting to an instance or replica set that does not have a
DNS SRV address, you must use ``mongodb`` for the protocol, which specifies
the :manual:`Standard Connection String Format
</reference/connection-string/#std-label-connections-standard-connection-string-format>`.

After the protocol, the next part of the connection string contains
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: I think "after the protocol" and "the next part" mean the same thing. I think it could be simplified to:

Suggested change
After the protocol, the next part of the connection string contains
After the protocol, the connection string contains your

credentials if you are using a password-based authentication mechanism.
Replace the value of ``user`` with your username and ``pass`` with your
password. If your authentication mechanism does not require credentials,
omit this part of the connection URI.

The next part of the connection URI specifies the hostname or IP
address, followed by the port of your MongoDB instance. In the example,
Expand Down
Binary file removed source/includes/figures/connection_uri_parts.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading