We have introduced the basic knowledge of connect middleware in a few articles. today, let's take an example of the application and make a small application in Notepad. I hope you will like it.
I. opening analysis
Hello, everyone, here comes Xiong Jun again. yesterday I did not write a blog because of my personal affairs. today I came out with another article. This article mainly writes a small application of notepad and the previous article,
I have also introduced the use of the "Connect" middleware and the usage of the "Mongodb" middleware. today I will combine these two middleware to write a practical example, which is constantly improved and reconstructed.
The purpose of full learning. Okay, let's talk about it. go to the topic directly.
II. Demand Analysis
(1) User registration and login functions (there is no complicated interaction scenario involved, and a user will judge whether the user exists during registration ).
(2) the user logs on successfully and enters the background of the note management system (addition, deletion, modification, and query functions of the note module ).
(3) users can have simple permissions (administrator, registered users ).
(4) The interface is relatively simple and focuses on learning.
3. start designing applications (part 1)
(1) create a user logon page. the code is as follows:
The code is as follows:
Bigbear Notepad application logon