No head, no tail - Project development note: C # distributed project modified version

zhaozj2021-02-16  59

Title: Did not end without tail - Project development notes: C # distributed project modified version

Keywords: distributed development C # project division Delphi with C # mixed development

November 20th: A little excited is a bit sleepy

It is a bit troublesome to say that I still jump directly to the current state of the project, how do we implement it?

Then I wrote yesterday afternoon. I want to first describe the most simple way of the engineering process of our specific implementation.

At first we made a ASP.NET implementation, and then issued ASP.NET based on our investigation, it is not suitable for users, and the user may enter thousands of documents one day. If you don't have a pure keyboard operation in the web page, there is a report (in fact, this is nonsense, I have written directly from the webpage, I have no problem directly, write a pure keyboard method. There is no problem, but the efficiency of development has not written a high client high. In other words, it is a Mongolian customer.) So we use Webserve as an intermediate data transfer layer, with C # development servers and servcr. After demonstrating the customer, the customer is still more satisfied. However, when the customer has to install a demo, the customer requires his lower level to install this directly, and cannot have a forcibly demand for the client's operating system (rely on China's small company machine machine, " Imagine a net framework .. L on the PII machine. Then use the vs.net development of the client to die again. Fortunately, there are several Delphi's cattle people, two days to make a client-developed web service-developed Web Service for VS.NET. Finally, the customer is taking the board, use this, let's talk about this architecture. (Drink mouth water first)

Our engineering Server has 9 projects below: (Ha, there are several fewer shelves developed by Microsoft.)

CommonData

The first generation is this directory; this directory stores the XSD file generated by the vs.net development environment and the corresponding file generated by xsd.exe. It is a description of the database. Finally, it can be seen from the class view that the corresponding class is a pile of inherited the class of DataSet.

2. DataAccess.base

Use the files of the database generated by vs.net, which is a bunch of components (To be honest, I don't know what the component class is with the general class.) For example, a table product, you will correspond to INSERT, UPDATE , Delete's SQLCommond generation.

3. DataAccess.Template

This project is a small PERL program to generate a bunch of documents. Make a success in the DataAccess.Base class, add some of the most basic operations for the database, such as new data, delete data, and modify data. Check one data by KeyID. That is to turn the operation of the data into a function, not to call the object of SQLCommond's SYSTEM.DATA object. This type of file is also updated for each DataAccess.Base update.

4. DataAccess

The result of this project is because the above project is generated by Perl, then if we still have a lot of business methods written inside during the development process, then there may be a change in the database, we have no way to use Perl again. Recover the DataAccess.Template file (the code coverage will be handwritten). So we inherited a DataAccess.Template. All special methods are written in this place.

5. CommonFunction

This is nothing to say, the public method, the common function is placed here, such as the generation tool of the document number, the WebService encryption algorithm class. . . All must have this kind of Dongdong. 6. StaticData

The main purpose of the file in this file directory is to cache the data on the server. I re-made all the files in the commondata directory, I called SO, this SO will record the data last updated time, whether to cached tags, etc. Then store it as an object in the object of the server.

7. BusinessFacade

This part is white, it is nothing, it is to provide different business clients. Write a lot of ways to pass the data passed directly from the CLIENT to Business Rules. The main use I want to have two

a) Design from the database table design to the interface layer is actually two ideas. These two ideas are fundamentally different, and the comparison interface is the structure, the database is object-oriented. Now that these two east eastern interfaces are set, but what is the rules? I personally think that facade can come to this matter, that is. FACADE can be organized according to the structure to call the Rules that can be organized.

b) There may be many CLIT, such as Web Service, and Winform, or WebForm. If there will be several client coexistence in your system, there is still a better appearance layer, and the level call is clear.

8. BusinessRules

This part is relatively simple from the layered design. We put all users on the interface's modifications and queries in this layer. This layer is concerned that it is purely business.

9. SystemFrameworks

System objects used during system operation. This system mainly generates some Application controls to be used in the Web Service application.

I am not familiar with the client Delphi, as long as the method of encapsulation is required to solve the permissions, the log's unified processing is required, or directly to directly born Delphi's ClientDataSet structure.

The method of calling the general process is like this:

Interface Take Data Message - "WebService -" Facade - "Rules -" DataAccess (Method for calling inheritance) DataAccess.Template and DataAccess.base) - "database.

There are also some special, such as calling cache data, a bit of trouble. This is not detailed.

Generating this framework should pay attention to the following questions:

l The project in the framework is to go to SourceSafe (nonsense)

l The engineering in the framework is to define a named space (especially the CS file that belts when using the VS.NET to generate the XSD file will not find it, it will be very troublesome to modify the namespace.)

l must unify everyone's ideas. Press a way. You should be able to operate the database directly at each layer. If you don't force it, the final development will be a very funny project. (Call DataAccess directly when WebService is written to write the database?)

There is something that I always handle it when I have SourceSafe on WebService, maybe it is related to my IIS. However, it did not adjust several times. Depressed, I don't know how to go.

I don't know if you have any feelings. Anyway, I started recalling after I finished writing. How much time we spent so complicated, but also set the rules to learn from the people, this thing Is it necessary? In fact, I think, like yesterday afternoon, our starting point is to quantify the process of development and separate. Efficient development is achieved with a framework (efficiency is not the best). But the promotion of this process is painful, sometimes I will doubt this to do it. Will you really change the development process of this company to change the structure of the development team. Do you really bring benefits? I can't answer this question. However, I think I am sure, the development method will change, it will become the overall level of the developer can be reduced by division. And new development methods will reduce many unnecessary bugs that personalized programming. The following development notes are primarily aware of some thinking and some gadgets made in the process of development. First, some phase methods for object-oriented interactions in FACADE are interactive.

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

New Post(0)