Business and application logic? [closed]
Asked Answered
D

3

55

I often see the phrases 'business logic' and 'application logic' in terms of web development (I assume it also applies to programming in general rather than just web development).

This is quite new to me so I don't really know what it means, could anyone please explain me what is exactly meant by this? Is it just a 'buzz word' used by programmers? Or?

Drews answered 21/9, 2009 at 19:40 Comment(2)
Duplicate: #1441702Theodoratheodore
The listed duplicate explains business logic, but not application logic.Continually
V
46

Business logic is basically rules of the system according to functional specifications. For example Object A of type B must have attributed C and D, but not E. Application Logic is more of a technical specification, like using Java servlets and OJB to persist to an Oracle database. In the end, that are buzz words to help describe tiers of technology in an application. Hopefully in an effort to keep various tiers separated making a better application design.

Vampire answered 21/9, 2009 at 19:47 Comment(3)
Could we say : Application logic is the logical tools,techniques,platforms and so on in our application ?Pence
The examples are not good, especially that this is not a Java question and not everyone knows what Java servlets and OJB are.Mercola
I think you are talking about business rules not business logicShredding
M
52

Say you write a system which solves a business need for a customer.

The sum of all your code is the application logic, or system architecture - basically the entirety of the system you're building.

The business logic is the code subset which models and drives actual business processes. "What happens when an order for Product X is placed? How is the cost of Product Y calculated?" Ie. the bits of code where you probably need some input from the customer/domain expert/project stakeholder.

Ideally, the business logic is separated into its own tier or layer (see the Wikipedia article on N-tier architecture). The rest of the code can often simply be thought of as infrastructure to help that business logic execute (database wrapper, helper functions, service facades, external integration, GUI, etc).

Mirador answered 22/9, 2009 at 6:29 Comment(0)
V
46

Business logic is basically rules of the system according to functional specifications. For example Object A of type B must have attributed C and D, but not E. Application Logic is more of a technical specification, like using Java servlets and OJB to persist to an Oracle database. In the end, that are buzz words to help describe tiers of technology in an application. Hopefully in an effort to keep various tiers separated making a better application design.

Vampire answered 21/9, 2009 at 19:47 Comment(3)
Could we say : Application logic is the logical tools,techniques,platforms and so on in our application ?Pence
The examples are not good, especially that this is not a Java question and not everyone knows what Java servlets and OJB are.Mercola
I think you are talking about business rules not business logicShredding
E
9

It might be not very accurate, but I use the following thinking to determine whether it's application, business logic or something else:

flowchart

Eleonoreeleoptene answered 18/3, 2019 at 8:32 Comment(1)
Please don't confuse this classification with layers in your architecture. Sometimes even in one function or a class you may find different types of logic. For example, Backbone model is a classic example of non-reusable code (application logic) but includes potentially reusable pieces like calculated fields (business logic) or utility functions (interface logic).Eleonoreeleoptene

© 2022 - 2024 — McMap. All rights reserved.