views:

182

answers:

4

Hi all,

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?

Thank you in advance

+2  A: 

Wikipedia Page on N-Tier Architecture

Jon Seigel
This article briefly explains business logic, but not application logic.
Robert Harvey
Well, yes, because the two are describing the same thing.
Jon Seigel
Yes indeed, I had already looked at Wikipedia and found it quite ambigious. Was hoping for a more concise explanation.
Sbm007
Jay's answer more correctly describes application logic. See also http://www.dougboude.com/blog/1/2008/08/Just-What-Is-Application-Logic-Anyway.cfm
Robert Harvey
...although "Architecture" is probably a better term.
Robert Harvey
Very eloquent and well written article, thanks for the share. I got my info.
Sbm007
+2  A: 

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.

Jay
Clean and simple. Nice answer. :)
Arnis L.
A: 

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).

thomanil
+1  A: 

If you use MVC pattern, then business logic should be in your models and application logic in your controllers.

presario
Is that an answer to a question?
Arnis L.