My understanding of Duwamish7 (1)

zhaozj2021-02-16  62

My understanding of Duwamish7 (1) Preface: First, it is: Although the title is followed by a "one", I don't have to guarantee that there is "two" or more, because I am now learning In, and the project I have made is basically by me to complete the operation of the data layer and business layer, so I don't need to do so fine like duwamish7, or better implement object-oriented, comparison Good to achieve packaging inheritance, etc. But I am still very interested in the design model of the hierarchical design, so I decided to study the demary of duwamish7. Of course, it doesn't rule out this because of the reason for the work, so what is written? If you can't write it, you will get a drop :) Second, I want to explain: For some design technology related to .NET and related to it, I am all self-study, and it is to take the horse and the bridge flow. There is no high-end pointing, so I don't expect me what I said is completely correct or just right. In contrast, in addition to sharing my learning experience with everyone, my most important purpose is to give me a poison. I understand that I don't understand or understand and understand the wrong place, I am not grateful!!

Start: A person who is beginning to use VS.NET may not understand the root icon in the duwamish7 solution. That is an enterprise-class template, here is the "C # small distributed application" template, after establishing this template, the system is automatically divided into the templates in this solution out these several items: Web representation layer (WebUI), Fat Client Representation (WINUI), Web Services (Web Services), Business Appearance, Business Rules, Data Access (DataAccess), and a SystemFramework. I think, since it is divided into a separate project, it should be different people to develop different projects. Duwamish has made some changes, including at least the WinUI layer, the WebService is placed in the web, then make a change in each project - edit its project properties - the assembly and namespace of each item Plus "duwamish7." This block to indicate that they are all in this solution. In addition, the output path of all items outside the web layer is changed to the BIN directory of the Web layer, so that the reference path is changed by manually, the output path is ../web/bin. I think that duwamish project may be modified to do this, but I won't, so I am a changed ^ _ ^. But I think that the most important change is Duwamish7 plus a new project "common". For this layer, my understanding is to store business objects, I think, or called entity (entity), store in Common The entity class in the DATA directory. There are four entities, named XXXData, and each entity class inherits the DataSet class. Understand these entities, I think they represent the business objects that need to operate throughout the project, I can't tell the design of these business objects first, and then determine the design according to the needs of these business objects. , Or first model the design, draw the design of the database, and then get these business objects according to the database table, I tend to the former (did not have a specific project, in fact, I don't understand these at all). In summary, these entities are not corresponding to the database table, but another abstraction of the database table, after all, the database design has its own rules and methods, so it may contain several database tables together. Some results, but I think these two things are in order to go to abstract reality. The additional difference between these XXXData entities and database tables is that these business objects are DataSet architectures. Note that the architecture indicates a unit of the entire program operation, while the database table not only has an architecture, but also real data. The physical classes are only in each layer as an entity object, and the data will be fill in the data, and a layer is transmitted to the DataAccess, and then written into the database. This, I feel that the entity class is better than Int, it provides a specification, then in the specific program we may int i = 5; a bit, and this I is the object of the entity class, but this does not mean INT has always been 5. When I use int, I will re-instore one when I use INT. . . . . (Int seems to be a base type, this parable is really bad).

转载请注明原文地址:https://www.9cbs.com/read-27024.html

New Post(0)