business-logic

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

戏子无情 提交于 2019-12-02 18:54:06
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 here: What exactly consists of 'Business Logic' in an application? But where did the term come from? Why is it called 'business logic' and not, say, 'core logic' or 'main algorithms' or any other more generic terms? Very few of the programs I write have anything to do with 'business logic', and when I think of 'business logic' I think of things handling

How to simplify complicated business “IF” logic?

*爱你&永不变心* 提交于 2019-12-02 18:47:23
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 discount 3a) Requires access coupon 3b) Do not require access coupon 4a) Applied only to the customer who already bought before 4b) Applied to any customer 5a) Applied to customer only from countries (X,Y,…) That requires code even more complicated then this: if (discount.isPercentage) { if (discount.isNormal) { if (discount.requiresAccessCoupon) { } else { }

What is domain logic?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 15:07:01
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? The domain is what you are modelling. If you are modelling a business problem, they are the same thing. If you are modelling something else, physics for instance, there is probably no business logic in your system, but the physics parts are still domain logic. Agile Noob Domain is the world your application lives in. So if you are working on say a flight reservation system, the application domain would be flight reservations. Business Logic on the

I need a simple rules engine, I think? [closed]

江枫思渺然 提交于 2019-12-02 14:43:30
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 have one business object. (simplified for demo) Person firstName:String lastName:String departMent:String hireDate:Date I need to write an editor in a web application that will allow for complex rules to be built around these fields. I need to support complex nested AND/OR logic. I just need basic operators, and the rule should simply evaluate to true

Storing Business Logic in Database

狂风中的少年 提交于 2019-12-02 14:18:46
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. Somnath Muluk For building reports you can convert business logic in any programming language. And use database data for generating reports. Against of business logic stored in database I place a high value on the power of expression, and I don't find the SQL space to be all that expressive. Use the best tools you have on hand for the most appropriate

Business Validation Logic Code Smell

核能气质少年 提交于 2019-12-01 14:31:08
问题 Consider the following code: partial class OurBusinessObject { partial void OnOurPropertyChanged() { if(ValidateOurProperty(this.OurProperty) == false) { this.OurProperty = OurBusinessObject.Default.OurProperty; } } } That is, when the value of OurProperty in OurBusinessObject is changed, if the value is not valid, set it to be the default value. This pattern strikes me as code smell but others here (at my employer) do not agree. What are your thoughts? Edited to add : I've been asked to add

MVVM - Validation

和自甴很熟 提交于 2019-11-30 12:03:11
问题 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 independent of each other, there is no problem, the exception is thrown, the textbox catches it an marks it's borders red for each wrong input. However, when we've got dependent values we're in trouble. e.g. Value1 and Value2 in the model must not

Business Logic Layerin Servlet and JSP

岁酱吖の 提交于 2019-11-30 09:40:31
问题 Recently I started to move from a .NET platform to J2EE. I'm Eclipse to build JSP and Servlet applications which should use Business Logic layer. The approach in .NET is very simple I'm building web Application Project inside the solution, then Creating Class Library project and refers its output in Web Application References. How should I do it in Eclipse? Should I create separate project and build JAR file as output and refer it in Web Project? I'm new to Java so any comment will be more

Arguments for/against Business Logic in stored procedures [closed]

陌路散爱 提交于 2019-11-30 06:16:13
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 months ago . What are the arguments for and against business logic in stored procedures? 回答1: Against stored procedures: business logic in programming space I place a high value on the power of expression, and I don't find the SQL space to be all that expressive. Use the best tools you

MVVM - Validation

浪尽此生 提交于 2019-11-30 01:56:42
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 independent of each other, there is no problem, the exception is thrown, the textbox catches it an marks it's borders red for each wrong input. However, when we've got dependent values we're in trouble. e.g. Value1 and Value2 in the model must not be the same, so we've got a validate function in each of those looking for the equals value and throw