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
25
votes
3 answers

Business Logic Classes Naming

I have a business layer that has some business objects/POCOs/entities/whatever. I also have some repositories for the data access. Up until this point, I've been accessing the repositories directly from my UI layer. I'm at a point where I actually…
Josh Close
  • 22,935
  • 13
  • 92
  • 140
21
votes
3 answers

Where to put business logic in django

For example, Account 1--> *User --> 1 Authentication 1 account has multiple users and each user will have 1 authentication I come from java background so what I usually do is define these classes as java beans (ie, just getter and setter, no…
20
votes
2 answers

Symfony2/Doctrine, having to put business logic in my controller? And duplicating controller?

I have a somewhat complex pricing mechanism in my application- Here are some of my business rules to set the stage (Entities are bolded): A Product may have unique Price Points for a given Customer, Website, or Customer Group. A Product can…
Nick
  • 2,872
  • 3
  • 34
  • 43
20
votes
3 answers

Where to put business logic in DDD

I'm trying to figure out the best way to build an easily maintainable and testable architecture. Having gone through several projects, I've seen some pretty bad architectures and I want to avoid making future mistakes on my own projects. Let's say…
Vex
  • 1,179
  • 3
  • 15
  • 24
20
votes
4 answers

Techniques for dealing with anemic domain model

I've read some of the questions regarding anemic domain models and separation of concerns. What are the best techniques for performing/attaching domain logic on anemic domain objects? At my job, we have a pretty anemic model, and we're currently…
Andy White
  • 86,444
  • 48
  • 176
  • 211
20
votes
7 answers

I need a simple rules engine, I think?

I need some advice on the best approach to solving this problem. I've researched DROOLS, Java Rule Engine and a few others. All of these are powerful, and have good things about them. I don't know which (if any) will be the best choice for me. I…
Andy
  • 8,841
  • 8
  • 45
  • 68
20
votes
4 answers

Beginners guide to BPEL

What is BPEL? I'm looking for some nice simple examples of BPEL usage. The wikipedia page isn't too enlightening. How about a "Hello world" in BPEL? A BPEL shell? A BPEL IDE?
1800 INFORMATION
  • 131,367
  • 29
  • 160
  • 239
19
votes
6 answers

What's a good solution for collecting business rule documentation?

I'm running into a situation, common I'm sure, where my business rule documentation is spread across emails, documentation (now out of date) and IMs. This stinks. I can think of 2 alternatives: Sharepoint (hate it, the search feature is terrible)…
jcollum
  • 43,623
  • 55
  • 191
  • 321
18
votes
8 answers

Separating UI and logic in C#

Does anyone have any advice on keeping logic out of my GUI classes? I try to use good class design and keep as much separated as possible, but my Form classes usually ends up with more non-UI stuff mixed in than I'd like, and it tends to make…
Andy
  • 2,764
  • 6
  • 24
  • 33
17
votes
2 answers

MVVM - Validation

We're trying to figure out validation in the mvvm doing validation in the business logic or model. I've implemented the validate by exception type in our business logic - a simplified diagram can be found here: If we've got lot's of inputs that are…
manni
  • 319
  • 3
  • 14
15
votes
5 answers

What is the difference between a validation rule and a business rule?

What is the difference between a validation rule and a business rule ? As per my understanding, 'if the state of the business object/objects is not as expected, then throw an error message' is a validation rule, and 'when the state of the business…
Snake
  • 445
  • 1
  • 4
  • 14
15
votes
3 answers

In separate data access & business logic layer, can I use Entity framework classes in business layer?

In separate data access & business logic layer, can I use Entity framework classes in business layer? EDIT: I don't think I will need to swap out the data access layer from my business logic in the future (i.e. will be SQL Server), however I will…
Greg
  • 34,042
  • 79
  • 253
  • 454
15
votes
9 answers

How to simplify complicated business "IF" logic?

What are the good ways to handle complicated business logic that from the first glance requires many nested if statements? Example: Discount Coupon. could be: 1a) Value discount 1b) Percentage discount 2a) Normal discount 2b) Progressive…
Zelid
  • 6,905
  • 11
  • 52
  • 76
14
votes
3 answers

Case-insensitive attribute-value selector with Jquery

I need to get the value of the content attribute of a certain meta tag. var someContent = $("meta[name=someKindOfId]").attr("content"); is how I usually do it. For business reasons, someKindOfId may be somekindofid. It could be other combinations…
Josh Johnson
  • 10,729
  • 12
  • 60
  • 83
13
votes
2 answers

Is it good practice to have linq query in Controllers?

I'm not very familiar with the MVC pattern. Could you tell me which one of the following three controller actions is better? Thanks :) (1) Have query in action: public ActionResult List() { var query = repository.Query().Where(it =>…
1
2
3
41 42