How to do it in the data layer of a C simple distributed program

Updated on technology 2024-03-26
14 answers
  1. Anonymous users2024-02-07

    Distributed development is done with WCF, which is the use of multiple computers. Multi-layer may include MVC, the third layer is the DLL, the BLL UI layer, the DLL underlying database is the dealing, the BLL is to implement the business logic, the UI is the page design, and finally the user is presented.

  2. Anonymous users2024-02-06

    **There are a lot of them on the Internet, just search for them, I won't write them here, it's too troublesome. Briefly introduce to you the three-tier shelf purchase.

    The three-tier shelf purchase is to divide the program into three layers, one is the presentation layer, such as the listview that can be seen in the page, the control that can be reached directly by the eye, the second is the data logic layer, that is, the data in the database is processed by what logic and method, and the third is the data layer, which is the basic level of obtaining data from the database.

    So how to apply it? First of all, the first step is to get the data from the database, which is very simple, use the connection, the data adapter, and take out the data; The second step is to process the data, such as formatting and adding the calculation logic, and the third step is to reference it to the control.

    The standard three-tier structure is a series of methods that can be referenced, such as reading the basic data, using the x method, no matter which database is read, just modify the parameters; The logical processing layer refers to the data obtained by method X, processes it in its own form, and then stores it in the data structure after processing. The presentation layer is then used to refer to the processed data in the data structure, which is a simple three-layer structure.

    The specific**are all basic** lists, look for them yourself, such as reading database functions, you can find a lot, logical processing, just write it yourself. Control references, which are available on all tutorials.

  3. Anonymous users2024-02-05

    Very simple. It is to build three libraries, but note that the name and namespace of each library are changed in the properties. For example, then things are simpler. You only need to use it, for example, the BLL layer will definitely use the DAL layer to access the database, and the entities of the model layer will be used. So you'll need to add references to dal and model in the BLL layer.

    The same is true for other quotes.

    The presentation layer UI is very simple, and all the references are added.

  4. Anonymous users2024-02-04

    The data processing layer writes SQL statements or calls stored procedures, passes in parameters, logical, business processing, normal data judgment, etc., or calls the method presentation layer of the data processing layer to extract data or provide data.

    Build three parts on it.

    Call each other.

  5. Anonymous users2024-02-03

    Judging by your description, all machines should be equal and able to serve each other.

    Somewhat similar to P2P.

    If it's a local area network, then use a socket. Every time you start the program, open a fixed port as the server port (if it's a web server, this step is not needed, the port number is 80).

    Another random port is opened to communicate with the server port (80) of all machines on the LAN, and since it is a LAN, it is relatively simple to traverse all the machines.

    If you want to implement to the Internet, you must have a fixed server that is responsible for storing all surviving clients. When the client is opened, you need to connect to the server to get the latest list of resources.

  6. Anonymous users2024-02-02

    Yes, I recommend that you look at the emule client program, and then look at the emule server-side program, and the two can be integrated, but only if you have a real server-side index, so that the data can be correlated.

    If you have a machine to loop through all the surviving servers (and clients), this is technically problematic.

    My suggestion is that when the client is turned on from a real server to the fastest surviving host from itself, when connected to the host, it will get more updated lists from its list, and the linked host will also get the list of connected clients in reverse.

    The premise is that you have to have a data aggregation machine, that is, a long-lived host, and the most advanced "cloud computing" models now need a long-lived data host.

  7. Anonymous users2024-02-01

    As you said, you can use a master-slave structure with multiple front-end servers and a data server.

    There is no need for such a complex architecture.

  8. Anonymous users2024-01-31

    Hello, you this is very good to achieve; But your idea is not right, in fact, you are the implementation idea of the web landing page: enter the user name and password--- query the database--- find the corresponding password--- and compare--- you can log in or not;

    There's no need to give you **, you just find a landing page; But you're not comparing it with what's in the database; Instead, use the dataset to get it and read it out, ok?

    If you're a newbie, I'll tell you what to think:

    Presentation layer: Client-side implementation buttons.

    Logical layer: the implementation of the button to get the event function (including getting the content of the textbox, SQL query statement, and dataset getting the data and storing it in the array);

    Data access layer: the connection to the database (mainly including the connectionstring connection string: the login username, password, database name, and data source of the database to be accessed).

    Well, without further ado, I hope you're not lazy; Good luck!!

  9. Anonymous users2024-01-30

    A database lookup is performed in the query button event, and then the data is bound to the control. select * from table where colum is like %parameter%

  10. Anonymous users2024-01-29

    It's a select * form test where i="textbox"That's it, under the binding!

  11. Anonymous users2024-01-28

    The use of a three-tier architecture has nothing to do with connecting to the database, but only with the size of the project. Generally, only larger projects will use a three-tier architecture, and it is more convenient for small and medium-sized projects not to use three-tiers. The main idea of it is encapsulation, why encapsulation?

    It is to use the assemblies generated in the architecture, so that you don't have to write these ** again when you do similar projects in the future. Three layers: UI (interface), BLL (business logic layer), DAL (data access layer) are necessary, among which BLL and DAL classes are public classes, because UI calls BLL, and BLL calls DAL, and utility (the underlying method of connecting to the database and performing basic operations of "adding, deleting, modifying, and querying").

    In addition, there can also be entity (which maps data tables) and common (where some general methods are generally placed in this library, such as data validation methods, control operation methods, etc.).

  12. Anonymous users2024-01-27

    public class userservice()}using ;To introduce this namespace.

    After that, you transfer the list to the UI layer you want to display, and then you read it with a for or foreach loop.

    After that, you can load it, and see if it is not a set of data in the list, and look for yourself, I hope it can help you.

  13. Anonymous users2024-01-26

    Create a model project for data transfer. Create a dal-class project to perform database operations. Set up a dll project for business logic processing... Then use listview to bind the data source in the main project.

  14. Anonymous users2024-01-25

    Returns dataset or datatable

    Then bind the data to the listview

Related questions
5 answers2024-03-26

Refers to the implementation algorithm that selects the query execution plan and relational operator when executing a distributed query. According to the different system environments, the algorithms used in query optimization are also different, which are usually divided into long-distance WAN environment and high-speed LAN environment, and the difference is mainly in the bandwidth of the network. For unary operators, query optimization methods in a centralized database can be employed. >>>More

6 answers2024-03-26

618ip software has the function of IP and automatic IP access.

7 answers2024-03-26

Such a professional question does not add ...... points

I'll give you an original answer. >>>More

4 answers2024-03-26

Distributed storage is a data storage technology that uses the disk space on each machine in the enterprise through the network, and these scattered storage resources form a virtual storage device, and the data is stored in all corners of the enterprise.

7 answers2024-03-26

According to Gartner, by 2020, the global data volume will reach 35 zettabytes, equivalent to 8 billion 4TB hard drives. Data structure. >>>More