CN108073393A - A kind of storage design method based on EF frames - Google Patents
A kind of storage design method based on EF frames Download PDFInfo
- Publication number
- CN108073393A CN108073393A CN201810049144.4A CN201810049144A CN108073393A CN 108073393 A CN108073393 A CN 108073393A CN 201810049144 A CN201810049144 A CN 201810049144A CN 108073393 A CN108073393 A CN 108073393A
- Authority
- CN
- China
- Prior art keywords
- data access
- frames
- business logic
- layer
- method described
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 238000003860 storage Methods 0.000 title claims abstract description 19
- 238000013461 design Methods 0.000 title claims abstract description 8
- 238000012545 processing Methods 0.000 claims abstract description 10
- 238000000926 separation method Methods 0.000 claims abstract description 5
- 230000008569 process Effects 0.000 claims description 9
- 230000008859 change Effects 0.000 claims description 5
- 238000013499 data model Methods 0.000 claims description 5
- 238000012217 deletion Methods 0.000 claims description 5
- 230000037430 deletion Effects 0.000 claims description 5
- 239000000243 solution Substances 0.000 claims description 5
- 238000002347 injection Methods 0.000 claims description 4
- 239000007924 injection Substances 0.000 claims description 4
- 238000007792 addition Methods 0.000 claims description 3
- 230000014759 maintenance of location Effects 0.000 claims description 3
- 238000012986 modification Methods 0.000 claims description 3
- 230000004048 modification Effects 0.000 claims description 3
- 230000001360 synchronised effect Effects 0.000 claims description 2
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000011161 development Methods 0.000 description 5
- 230000003993 interaction Effects 0.000 description 2
- 150000001875 compounds Chemical class 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
Abstract
The present invention provides a kind of storage design method based on EF frames, belongs to Microsoft's .Net MVC frames and EF ORM framework technologies field, the invention mainly comprises following steps:S10:Abstract factory pattern builds program architecture;S11:Based on .Net MVC frames, view, controller, entity separation are carried out;S12:Physical model is built with EF, and is stored in a warehouse with T4 template establishments;S13:Business Logic and data access layer are abstracted and unify storage processing;S14:Support the expansible realization of disparate databases.The present invention realizes the scalability of .Net platform software Frame Designs, and the quick copy of software development can be achieved in this frame, quick to apply.
Description
Technical field
The present invention relates to Microsoft's .Net MVC frames and EF ORM framework technologies more particularly to a kind of storage based on EF frames to set
Meter method.
Background technology
With business development, agile development and platform compounds are increasingly tended in software development, and in most enterprises
Lack of standardization there are program coding, the program of facing project is even more that different people builds different codes, be easy to cause code confusion, can
The property read and maintainability are poor, once business variation or database table change modification backstage will be gone to realize manually, greatly
Reduce development efficiency and the scalability of software greatly.
The content of the invention
In order to solve the above technical problems, the present invention proposes a kind of storage design method based on EF frames.It realizes
The scalability and high efficiency of Software Coding, high cohesion, lower coupling and the modularization for realizing program become.
The technical scheme is that:
A kind of storage design method based on EF frames,
Mainly include herein below:
S10:Abstract factory pattern builds program architecture;
S11:Based on .Net MVC frames, view, controller, entity separation are realized;
S12:Physical model is built with EF, and is stored in a warehouse with T4 template establishments;
S13:Business Logic and data access layer are abstracted and unify storage processing;
S14:Support the expansible realization of disparate databases;
In S10, based on .Net MVC platforms, program architecture is built with abstract factory pattern.
Further,
In S11, software is realized in programming is respectively created procedure set by Views, controller and entity, each
Corresponding function is implemented separately.
Further,
In S12, physical layer realizes the direct-connected database of program, and the database information that upgrades in time accomplishes that ORM's is timely to EF models
Update creates T4 storages for the incidence relation synchronized update between tables of database, while by part entity.
Further,
In S13, Business Logic and data access layer upgrade in time according to EF data model informations and unify public method, with number
According to storehouse entity for unit realize More General Form under increase, deletion, modification, inquiry operation.
Further,
In S14, system supports the extension of disparate databases to realize, different data is realized by configuration file accreditation process collection
The operation in storehouse.
In S10 contents, solution is broadly divided into four solution file folders:Presentation layer, Business Logic, data
Access layer and common process layer;
Presentation layer again separates script page and controller, and the procedure set under a region is all divided for each type of service
To handle;Business Logic and data access layer place the interface of business processing and data access and Key Implementation code respectively;
Common process layer places public method, relies on injection and EF and relational data model.
It further includes
(1)Procedure set definition storage object is defined in the interface of Business Logic and data access layer;
(2)The additions and deletions that oneself correspondence model is implemented separately in each DB object change operation, and pass through and inherit public base class reality
The unified output of existing method, at the same each DB objects can document extend the method for oneself.
Description of the drawings
Fig. 1 is the flow diagram of the present invention.
Specific embodiment
More detailed elaboration is carried out to present disclosure below:
It is of the invention mainly to include herein below:
S10:Abstract factory pattern builds program architecture;
S11:Based on .Net MVC frames, view, controller, entity separation are realized;
S12:Physical model is built with EF, and is stored in a warehouse with T4 template establishments;
S13:Business Logic and data access layer are abstracted and unify storage processing;
S14:Support the expansible realization of disparate databases;
In S10 contents, further illustrate, it is necessary to perform following steps:
(1)Abstract factory pattern program architecture is built,;
(2)Solution is divided into four solution file folders:Presentation layer(UI presentation layers), Business Logic, data access layer
With common process layer.
(3)Presentation layer again separates script page and controller, is all divided under a region for each type of service
Procedure set handle;Business Logic and data access layer place the interface of business processing and data access and key reality respectively
Modern code;Common process layer places public method, relies on injection and EF and relational data model etc..
In S11 contents, further illustrate:Based on MVC pattern, the separation of controller, view and model is realized, is controlled
Device is corresponded with Razor views, and model is according to practical business scene construction and is directly bound in view, realizes that deployment formula is compiled
Journey, by@model ModelName come Binding Model.
In S12, S13 contents, further illustrate, it is necessary to perform following steps:
(1)Procedure set definition storage object is defined in the interface of Business Logic and data access layer, such as Business Logic IBLL
It defines IBLLSession storage interfaces to correspond to, defining IDALSession storages in data access layer IDAL realizes object, simultaneously
T4 templates are defined by Partial classes, realize that binding EF models can upgrade in time the data messages of EF models, return to corresponding storehouse
Store up object.
public partial interface IDBSession{ int SaveChanges();} // public method
Public partial interface IDBSession { ... } //T4 template establishments change according to model
(2)The additions and deletions that oneself correspondence model is implemented separately in each DB object change operation, and pass through and inherit public base class reality
The unified output of existing method, at the same each DB objects can document extend the method for oneself, such as sign controller except exhibition
Show the individually extension login authentication of view needs, permission control then individually can correspond to login method by extended method.
In S14 contents, further illustrate, system supported on database realizing current mainstream oracle,
Sqlserver, mysql, by simply configuring operation, it can be achieved that the program interaction of disparate databases.Code revision is more square
Just, can also be realized by newly-increased procedure set extending database, such as newly-increased oracle is realized, can be increased ORADAL newly, be configured IDAL
Calling, scalability are higher.
By this method design it is a set of can quick copy OA Development of Framework frames.By this frame can quick copy it is similar
Type project substantially increases the development efficiency of OA systems, wherein
(1)UI layers of system.OAWEB is all front page layout displaying code layers, is all handled by Razor views.Helper layers
By Logic (service logic), Admin(System administration), the several controller layer public methods of WorkFlow (workflow) are sealed
Dress realizes the convenience and uniformity of presentation layer calling.
(2)Business Logic.BLLA layers and IBLL layers are respectively service logic realization and service logic interface, realize business
The modularized processing of processing.
(3)Data access layer.DALMSSQL(Sqlserver databases), DALMYSQL (mysql databases) realizes not
With database for the processing of data interaction.It is realized simultaneously by IDAL interface abstractions.
(4)Common layers.There are common process methods, rely on injection and model, facilitate global reference.
Unified coding frame of the present invention, after business changes, realize storage update and general service code from
Dynamic generation, can improve code efficiency, while improve the maintainability and scalability of software.
Claims (8)
1. a kind of storage design method based on EF frames, which is characterized in that
Mainly include the following steps:
S10:Abstract factory pattern builds program architecture;
S11:Based on .Net MVC frames, view, controller, entity separation are carried out;
S12:Physical model is built with EF, and is stored in a warehouse with T4 template establishments;
S13:Business Logic and data access layer are abstracted and unify storage processing;
S14:Support the expansible realization of disparate databases.
2. according to the method described in claim 1, it is characterized in that,
In S10, based on .Net MVC platforms, program architecture is built with abstract factory pattern.
3. according to the method described in claim 1, it is characterized in that,
In S11, software is realized in programming is respectively created procedure set by Views, controller and entity, each
Corresponding function is implemented separately.
4. according to the method described in claim 1, it is characterized in that,
In S12, physical layer realizes the direct-connected database of program, and the database information that upgrades in time accomplishes that ORM's is timely to EF models
Update creates T4 storages for the incidence relation synchronized update between tables of database, while by part entity.
5. according to the method described in claim 1, it is characterized in that,
In S13, Business Logic and data access layer upgrade in time according to EF data model informations and unify public method, with number
According to storehouse entity for unit realize More General Form under increase, deletion, modification, inquiry operation.
6. according to the method described in claim 1, it is characterized in that,
In S14, system supports the extension of disparate databases to realize, different data is realized by configuration file accreditation process collection
The operation in storehouse.
7. according to the method described in claim 2, it is characterized in that,
It is divided into four solution file folders:Presentation layer, Business Logic, data access layer and common process layer;
Presentation layer again separates script page and controller, and the procedure set under a region is all divided for each type of service
To handle;Business Logic and data access layer place the interface of business processing and data access and Key Implementation code respectively;
Common process layer places public method, relies on injection and EF and relational data model.
8. the method according to the description of claim 7 is characterized in that
It further includes
(1)Procedure set definition storage object is defined in the interface of Business Logic and data access layer;
(2)The additions and deletions that oneself correspondence model is implemented separately in each DB object change operation, and pass through and inherit public base class reality
The unified output of existing method, at the same each DB objects can document extend the method for oneself.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810049144.4A CN108073393A (en) | 2018-01-18 | 2018-01-18 | A kind of storage design method based on EF frames |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810049144.4A CN108073393A (en) | 2018-01-18 | 2018-01-18 | A kind of storage design method based on EF frames |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108073393A true CN108073393A (en) | 2018-05-25 |
Family
ID=62156796
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810049144.4A Pending CN108073393A (en) | 2018-01-18 | 2018-01-18 | A kind of storage design method based on EF frames |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108073393A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108984236A (en) * | 2018-08-08 | 2018-12-11 | 郑州云海信息技术有限公司 | A kind of implementation method and equipment of virtual management platform |
CN109947422A (en) * | 2019-03-14 | 2019-06-28 | 浪潮通用软件有限公司 | A kind of Business Entity realization method and system based on Domain Driven Design |
CN112527773A (en) * | 2020-12-14 | 2021-03-19 | 成都炽娱互动科技有限公司 | Data model and view standardization method and system based on DBVC (database-based virtual machine) framework |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102750145A (en) * | 2012-06-05 | 2012-10-24 | 怯肇乾 | Network system software system framework and implementation method thereof |
CN103761082A (en) * | 2013-12-31 | 2014-04-30 | 湖南大唐先一科技有限公司 | Componential research and development mode and domain driving model combined application development system and platform |
CN105138602A (en) * | 2015-08-06 | 2015-12-09 | 中国电力科学研究院 | Three-dimensional coordination platform architecture system and use method therefor |
CN106815016A (en) * | 2016-12-23 | 2017-06-09 | 四川大学 | A kind of MVVM based on Domain Driven Design designs a model |
CN107391201A (en) * | 2017-07-27 | 2017-11-24 | 艾迪森海安数字医疗装备有限公司 | A kind of data flowing implementation method of the software frame of dynamic service data |
-
2018
- 2018-01-18 CN CN201810049144.4A patent/CN108073393A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102750145A (en) * | 2012-06-05 | 2012-10-24 | 怯肇乾 | Network system software system framework and implementation method thereof |
CN103761082A (en) * | 2013-12-31 | 2014-04-30 | 湖南大唐先一科技有限公司 | Componential research and development mode and domain driving model combined application development system and platform |
CN105138602A (en) * | 2015-08-06 | 2015-12-09 | 中国电力科学研究院 | Three-dimensional coordination platform architecture system and use method therefor |
CN106815016A (en) * | 2016-12-23 | 2017-06-09 | 四川大学 | A kind of MVVM based on Domain Driven Design designs a model |
CN107391201A (en) * | 2017-07-27 | 2017-11-24 | 艾迪森海安数字医疗装备有限公司 | A kind of data flowing implementation method of the software frame of dynamic service data |
Non-Patent Citations (1)
Title |
---|
邹琼俊: ""ASP.NET MVC入门到精通系列目录汇总"", 《博客园》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108984236A (en) * | 2018-08-08 | 2018-12-11 | 郑州云海信息技术有限公司 | A kind of implementation method and equipment of virtual management platform |
CN109947422A (en) * | 2019-03-14 | 2019-06-28 | 浪潮通用软件有限公司 | A kind of Business Entity realization method and system based on Domain Driven Design |
CN109947422B (en) * | 2019-03-14 | 2022-03-15 | 浪潮通用软件有限公司 | Business entity implementation method and system based on domain-driven design |
CN112527773A (en) * | 2020-12-14 | 2021-03-19 | 成都炽娱互动科技有限公司 | Data model and view standardization method and system based on DBVC (database-based virtual machine) framework |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102638566B (en) | BLOG system running method based on cloud storage | |
CN100570604C (en) | A kind of method of relation data base applications automatic upgrade | |
CN103226493B (en) | The dispositions method and system of multi-operation system service | |
CN106155651A (en) | The method and system that the automation of application version is issued and updated | |
US8635253B2 (en) | Decorated model architecture for efficient model-driven application development | |
US9679037B2 (en) | System and method for implementing database replication configurations using replication modeling and transformation | |
WO2017143844A1 (en) | Data operation method and data management server | |
CN108073393A (en) | A kind of storage design method based on EF frames | |
US20060212543A1 (en) | Modular applications for mobile data system | |
CN105447122A (en) | Implementation method for autonomously creating file system based on multi-table association | |
CN105893115B (en) | The method and system of differentiation deployment virtual machine | |
CN110069246A (en) | The plateform system and its application that a kind of Java Web application is quickly developed | |
CN105224377A (en) | A kind of method by metadata automatic generating software project code file and device | |
CN101789045B (en) | Realization method of MDA modeling tool orienting to manufacturing field | |
CN102722372A (en) | Method and system for automatically generating codes through classification and configuration | |
CN103235725A (en) | Linux-based rapid deployment method for Oracle database in cloud computing | |
CN106506710A (en) | A kind of PaaS cloud platforms suitable for media business | |
CN102436473A (en) | Menu management device and menu management method | |
CN104133717A (en) | Service automatic generation and deployment method for data open system | |
CN103914307A (en) | Interactive-interface fast implementation method based on reusable library | |
CN104318091B (en) | A kind of moonlet ground test method based on virtualization computer system | |
CN110046287A (en) | A kind of the data query method, apparatus and storage medium unrelated with type of database | |
CN105740003A (en) | Method and device for recovering virtual machine, as well as method and device for upgrading virtual machine | |
CN115629746B (en) | Method and system for multi-person collaborative development of low-code platform | |
CN101339506B (en) | Device for implementing software products resource and version management |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180525 |
|
RJ01 | Rejection of invention patent application after publication |