Questions tagged [business-logic]

Business logic is the abstract thought process behind decision making in human transactions. Translation of business logic into code is one of the major tasks in producing business software.

626 questions
207
votes
10 answers

Business logic in MVC

I have 2 questions: Q1. Where exactly does "business logic" lie in the MVC pattern? I am confused between Model and Controller. Q2. Is "business logic" the same as "business rules"? If not, what is the difference? It would be great if you could…
101
votes
6 answers

ASP.NET MVC - Should business logic exist in controllers?

Derik Whitaker posted an article a couple of days ago that hit a point that I've been curious about for some time: should business logic exist in controllers? So far all the ASP.NET MVC demos I've seen put repository access and business logic in the…
Kevin Pang
  • 41,172
  • 38
  • 121
  • 173
86
votes
12 answers

MVC: Where to put business logic?

First of all, I have seen many questions of this, but not enough reasoning behind that. If my question is not good enough and should be removed I'll understand. I have taken a look at, for example, this and a 45+ voted up answer says he advises you…
63
votes
2 answers

Service layer and controller: who takes care of what?

In class we're now learning how to build up a Spring application, even though spring isn't directly involved, we learned how to make the interfaces for DAO and service layer objects. Please correct me if I'm wrong: DAO layer is pretty abstract: it…
toomuchcs
  • 1,344
  • 8
  • 20
  • 25
62
votes
9 answers

What is domain logic?

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?
Sydius
  • 13,567
  • 17
  • 59
  • 76
55
votes
3 answers

Business and application logic?

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…
Waleed Amjad
  • 6,716
  • 4
  • 35
  • 35
45
votes
17 answers

Arguments for/against Business Logic in stored procedures

What are the arguments for and against business logic in stored procedures?
Chris Burgess
  • 5,787
  • 13
  • 54
  • 69
42
votes
7 answers

What are Business Objects and what is Business Logic?

When reading, I keep seeing references to what they call Business Objects. I've looked up on Wikipedia and such but I keep not getting what a Business Object is. Is there any easy explanation of what it is for someone that doesn't know a thing about…
devoured elysium
  • 101,373
  • 131
  • 340
  • 557
42
votes
24 answers

Business Logic: Database or Application Layer

The age old question. Where should you put your business logic, in the database as stored procedures ( or packages ), or in the application/middle tier? And more importantly, Why? Assume database independence is not a goal.
Matthew Watson
  • 14,083
  • 9
  • 62
  • 82
39
votes
3 answers

Django Rest Framework Business Logic

I am trying to create a backend with Django Rest Framework and am trying to determine where to place the business logic. Would it go in the views.py? I would like to create more complex services than just getting a list of objects or grabbing one…
perp
  • 477
  • 1
  • 4
  • 6
37
votes
5 answers

ASP.NET MVC Business Logic in Domain Model vs Service Layer

I have been reading about where to put business logic in ASP.NET MVC Project for a while and I still can't get clear on some things. 1 - Domain models. What are these really? In my Model folder I have only a bunch of classes corresponding to my…
36
votes
13 answers

Why is it called 'business logic'? Where did this term come from?

I'm going through all sorts of WPF documentation, and I'm feeling unnecessarily confused. The term 'business logic' is scattered throughout it, as if everyone should know what it is. I can see what business logic is, according to this question…
mmr
  • 14,781
  • 29
  • 95
  • 145
34
votes
3 answers

Where to put business logic in spring mvc framework?

I don't know where to put the business logic in spring mvc because I'm new to it. I have a clue on what to do but because of lack in knowledge in spring mvc, I don't know where to start. I would also like to ask if somebody knows where I can get a…
Mark Vincent Osea
  • 679
  • 2
  • 9
  • 17
34
votes
11 answers

Storing Business Logic in Database

We want to write some business logic rules that work on top of certain data to build reports. Not sure which is the best to store them in the database MySQL. It can have a chain of the rules and then a statement for the result as shown above.
Harsha M V
  • 54,075
  • 125
  • 354
  • 529
30
votes
3 answers

Clean architecture - where to put input validation logic?

Perhaps in the app I have a feature allowing users to send feedback using a form with some validation logic: name can be empty feedback message should be at least 5 characters Where would you put these validation logic, either in domain layer as…
Duy Pham
  • 1,179
  • 1
  • 14
  • 19
1
2 3
41 42