# Backend Development on nexocode

Recent content in Backend Development on nexocode

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Useful Tips For Getting Started With MongoDB in .NET Core

DevFeed: [Useful Tips For Getting Started With MongoDB in .NET Core](<https://devfeed.tech/articles/useful-tips-for-getting-started-with-mongodb-in-net-core-17702.md>)

Original publisher: [Read original article](<https://nexocode.com/blog/posts/getting-started-with-mongodb-in.net-core-applications/>)

Author: witali-stinski

Published: 2022-03-03T23:00:00Z

Content type: tutorial

Language: en

Sources: [Backend Development on nexocode](<https://devfeed.tech/sources/backend-development-on-nexocode.md>)

Topics: [MongoDB](<https://devfeed.tech/topics/mongodb.md>), [.NET](<https://devfeed.tech/topics/net.md>), [ASP.NET Core](<https://devfeed.tech/topics/asp-net-core.md>), [ASP.NET](<https://devfeed.tech/topics/aspnet.md>)

Tags: [asp-net-core](<https://devfeed.tech/tags/asp-net-core.md>), [class](<https://devfeed.tech/tags/class.md>), [database](<https://devfeed.tech/tags/database.md>), [driver](<https://devfeed.tech/tags/driver.md>), [format](<https://devfeed.tech/tags/format.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [net-core](<https://devfeed.tech/tags/net-core.md>), [nosql](<https://devfeed.tech/tags/nosql.md>), [relational-databases](<https://devfeed.tech/tags/relational-databases.md>)

### AI overview

For .NET Core applications, the author recommends using the official MongoDB .NET Driver instead of Entity Framework or another ORM, arguing that an ORM adds abstraction without benefit and limits access to MongoDB's flexible domain modeling. Create a MongoClient to manage database connections: it is lightweight, thread-safe, and maintains a connection pool, so connections need not be opened, closed, or disposed individually. The recommended practice is one MongoClient instance per application, commonly registered as an ASP.NET Core singleton. Connection details can be supplied as a URI-format connection string, which is reusable across MongoDB drivers and can hold options or be stored in secure credential storage; the excerpt also notes configuring MongoClientSettings in code as an alternative.

### Source excerpt

MongoDB database is one of the most popular NoSql solutions on the market today. Of course, it provides support for .NET Core, as well as for other popular programming languages and frameworks. In this article, I want to share my experience when I started to use Mongo as the main database with the .NET Core application. Before, I mainly used relational databases for a long time, and some NoSQL terms were confusing for me. Just like for many developers with a background in relational databases. You need to switch mindset - from relations and schema to no relations and schemaless.

## Fast Reactor Tests With Virtual Time

DevFeed: [Fast Reactor Tests With Virtual Time](<https://devfeed.tech/articles/fast-reactor-tests-with-virtual-time-17700.md>)

Original publisher: [Read original article](<https://nexocode.com/blog/posts/fast-reactor-tests-with-virtual-time/>)

Author: piotr-kubowicz

Published: 2021-12-27T00:00:00Z

Content type: tutorial

Language: en

Sources: [Backend Development on nexocode](<https://devfeed.tech/sources/backend-development-on-nexocode.md>)

Topics: [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [allows](<https://devfeed.tech/tags/allows.md>), [background](<https://devfeed.tech/tags/background.md>), [but](<https://devfeed.tech/tags/but.md>), [clock](<https://devfeed.tech/tags/clock.md>), [code](<https://devfeed.tech/tags/code.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [data](<https://devfeed.tech/tags/data.md>), [deals](<https://devfeed.tech/tags/deals.md>), [declarative](<https://devfeed.tech/tags/declarative.md>), [don-t](<https://devfeed.tech/tags/don-t.md>), [either](<https://devfeed.tech/tags/either.md>), [fashion](<https://devfeed.tech/tags/fashion.md>), [fast](<https://devfeed.tech/tags/fast.md>), [faster](<https://devfeed.tech/tags/faster.md>), [it](<https://devfeed.tech/tags/it.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [reactive-programming](<https://devfeed.tech/tags/reactive-programming.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [time](<https://devfeed.tech/tags/time.md>), [virtual](<https://devfeed.tech/tags/virtual.md>), [with](<https://devfeed.tech/tags/with.md>)

### AI overview

Project Reactor's StepVerifier can mock the clock and advance virtual time, letting tests exercise delayed actions or verify that an action does not occur within a specified interval without waiting in real time. The excerpt says production code need not be adapted for virtual time, and that it can make multithreaded logic behave as if single-threaded, simplifying state assertions. In the Kotlin example, a test waiting for a returned `save` stream can finish while a background `delete` stream is still running. Polling with Mockito's `verify(timeout())` or using Awaitility can wait for the condition, but the excerpt characterizes this as a poor test approach; it ends before explaining further.

### Source excerpt

Sometimes your code deals with a situation when things happen slowly. Maybe you schedule a background task that runs after some time. Or run a special action when asking for data that takes far too long. Either way, it is a tricky case that needs to be tested well. But what to do if we don't want a test that waits a lot? Project Reactor, a reactive programming library for JVM, handles concurrency in a high-level and declarative fashion. Its test utility, StepVerifier, allows using Virtual Time: 'mock' the clock and advance time in your tests faster than the system clock runs.

## Coroutines - a better match for Kotlin than Reactive Streams?

DevFeed: [Coroutines - a better match for Kotlin than Reactive Streams?](<https://devfeed.tech/articles/coroutines-a-better-match-for-kotlin-than-reactive-streams-17704.md>)

Original publisher: [Read original article](<https://nexocode.com/blog/posts/reactive-streams-vs-coroutines/>)

Author: piotr-kubowicz

Published: 2020-05-12T00:00:00Z

Content type: article

Language: en

Sources: [Backend Development on nexocode](<https://devfeed.tech/sources/backend-development-on-nexocode.md>)

Topics: [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [Reactive Streams](<https://devfeed.tech/topics/reactive-streams.md>)

Tags: [back-end](<https://devfeed.tech/tags/back-end.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [reactive-programming](<https://devfeed.tech/tags/reactive-programming.md>), [reactive-streams](<https://devfeed.tech/tags/reactive-streams.md>)

### AI overview

The excerpt shows how a simple Kotlin service can become harder to reason about when rewritten with Reactor. Combining user-profile and block-check streams with `zip` cancels the result if either stream is empty, which can cause a Spring REST endpoint to return HTTP 200 with an empty body. In the blocking version, Kotlin's nullable types and compiler warnings help surface missing-value handling; reactive streams require the programmer to handle the empty case explicitly. The excerpt says a fix exists but cuts off before showing it, and offers no evidence about how coroutines compare.

### Source excerpt

Using Reactive Programming is tempting because it promises to handle higher traffic on the same hardware. Yet this paradigm is also demanding: it increases code complexity and may make bugs harder to notice. Let's explore how you can use Kotlin and coroutines to reduce the cognitive load of maintaining reactive applications. Sample code Imagine you are developing a website that can be used by both logged-in and anonymous users, just like Wikipedia. At the same time, there are proper mechanisms in place to block misbehaving users. Our focus will be the back-end code returning a welcome message displayed on top of the main page:

## Spring Dependencies in Gradle Can Be Tricky

DevFeed: [Spring Dependencies in Gradle Can Be Tricky](<https://devfeed.tech/articles/spring-dependencies-in-gradle-can-be-tricky-17705.md>)

Original publisher: [Read original article](<https://nexocode.com/blog/posts/spring-dependencies-in-gradle/>)

Author: piotr-kubowicz

Published: 2020-01-13T00:00:00Z

Content type: tutorial

Language: en

Sources: [Backend Development on nexocode](<https://devfeed.tech/sources/backend-development-on-nexocode.md>)

Topics: [Gradle](<https://devfeed.tech/topics/gradle.md>), [Dependency management](<https://devfeed.tech/topics/dependency-management.md>), [Spring Boot](<https://devfeed.tech/topics/spring-boot.md>), [Spring Framework](<https://devfeed.tech/topics/spring-framework.md>)

Tags: [build-tool](<https://devfeed.tech/tags/build-tool.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [java](<https://devfeed.tech/tags/java.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [security](<https://devfeed.tech/tags/security.md>), [spring](<https://devfeed.tech/tags/spring.md>), [spring-boot](<https://devfeed.tech/tags/spring-boot.md>), [spring-framework](<https://devfeed.tech/tags/spring-framework.md>)

### AI overview

This article explains why managing Spring dependencies with Gradle can be difficult, especially when applications use multiple Spring projects and related libraries. It recommends importing a Spring-provided BOM instead of managing versions manually, describes the history and limitations of the Spring Dependency Management Plugin, and shows that an attempted Jackson Databind version override may leave the vulnerable version in use.

### Source excerpt

Spring is the most popular Java web framework for many years and Gradle has an established position as a build tool. You might expect it's easy to find instructions on how to set up those two together -- yet the Internet is filled with advice that will get you into trouble. The official Spring documentation does not make the situation any better in this case. Using Spring in your applications typically means your classpath contains not only Spring Framework itself, but also other Spring projects like Spring Security plus Spring dependencies that are independent libraries. It may require lots of work to get versions of dependencies right, avoiding incompatible versions being used together. So a much better solution is -- not to manage all those versions manually and choose a set suggested by Spring. Technically speaking: importing a BOM (bill of materials).

## Portable Development Environment With Docker and IntelliJ

DevFeed: [Portable Development Environment With Docker and IntelliJ](<https://devfeed.tech/articles/portable-development-environment-with-docker-and-intellij-17703.md>)

Original publisher: [Read original article](<https://nexocode.com/blog/posts/portable-development-with-docker/>)

Author: mateusz-joniak

Published: 2018-10-15T00:00:00Z

Content type: tutorial

Language: en

Sources: [Backend Development on nexocode](<https://devfeed.tech/sources/backend-development-on-nexocode.md>)

Topics: [Docker](<https://devfeed.tech/topics/docker.md>), [Dockerfile](<https://devfeed.tech/topics/dockerfile.md>), [software-development](<https://devfeed.tech/topics/software-development.md>), [virtualization](<https://devfeed.tech/topics/virtualization.md>), [ide](<https://devfeed.tech/topics/ide.md>), [IntelliJ IDEA](<https://devfeed.tech/topics/intellij-idea.md>)

Tags: [configuration](<https://devfeed.tech/tags/configuration.md>), [development](<https://devfeed.tech/tags/development.md>), [docker](<https://devfeed.tech/tags/docker.md>), [dockerfiles](<https://devfeed.tech/tags/dockerfiles.md>), [ide](<https://devfeed.tech/tags/ide.md>), [intellij](<https://devfeed.tech/tags/intellij.md>), [intellij-idea](<https://devfeed.tech/tags/intellij-idea.md>), [software](<https://devfeed.tech/tags/software.md>), [virtualization](<https://devfeed.tech/tags/virtualization.md>)

### AI overview

This tutorial explains how Docker can create portable development environments by packaging an application with its dependencies, configuration files, tools, and runtime. It describes Docker images and Dockerfiles, and presents using the same image across developer workstations and production to reduce configuration differences and deployment surprises.

### Source excerpt

For many developers, managing the environment required to work productively is a quite tedious task. Sure, the IDE does the lion's share of preparations for you. But still, you need to install a specific version of the database, then make sure you have the right compiler and runtime environment. In some cases, you would also have to work on a given version of the operating system. Gods help you if you find yourself in the hell of "hidden" dependencies, like libraries you're supposed to have installed separately. Configuring all of this takes hours, so forget about first-day productivity, and if you fail, all you're going to get are some cryptic error messages that you have to type into Google. Sounds familiar?