Websharp provides the ability to query objects, which is provided through the query interface. The definition of the Query interface can be seen as follows: attached 1:websharp main interface definition--query
can use the query interface in the following ways:
Websharp also provides a data access interface for direct manipulation of the database--dataaccess, which encapsulates the ado.net, which makes it easier for programmers to use ado.net functionality and can mask the differences between different databases. The definition of this interface can be seen as follows: attached 1:websharp main interface definition--dataaccess
can initialize a DataAccess object through the PersistenceManager newdataaccess method, and then invoke the appropriate methods to perform the desired function.
The processing of
business logic
With the above work, we can combine these objects and write our business logic. In object-oriented systems, business logic behaves as an interaction between objects. In some simple systems, there is no complex business logic, just some data maintenance work, then, with the above two parts of the work, we may actually have forgotten that most of the work.
The following is a simple example that represents the process of a warehouse receipt, in which you need to modify the inventory on hand for each product on the storage list:
can see that, after using Websharp, the writing of business logic can become a very natural process, but also can save a lot of code.
Provision of
Business services
The purpose of the Business Facade layer (Business façade) is to isolate the providers and users of system functionality, or, more specifically, the user interface of the software that isolates the business logic (see facade design patterns). You can use any of the existing methods to build this hierarchy, and in the example we provide, we use the Web service.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.