.net core project combat summary

Pictures from the Internet

Recently, a small project of the company tried to use .net core as a server for development, and it has been running smoothly for a period of time, and the overall effect is quite satisfactory. The overall development process is recorded here for memo and sharing

background

The project requirements are actually very simple, similar to a simple approval + simple task management system, but need to have both a PC and an APP.

Due to the small scale of the project and relatively ample time, the group discussed and decided to adopt new technologies to step on the pit. In this way, everyone's enthusiasm is relatively high, and they can not only complete the task but also learn new knowledge.

The front-end and the back-end have made a division of labor. The front-end discussion adopts React+Ant Design (not what I am concerned about), and the back-end we decided to use .net core to develop and deploy it under docker, which is still a challenge for us. , First, there is no bottom, after all, there is no mature project around it, and secondly, we don't know much about it.

However, after investigation, it was found that there are still many mature cases, so it was finally decided to do so.

But judging from the later development experience, there are really many pits to step on.

Project Architecture Discussion

Only the back-end part is mentioned here. While we are discussing the back-end architecture, the front-end partners have already started to build the framework and design the prototype.

In terms of architecture, everyone has the same basic views. Although the project is small, it has all the internal organs. There are not only PCs but also APPs at the front end.

For the back-end, first of all, the project external network can be accessed, and a gateway is required; basic services for providing functional requirements; for heterogeneous decoupling of some data, an MQ is required (later provided by Redis and Job to Replaced); Job used to process some timed tasks.

In terms of database selection, it is basically Mysql+Redis.

Since the user only gave us two servers (the configuration is also general), we have been struggling to create a few containers to maximize resource utilization.

The following picture is the overall split of our project. I am mainly responsible for the service and gateway (the back-end part).

figure 1

related articles

Although the project is over, it has been relatively busy during the period. After the project was launched, I always wanted to find a time to record the experience of this project. One is to consolidate and accumulate, and the other is to exercise my ability to write and summarize.

Articles are published one after another on my blog, and the relevant links are as follows:

  1. Docker + .net core development environment construction
  2. Build based on .net core Restful API+Swagger
  3. Implementation of configuration, database access and other operations under .net core
  4. Some operations and use of Excel under .net core
  5. Implementation of uploading and downloading attachments under .net core
  6. Implementation of access control layer under .net core
  7. Implementation of verification code and QR code login under .net core
  8. Implementation of timing tasks under .net core

development environment

The development environment of the project is as follows:

  • Operating system: Win10 (easy to install with docker)
  • Development IDE: Visual Studio 2017
  • Other: Docker for Windows

Summarize

Finally, I also hope that everyone has a heart to learn and summarize, and look forward to a more perfect self.

In addition, if you need the source code, you can follow my WeChat public account and Bug生活2048reply NetCoreto get it

image

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324528402&siteId=291194637