What is domain logic?

Sydius picture Sydius · Dec 11, 2008 · Viewed 23.4k times · Source

What is domain logic? The Wikipedia page for domain logic redirects to business logic. Are they the same thing, and, if not, how do they differ?

Answer

Agile Noob picture Agile Noob · Dec 12, 2008

Domain is the world your application lives in. So if you are working on say a flight reservation system, the application domain would be flight reservations.

Business Logic on the other hand is a more discrete block of the entire Application Domain. Business Logic is usually a section of code built to perform one specific business process. So you would have business logic to take a reservation. Another bit of business logic would be code to refund cancelled tickets.

The objects that support your business process then become your business objects!