This article has been published in my blog.
Because the company required this period of time in learning Nodejs, basically rely on the way to walk to tread a lot of waste time, today come here to say, by the way to plan the next study plan, now do a blog, the project in the process of learning JS class and objects, Nodejs related modules (HTTP, FS), Express Framework, MongoDB, and some third-party plugins such as Database Mongoose (MySQL has not yet started), but also set up a pseudo-repository of data at the bottom, next:
Now want this blog to do almost, on the refactoring, using controllers---lgoic---Repository---Mongose (Mysql)
Again encapsulate the data access layer, here may no longer use the Mongoose module, direct pure JS operation database, which is more conducive to packaging query understanding its commands and principles;
Implement database factory, can use MySQL or MongoDB;
Log feature integrated express framework, is now thinking, because the express framework itself has a log, just do not write the database time to see how to engage;
The data structure uses a VM---------and--and model, because it is inconvenient to use the model of the underlying schema in the whole project, so here we simply use model, and the logical layer part uses do, which is passed to the page using the VM (View Model) is more conducive to differentiation. This method does not know whether Nodejs is like Java or not. NET-like Map object's tool library, some words will be good.
Backstage to see whether to use a simple editor, also use markdown syntax to edit.
Come here first, do it slowly!
Nodejs Study Plan