I am currently developing a web application for my thesis.I was asked by my professor to make diagrams to describe the business logic. Since I don't have a prior experience, I am pretty confused with all the terminology. I managed to clarify,I think, what business rules and business logic are, but I can't find out how you describe the business logic. Is it something particular or is it something more general? Do I need to learn UML? Does the fact that I use MVC affects the way I'll describe it?
Is it something particular or is it something more general?
Typically, business rules are of the form "if(condition) then action", while business logic tends to describe a larger set or a sequence of both business rules and other logic. So "business logic" is more general any code that implements logic specific to your problem domain, where "business rule" is a specific concept.
Examples (pseudo code):
// business rule if(sales-revenue > 1000) then send("thank you") //business logic sales-revenue = sum(all items in order) bonus-points = sales-revenue * .1 executeBusinessRules()
Do I need to learn UML?
No, you don't have to learn UML. But it may help to visualize your solution, and in fact make it easier to describe because you have to think it through more thoroughly - if you can't draw it in UML, probably something is not quite right yet.
Business rules can be nicely described with state charts or activity diagrams, and business logic in general can be described in sequence diagrams or activity diagrams.
Does the fact that I use MVC affects the way I'll describe it?
It shouldn't - if it does, this may indicate poor separation of concerns. MVC is a way to organize your code, or more specifically to keep aspects of your implementation separate (aka 'separation of concerns'). The M(odel) in MVC is what should implement your business logic.
While you can use some of the UML diagram types (especially activiti diagrams and state charts) to describe business logic, there is a more specialized graphical notation standard for that: BPMN.