Business logic
Encyclopedia
Business logic, or domain logic, is a non-technical term generally used to describe the functional algorithm
Algorithm
In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning...

s that handle information exchange
Information exchange
Information exchange is an informal term that can either refer to bidirectional information transmission/information transfer in telecommunications and computer science or communication seen from a system-theoretic or information-theoretic point of view....

 between a database
Database
A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality , in a way that supports processes requiring this information...

 and a user interface
User interface
The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...

.

Scope of business logic

Business logic:
  • models real life
    Real life
    Real life is a term usually used to denote actual human life lived by real people in contrast with the lives of fictional or fantasy characters.-Usage online and in fiction:On the Internet, "real life" refers to life in the real world...

     business objects (such as accounts, loan, itineraries, and inventories)
  • prescribes how business objects interact with one another
  • enforces the routes and the methods by which business objects are accessed and updated


Business logic comprises:
  • business rule
    Business rule
    A Business rule is a statement that defines or constrains some aspect of the business and always resolves to either true or false. Business rules are intended to assert business structure or to control or influence the behavior of the business. Business rules describe the operations, definitions...

    s that express business policy (such as channels, location, logistics, prices, and products); and
  • workflow
    Workflow
    A workflow consists of a sequence of connected steps. It is a depiction of a sequence of operations, declared as work of a person, a group of persons, an organization of staff, or one or more simple or complex mechanisms. Workflow may be seen as any abstraction of real work...

    s that are the ordered tasks of passing documents or data from one participant (a person or a software system) to another.

Business logic

In single-tier applications, business logic, presentation logic, and CRUD
CRUD (acronym)
In computer programming, create, read, update and delete are the four basic functions of persistent storage. Sometimes CRUD is expanded with the words retrieve instead of read or destroy instead of delete...

 are often used, with each having intimate knowledge of, or being strongly coupled
Coupling (computer science)
In computer science, coupling or dependency is the degree to which each program module relies on each one of the other modules.Coupling is usually contrasted with cohesion. Low coupling often correlates with high cohesion, and vice versa...

 to, the others. This is seen as problematic, since changes to one result in changes to both of the others, requiring retesting and revalidation of the entire system for a single change. The interweaving also limits the extent to which the CRUD and the business logic can be reused
Reusability
In computer science and software engineering, reusability is the likelihood a segment of source code that can be used again to add new functionalities with slight or no modification...

.

In a multilayered architecture
Multilayered architecture
A multilayered software architecture is using different layers for allocating the responsibilities of an application.There is also an architectural pattern that is named Layers and has been described in different publications, including the book Pattern-Oriented Software ArchitectureA System of...

 (compared to multitier architecture
Multitier architecture
In software engineering, multi-tier architecture is a client–server architecture in which the presentation, the application processing, and the data management are logically separate processes. For example, an application that uses middleware to service data requests between a user and a database...

) business logic is a separate module. In the common 3-tier architecture, the business logic in theory occupies the middle tier, the business-services tier or business layer. In practice, the business logic is often interwoven in the other two tiers (the user services tier and the database services tier), such as by encoding business logic in stored procedure
Stored procedure
A stored procedure is a subroutine available to applications that access a relational database system. A stored procedure is actually stored in the database data dictionary.Typical uses for stored procedures include data validation or access control mechanisms...

s and in decisions about input validation and display formatting. However there is not a well-defined rule:
Chad Hower and others advocate storing all business logic in a business layer, and not encoding any business logic in the application's user services or database services tiers, while T. Koppelaars and others are for placing the business logic layer in the database using stored procedures.

Tools for handling business logic

Business logic can be extracted from procedural code using a business rule management system
BRMS
A BRMS or Business Rule Management System is a software system used to define, deploy, execute, monitor and maintain the variety and complexity of decision logic that is used by operational systems within an organization or enterprise...

.

Further reading

— McLaughlin discusses the façade pattern
Façade pattern
The facade pattern is a software engineering design pattern commonly used with Object-oriented programming. The name is by analogy to an architectural facade....

 for implementing the business layer of an application. — Turau presents an application framework implemented using Java Servlet
Java Servlet
A servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed via a request-response programming model. Although servlets can respond to any type of request, they are commonly used to extend the applications hosted by Web servers...

s and JavaServer Pages
JavaServer Pages
JavaServer Pages is a Java technology that helps software developers serve dynamically generated web pages based on HTML, XML, or other document types...

 that enables the separation between business logic and presentation logic, allowing development of each to proceed in parallel along relatively independent but cooperating tracks.|title=Network-based business process management: embedding business logic in communications networks|author=Pau, L-F. and Vervest, P.H.M.|date=2003-12-08|series=ERIM Report Series Research in Management|publisher=Erasmus University
Erasmus University
Erasmus University Rotterdam is a university in the Netherlands, located in Rotterdam. The university is named after Desiderius Erasmus Roterodamus, a 15th century humanist and theologian...

}} — Pau and Vervest develop an approach for the embedding of business logic into the communications network that underlies a distributed application with a multiplicity of actor
Actor model
In computer science, the Actor model is a mathematical model of concurrent computation that treats "actors" as the universal primitives of concurrent digital computation: in response to a message that it receives, an actor can make local decisions, create more actors, send more messages, and...

s, in order to optimise the allocation of business resources from a network point of view.

See also

  • Enterprise JavaBean
    Enterprise JavaBean
    Enterprise JavaBeans is a managed, server-side component architecture for modular construction of enterprise applications.The EJB specification is one of several Java APIs in the Java EE specification. EJB is a server-side model that encapsulates the business logic of an application...

  • User interface management systems
    User interface management systems
    A User Interface Management System is a mechanism for cleanly separating process or business logic from Graphical user interface code in a computer program. UIMS are designed to support N-tier architectures by strictly defining and enforcing the boundary between the business logic and the GUI...

  • Magic pushbutton
    Magic pushbutton
    The magic pushbutton is a common anti-pattern in graphical user interfaces.http://www.scribd.com/doc/99553/AntiPattern-by-Indranil-Nandy-IIT-Kharagpur...

  • Business logic layer
    Business logic layer
    A business logic layer , also known as the domain layer, is a software engineering practice of compartmentalizing. The business logic layer is usually one of the tiers in a multitier architecture. It separates the business logic from other modules, such as the data access layer and user interface...

  • Buzzword
    Buzzword
    A buzzword is a term of art, salesmanship, politics, or technical jargon that is used in the media and wider society outside of its originally narrow technical context....

  • Domain layer
  • Business logic abuse
    Business logic abuse
    Business logic abuse is the abuse of the legitimate business logic of a website or other function that allows interaction. Business logic abuse is usually perpetrated by bad actors to steal money, steal personally identifiable information, or exploit the system that supports the business logic in...

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK