Preface
These years have been. net is used for enterprise web system development. There are five or six different development frameworks that we have experienced before and after. We have always wanted a simple, flexible, and handy BS development framework, the Internet does not find a suitable application for enterprise system development. When I resigned at home last year, I found something on the internet and implemented something based on my own ideas to gradually form the current B/S development framework. I would like to share my ideas with you. Many of them are my own ideas and there is no advanced design model. You are welcome to make a brick.
Framework Vision
1. Improve development efficiency (as few configurations as possible, as few code as possible, and as simple as possible)
2. better scalability and the possibility of winform and mobile phone access (all data access is implemented using Ajax + restful WebService)
3. flexible and efficient data access layer, paging query, and support for multiple databases
4. A nice UI
5. Some code can be automatically generated
Technology Selection
Using. net4.0 as the basic technology platform, it was originally used. net4.5, but later found that. net4.5 does not support Windows server2003, so it is reduced to. net4.0.
1. Asp.net MVC 4.0 is used to provide page services
2. Asp.net Web APIs are used to provide restful data services.
3. fluentdata new lightweight ORM model for data persistence Solutions
4. log4net as a log component
5. json.net as a serialization component
6. Export the documentation scheme (both open-source): excel2007 uses epplus, excel2003 uses npoi, word2003/2007 uses docx, and PDF uses Gios compression: ionic. Zip, ziplib
7. The JS library is jquery
8. jquery easyui 1.3.2 is used for UI.
9. Select knouckoutjs as the front-end mvvm framework.
10. Select 960gs for the css framework.
11. stimulsoft report (commercial)
12. Use fusioncharts for graphic analysis
Simple implementation Diagram
Framework hierarchy
I. The frameworks are divided into the following layers:
1. Zephyr. core framework core layer: mainly serves basic services, log processing, and parameter processing.
2. Zephyr. Data Processing Layer: database operation class. fluentdata is introduced and a few modifications are made to adapt
3. Zephyr. Generator Code Generator: currently, only entity classes and service classes can be generated.
4. Zephyr. utils tool class: it contains many things, such as conversion functions, File Processing encryption and decryption, etc. I don't like to introduce too many DLL files, so I will add them directly to the class library.
5. Zephyr. workflow engine: With reference to the jbpm idea, only core functions are implemented.
Ii. Use of the framework
Introduce the framework DLL directly in the project. Many early projects divided a lot of layers by reference to petshop. Here I don't plan to divide too many layers for only one purpose, try to make the framework as simple as possible. You can directly use the layer-3 MVC that comes with model, view, and controller. The web API is the same as MVC. The model layer is a generalized model, including the definition of data entities and data services. Data Services can be seen as Dal or BLL + Dal in our traditional three-tier architecture. The role of the Framework is mainly in the service layer, which is equivalent to having all the predefined methods as long as the service layer inherits the service base class of the framework. Therefore, the background layer is only three layers of MVC.
The front-end adopts the mvvm development mode. The front-end is also divided into three layers: model, view, and viewmodel. The model is the data imported in the background, the view is the razor page, and the viewmodel is a script object that processes page interaction with data. In this way, as long as the page is about viewmodel, it can be reused directly.
Now let's write it here. The first time I wrote a blog, I wrote it very slowly. Next I want to write the following articles:
1. Implementation of login using the Zephyr framework
2. Detailed System Management Development (many)
3. Development of typical business pages
4. Functions and implementation of the framework
I will cut a few pieces of development for you first. In the next blog, I will explain in detail my implementation.
Query page:
Edit page:
System Management: