Reason for rewriting: at the beginning of preparation, I did it according to traditional development. After I wrote a part, some netizens and colleagues suggested: "Why not use the MVC mode? This problem has caused me to make some minor changes to the current traditional development mentality. Why not use the MVC pattern? I have solicited comments from my colleagues and enthusiastic netizens and agreed to use the MVC mode for development. As a result, I deleted all the original directories and re-organized the directory structure in MVC mode. Soon, the directory structure was ready.
That .. Let's try again and use the MVC pattern of extjs4.0 to develop this employee management system. For short. SMS (you know. Haha !).
1. Establish the environment:
Data: Database folder, which contains the database files used by the management system. Currently, the database only has three tables. They are:
Menu: menu item
User: Employee registration information
Userinfo: employee profile information
Images: Image directory, some custom image files
Include: the directory of the server file, which contains the conn. asp, function. asp, and other files used by ASP.
APP: the custom JS file used by the entire SMS, which contains a controller folder and a view folder. Controller folder placement masterCode, View folder for each component. The contents in these folders are described in Chapter 2.
Extjs4: stores the library files of extjs4 in this directory.
Server: Server Directory, which contains various. asp files for the ASP server to obtain data. At present, a file named menuloader. asp is created. From the name, this file is used to load the menu.
OK. We will introduce the application based on the extjs4 MVC model from the beginning.