For example, I get the user name but when stored in the database, the user name field should be the foreground user name plus the current date spelled out as a string
action or controller layer is the first layer. The first layer is generally used to accept data and verify that the data is not null and is in the correct format
such as whether the username is null or not, whether it is a safe string or not, and so on
The service layer is generally used to do a business logic implementation
At this point, userName = userName + new Date();
The DAO layer is the interface with the database, so it is not necessary for the user to be in the database.
The DAO layer is the layer that interacts with the database
That is, it reads and writes to the database and inserts the new userName obtained by the logic layer into the database
Question 2: What is meant by business logic? Different projects have different functions, and different functions require different implementations.
For example, let you implement a function that gives you two numbers, so that you get it and, you write how can chicken get any given two numbers and, this program to achieve the process can become business logic processing.
Question 3: often people mention business logic, in the end what is business logic Your father
really manage the strict
Tell the truth
If you say that falsehoods are easy to get addicted to
Question 4: the business logic of the program business logic from the name of the first is the business, the business is generally referred to the function of the software to be realized, that is, the customer's business, to achieve these operations there are a number of business, and the business of the customer is to realize. business, to achieve these businesses there is a process, the process is formed according to a certain relationship between a chain, the relationship between the chain has a certain logic, the synthesis constitutes the business logic. In demand analysis, you can generally use what to do, how to do to understand!
Question 5: The role of the business logic layer Business Logic Layer (Business Logic Layer) is undoubtedly the part of the system architecture that reflects the core value. Its focus is mainly on the formulation of business rules, the realization of business processes and other business requirements related to system design, that is, it is with the system to deal with the domain (Domain) logic, many times, the business logic layer is also called the domain layer. For example, Martin Fowler in the book Patterns of Enterprise Application Architecture, the whole architecture is divided into three main layers: the representation layer, domain layer and data source layer. Eric Evans, a pioneer of domain-driven design, made a more detailed division of the business logic layer, subdividing it into the application layer and the domain layer, and further separating the domain logic from the domain logic solutions through layering. The business logic layer has a key position in the architecture, which is in the middle of the data access layer and the representation layer, and plays the role of the top and bottom of the data exchange. Since the layer is a weakly coupled structure, the dependence between layers is downward, the bottom layer is "ignorant" of the top layer, and changing the design of the top layer does not have any effect on the bottom layer it calls. If the layered design follows the idea of interface-oriented design, then this downward dependency should also be a weak dependency. Thus, without changing the interface definition of the premise, the ideal layered architecture, should be a support for extractable, replaceable "drawer" type of architecture. Because of this, the design of the business logic layer is critical to a scalable architecture, as it plays two different roles. For the data access layer, it is the caller; for the presentation layer, it is the callee. The dependency and dependency relationships are entangled in the business logic layer, and how to decouple the dependencies is a task left to the designer in addition to implementing the business logic.
Question 6: What is the main function of the business logic layer? Business, that is, business, is a unit (individual, organization, etc.) to another unit to provide services. Logic (logic) means that people think about the problem, from certain known conditions to launch a reasonable conclusion of the law. So logic can not leave the business, the logic is often referred to as business logic (business logic), which is used to manage the business functions of a series of guildlines. you see
in the business should be as Richard said business entities (business entities), is a simplified version of the argument; logic is also a simplification of business logic. is also a simplification of business logic.
*Business logic is what you analyze in the analysis phase of the application domain of your software, and it does not depend on the existence of your software; rather, it precedes your software and restricts the behavior that your software should have.
All business logic should be placed in the middle tier and not left to the client to decide. Sometimes in order to reduce the number of network access, the client will have a test related to business logic, but in the middle layer of this test can not be omitted. For example, the date of the above judgment , the client can have no judgment , but the middle layer must have this judgment.
* As an example, the date field in the database logic or data layer just need to determine whether he is a date type
But for the business logic to enter a date is not enough, such as the date of execution of the sales order can not be earlier than the date of the development of the sales order; so to determine whether the user input is correct in fact, it is twofold: first, to see whether it meets the data specification and secondly, whether it meets the business specification, and secondly, whether it meets the business specification.
*
Logic is the process of human thought
Business logic is to mimic the process of human thought
(this approach is best understood and modified)
Page logic,
database structure,
are all the way computers think
If you want to make the most of your time and resources, you can do it in a way that makes sense to the user.
If you want to make a logical layer
then you have to write the business logic first
and then put the page logic and the database statements
in this direction
instead of fixing the database and then putting the business towards the data structure
It's an idea to hack the problem for a longer period of time and then you'll know the difference
Usually, the difference is not that big. The difference is not very ....
* give an example of an order, may be a little off-topic, I hope to deepen your understanding of this concept from the other side:
Business logic is the industry characteristics of the enterprise, corporate culture, ability to structure and resource status of the formation of the personality traits of the core business processing of basic paths and ways. So what exactly is our business logic? It is the order information fast holographic broadcast to the relevant positions, parallel configuration of resources, dynamic scheduling of job tasks, so that the order flow in an orderly manner between the various positions, and ultimately in the customer's packaging warehouse to form a closed loop of the object as a carrier. This logic is based on the basic facts of streamlined production, discrete processing, rapid delivery, varying specifications, complex demand and the basic attributes of the Dongjing people who abide by their duties.
Under this business logic, what should an order look like? Orders in addition to the basic customer basic information, basic product data and technical requirements, there must be process routes, transportation solutions, credit control and other aspects of the selection and control to lock the basic path of demand satisfaction, so that the order information is considered full, it holographic orders in the company's internal flow of the basic behavioral patterns, fully express the personality of Dongjing. Only such orders are considered to have a gene
Issue 7: the introduction of the business logic layer The so-called three-tier development is the entire business application of the system is divided into a representation layer, business logic layer and data access layer, which is conducive to the development, maintenance, deployment and expansion of the system. Layers is to achieve "high cohesion, low coupling". Using the "divide and conquer" idea, the problem is divided into individual solutions, easy to control, extend and allocate resources. Business logic layer
Question 8: What is business logic in java development? Business logic is to deal with the logic of the data . General background code is also divided into three layers action (controller) service DAO (here the three layers are not MVC)
For example, I get the user name but when deposited into the database, the user name field should be the foreground user name plus the current date spelled out as a string
action or controller layer is the first layer is generally used to and receive data. The first layer is generally used to accept data and verify that the data is not null and is in the correct format
such as whether the username is null or not, whether it is a safe string or not, and so on
The service layer is generally used to do a business logic implementation
At this point, userName = userName + new Date();
The DAO layer is the interface with the database, so it is not necessary for the user to be in the database. p> The DAO layer is the layer that interacts with the database
That is, it reads and writes to the database and inserts the new userName obtained by the logic layer into the database
Question 9: What is the business logic of ecshop $remember value of 1, remember the login information, and use a cookie to save the userName and password on the client side. The next time you open the site, first determine whether the session exists, if it does not exist, find out if the cookie
exists, if it exists, use the cookie to login.
Question 10: What is business logic Unlike before, this time I was more involved in the process of analyzing business logic. Interviews with customers to understand their needs, often in the process of doing the program only to find and overlooked what the problem, and then pick up the phone again. This repetitive process was tedious and uninteresting. The moment I put down the phone, I realized that a lot of code is actually written in vain, and then it is modified. In the past, I seemed to be more important to the so-called technical skills, spring, struts, hibenate, webwork, reports, mail, design patterns and so on. Now I think it does not seem to be the case, the customer does not care about your specific hibenate or JDBC, they care about their business processes can be realized. In this sense, good communication skills and analytical skills may seem more valuable.