Replay the whole process of development of educational system applet

Torture as a war-ending weeks of contemporary college students often go to see the school system out if there is a new educational achievement, I'm fine, do not worry about how hanging branches, the teachers do not embarrass my case, let me test 60 points test and 90 points as difficult; but if not at the computer, open the page educational system using a mobile phone terminal, enter the account password code, then switch tab page to view the results as well as a little impatient, as an amateur applet developers, soon there will be a small idea to do a program of educational system, after a long day of preliminary investigation and rapid development, and finally on line in mid-October last year, the main features include viewing the results (overall ranking, access to credit, single subject results) view the curriculum, with its interface style is as follows:

Because nothing to promote, spread only under the QQ space, the number of users has been slow growth, these days I discover the number of users has reached 1.6 k, finished the week ending happens all the exams, while thinking about remodeling project, while thinking about re-set the entire development process, so there is this article.

Academic data acquisition system

Initially thought of a simple save another way, apply to schools interfaces, but can not find opportunities, how would I do such a great school authority, so they change direction, I just learned reptiles, then the login screen that constantly debugging, analysis of various post and get requests, I finally found a breakthrough, have to say to undertake this educational system development company is really convenience, only the student number and password do a simple encryption, and then directly after encryption Student ID and password plus between several fixed strange characters, as the data submitted post parameters can successfully log on and get into the cookie, then use this cookie will be able to get to school educational system and in the number of binding all data, including results. Curriculum and so on.

Interface and design of the table

There are three tables, student tables, curriculum and represents an association between their classes tables, design patterns can refer to the black book "Database System Concepts" in the university model.

In the design table of students, there is a candidate key student number, micro signal openid, thought, I chose the latter, for two reasons:

1, interface query results need to use the primary key student table, if the primary key is the student number, then a person's performance can easily be found in the students, this design is obviously to withstand very unpleasant; some say the design search results when the new interface can add a password parameter, this is not impossible, however, to do so increases the number of transfer account and password, account number and password increases the risk of exposure.

2, openid binding and student number, can improve security, because a person openid micro signal is very subtle, if the parties are not a developer, he did not know, not to mention the students who only know he's a student number.

It is also because of this, a student number once registered, just openid current micro-channel binding, this micro signal can not register another school, this student number can not be registered or registered in other micro-signals, if you want the solution tie, you can log off the account.

Business logic design

As the reptile is written in Python, Java web chose the latter and Python Web, and then because of personal preferences in django flask and chose the latter.

Business logic already on-line is this: when the one-time registration and performance data from the school curriculum educational system to pull my Ali cloud server daemon (this requires a long time), the follow-up queries directly in my Ali cloud carried out on the server; if the small main program interface chose to accept new performance updates, the background will be a timed task according to your new account, the system of educational achievement information to make incremental crawling, so this whole query results can be said is an asynchronous , there is delay; and a few days ago when the company's technical officer talking about this project, he said that this time the project inquiries can be made synchronous, real-time, I was answered that because our school educational system server poor (every elective will collapse), if the school system to make real-time server educational system pressure is relatively large, can add a layer made of asynchronous cache, reducing the pressure, but the consequences are not timely updated results, Of course, users can force real-time updates, as long as the re-registration to log off.

Applets

The main issue is to consider small program simple and quick, friendly and interactive interface, using native development, demonstration video below:

https://mp.weixin.qq.com/s/Ow-RtRlZPauCLwKIqpdStw

Applet server source code has been fully open source, Github Address:

https://github.com/inspurer/CSUTeachingMiniprogram

Since the function of each school's educational system is much the same, if you also want to develop such a system, the small end of the program can clone the above address, and then for your school educational system, do the reptile design, back-end business logic development, as it relates to reptile details school educational system, the background code is not open source, of course, if you have a problem, let alone teach, I can poke private exchange.

Published 84 original articles · won praise 250 · Views 150,000 +

Guess you like

Origin blog.csdn.net/ygdxt/article/details/103949144