N
N
Nidere2018-03-22 17:22:28
C++ / C#
Nidere, 2018-03-22 17:22:28

How to make a backend in C# from scratch?

Hello!
As a hobby, I write small games and tools in Unity in C#.
I really want to start making a simple local (not a cloud) backend, if possible, without learning new tools.
As far as I understand, I need to install a DBMS and write a C# application that would serve as a "layer" between the database and my client applications, right?
Please tell me the easiest way to do this: which database to choose, which edge to approach from: how to redirect requests back and forth, work with sockets, that's all.
Ideally, I would very much like guides / lessons, it is possible in English.
Thanks to.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
VoidVolker, 2018-03-22
@Nidere

  1. Learn the network stack - the OSI network model. Not necessarily deep - but you need to know basic things like levels, protocols.
  2. Learn web sockets
  3. Choose any database that suits your criteria (data schema, load, application logic, etc.) - you can take any popular MySQL, PosgreSQL, Mongo, etc.
  4. Find a database library and go through tutorials on it
  5. Connect the library for working with the database to the socket / web socket server
  6. Implement the network API of your server (login by the client, receiving / transmitting data, etc.)
  7. Implement a client wrapper to work with the server API

G
GavriKos, 2018-03-22
@GavriKos

Well, since you have C# - then use ASP.NET / ASP.Core, and the database corresponding to this stack.
Goes easy and simple, in general. Look for examples of which REST thread on ASP

E
Evgeny, 2018-03-22
Maltsev @loqiue

There is a good tutorial on metanit for asp.net mvc/core. And if there are no problems with English, then try courses on pluralsight, where you can make a 3-month free subscription.

M
mefutu, 2018-03-23
@mefutu

A fast and convenient http (s) server is nancyfx, it is possible to run Self host. Can be run with owin, asp.net. https://github.com/NancyFx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question