Business logic

From Wikipedia, the free encyclopedia

Jump to: navigation, search

Business logic is a non-technical term generally used to describe the functional algorithms that handle information exchange between a database and a user interface. It is distinguished from input/output data validation and product logic.

Contents

[edit] Scope of business logic

Business logic:

  • models real life business objects (such as accounts, loans, 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:[1]

  • business rules that express business policy (such as channels, location, logistics, prices, and products); and
  • workflows that are the ordered tasks of passing documents or data from one participant (a person or a software system) to another.

[edit] Location of business logic

Business logic in theory occupies the middle tier of a 3-tier architecture.

In single-tier applications, business logic, presentation logic, and CRUD are often fused, with each having intimate knowledge of, or being strongly coupled 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.[2]

In a multilayered architecture (compared to multitier architecture) 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 procedures and in decisions about input validation and display formatting. Hower[3] and others strongly argue against this practice, and 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.

[edit] Tools for handling business logic

Business logic can be extracted from procedural code using a business rule management system.[4]

[edit] References

[edit] Further reading

[edit] See also

Personal tools