1

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?

  • 1
    MVC and any other design pattern are independent of the business rules/logic. Business rules are defined by the business, and include things like use cases (or user stories) and the constraints/rules that they define (which, again, come from the business). "Business" doesnt necessarily mean a company, it is the rules in your problem domain. For example If I was creating some tax software, there are certainly rules which help define that domain. Is your professor maybe asking for a "system sequence diagram" and domain model? Yes, it will highly benefit you to learn basics of UML. – jordan May 6 '14 at 17:15
  • @jordan he asked me for "block diagram(in Visio) with the procedures and the logic that follows them."(bold words are translated by me because English is not my native language) and then he asked me to find how I "describe the business logic" – Nikos M. May 6 '14 at 17:28
  • I didnt think block diagrams contained interface details such as procedure/method/function names. They are quite high level and just show the names of different components, or "blocks", in a system, and not exactly the interfaces of each of those components. Does this page about domain models help? sparxsystems.com/enterprise_architect_user_guide/10/… If not, I think you may just have to ask your professor for more information. Diagrams dont contain the logic, that is what the implementation describes (i.e. source code). – jordan May 6 '14 at 17:35
  • 2
    Did you think to ask your professor to help you work through an example? We could tell you a hundred different ways to make a diagram to describe your business logic but the only person whose opinion that matters is your professor's. – Dunk May 6 '14 at 19:56
1

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.