Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users

Dashboard
Notifications
Mark all as read
Q&A

What is a good modern language to use for a Business Rules project?

+7
−0

This is a rather vague question, but I'm trying to solve a specific problem and I'm inexperienced in most of the potential solutions, so please forgive the inherent ambiguity.

I have access to a database with millions of historical financial transactions, with new transactions being added every day. Based on these transactions I want to apply several hundreds of business rules. These could be things like, "apply sales tax per lookup table based on city and state," or "record commissions based on the internal salesperson and their commission rate." It could also include things like, "bill client X twice per month between April and October at rate R1 for type A transactions and rate R2 for type B transactions, and a flat $100 per month from November to March."

Eventually I'd like for the business rules to be programmable via a web interface, but that's unnecessary at the beginning. My main concern is creating a system that is reliable and flexible enough to handle this level of complexity while still being relatively maintainable and comprehensible.

Unfortunately, it seems that COBOL is one of the most popular languages for this kind of problem, but I'd rather not go that route. I've used R and SQL at much smaller scale in a similar problem space, but it wasn't ideal. I'm familiar in passing with BREs like Drools, but have never actually worked with them, and my general perception is that they are often difficult to maintain.

I don't mind learning a new stack for this project; Go, python, or Rust have all caught my eye in the past. But I keep wondering if I'm missing something that has more inherent support for this use case.

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

Programmable by whom? (4 comments)

2 answers

+6
−0

Caveat

When making a decision of such lasting impact, you should conduct your own evaluation according to the criteria that matter to you. This post does not attempt to replace such an evaluation, but perhaps highlight some things to consider, and some solutions to look at.

Requirements

The focus of your project is implementing a great number of business rules for a mid size financial dataset. In particular,

  1. You want these rules to be easy to maintain
  2. Since you're dealing with financial data, correctness is of paramount importance.
  3. Since you want the option of having these rules written, or at least validated by, business people with little programming background, the language should be easy to learn and easy to use correctly

Evaluation Criteria

  1. for maintainability
    1. ability to structure and reuse code
  2. correctness
    1. test frameworks, continuous integration
    2. fixed-precision math, possibly with explicit control of rounding modes
  3. easy to learn
    1. well known, widely available learning materials
    2. devoid of unnecessary complexity
  4. easy to use correctly
    1. modern development environment, featuring
      1. syntax highlighting
      2. errors shown as you type
      3. code completion
      4. linting tools
      5. code style tools
    2. static typesystem to catch typos
    3. language devoid of unnecessary pitfalls that entrap newbies

Comparision

(in a real eval, I'd rank every solution against every requirement, but that's a bit too much work for a codidact post, so I am focusing on essentials here)

Drools

I have worked with Drools years ago. At the time, it offered little support for code reuse, and wasn't very good at structuring code. The development tooling was clearly inferior to a general purpose programming languages, and testing was an afterthought. Web-editor available. We replaced it with hand-written Java as soon as the customer realized they couldn't maintain the rules themselves.

Java / C#

Mature development tooling including static type system. Mature libraries. Established tools for testing and continuous integration. Can be a bit boiler-platey. Code easy to structure and reuse.

Java: Fixed precision math available, but cumbersome to use.

Python

No comment since I have no experience with it.

TypeScript

Mature web-based development tooling including static type system. Decent libraries. Established tools for testing and CI. Code easy to structure and reuse. Less boiler-platey that Java; code is often more compact and readable.

General Advice

When evaluating a business rules language, I recommend keeping the entire software development life cycle in mind: business rules are not just written, they are also tested, versioned, deployed, documented and maintained.

General purpose programming languages offer all that, but can be hard to get into for non-programmers.

In contrast, dedicated business rules languages are easy to get into, but offer little support to structure or maintain complex code. They are thus best suited if rules are simple, and change frequently.

Overall though, my impression is that the domain of "business rules" is not sufficiently different from general purpose programming to benefit significantly from dedicated technologies.

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+0
−7

First of all, I don't think that there is a specific good programming language for project.

Python

Python is beginner-friendly. But, python takes longer time than other programs take. You can handle millions-millions data easily using Python. But, when you compare Python to other programming languages than, Python is worst. There's a library which used for data analysis. That library's name is Pandas

Python offers ready solutions for big projects. Sometimes it is easier to write something in Python and rewrite it later in another language, if necessary. This give the startups the most valuable gift they require: time. Often trying to make a startup work is like being stuck in limbo—you are heading to a really good place, but you are not there yet. So the faster the startup reaches the other end of the rainbow, the better. Python is a language that is great for writing prototypes.

Go

When you compare Python with Go, than Go wins.

It’s a Cloud-native language that is being applied to the leading development projects based on the Ethereum and Docker.

Go is a cross-platform language that allows you to use the operating system of your choice when compiling the code. Golang is fairly easy to install and have superior debugging quality helping it gain popularity over other languages.

You can easily build production-level software of your choice including a range of use cases from the popular web APIs to encryption software.

Although Go vs Python is a trending topic among the business community, both the programming languages are not only good for creating web applications but both help in automating tasks related to your business.

Although, Python is very easy to read and write. Biggest companies like Facebook, Google, Instagram had used Golang also.

Golang is useful for carrying out programming for scalable servers and large software systems. The Golang programming language was built to fill in the gaps of C++ and Java that Google came across while working with its servers and distributed systems.

Rust

SO has a blog on What is Rust and why is it so popular?. Currently, user of rust is increasing rapidly. In rust program, error message explains beautifully where the problem is. Currently, lot of users choosing Rust and Julia for big data analysis and data science.

The main one is obviously Mozilla Firefox, more precisely its layout engine. Another large Rust project is the Redox Operating System. Also Tor might migrate some of their code from C to Rust and in the more distant future, same could happen for both Linux and Windows, but that’s a stretch. Now obviously in the case of Linux, Linus Torvalds is going to protest, but Microsoft is debating using Rust to avoid some of the nagging memory bugs they’ve had in the past and which cost them a lot. Also, both Windows and Linux would probably only make use of Rust in a rather localized manner. Rewriting everything is just not feasible. ~ source.

Rust is also being used more frequently now on reasonably sized projects. ... Half of the respondents felt that Rust compiles times have improved, in particular for large codebases with at least 10,000 lines of code. Two-thirds of respondents believed there is now better library support, too. Companies large and small are using Rust in production all over the world, including Mozilla, Dropbox, npm, Postmates, Braintree and others. Rust programs also optimize quite well, sometimes better than C. While C is good for writing minimal code on byte-by-byte pointer-by-pointer level, Rust has powerful features for efficiently combining multiple functions or even whole libraries together.

C/C++/C#

I like these languages. Currently, lot of users are leaving these languages cause, these languages needs lot of knowledge. Even, you can't understand code easily in these languages. Even, some graduated CSE student says that, I don't know why teachers taught us these languages. These languages are very hard to understand. I was a Python programmer also. When I took a book from CSE student I saw that C/C++/C# needs lot of knowledge. If you want to learn everything deeply than, you can start with these. A data scientist said that Python is very easy for data analysis but, most of backend work done on C and C++. That's why teachers always teaches C and C++ at first in CSE. It needs lot of logic.

The C programming language is so popular because it is known as the mother of all programming languages. This language is widely flexible to use memory management. C is the best option for system level programming language. Even, Linux was built using C and C++ also. Manjaro's git repo. C is perfectly suitable for building large projects in any field of programming.

However, it is, at heart, a systems programming language (as in close to the hardware), not an application programming language.

I've built pretty large applications in C, and it worked well. Would I have hired a programmer who couldn't do systems programming (understanding pointer arithmetic without thinking)? No way.

99% of today's programmers would be disqualified if we used C for applications. They need bulletproof object references and a GC. Even those don't help, at times.

Java

One of my favorite language. Java is little bit hard not harder as C or C++. Lot of big projects use Java also. Java is little bit hard to read also. If you are new programming languages world than, I will tell you choose Golang or, Python. If you have some knowledge on programming languages. Then, you can choose Java. I give Java medium priority.

I believe I started using Java in 1997, not long after Java 1.1 saw the light of day. Since that time, by and large, I've really enjoyed programming in Java; although I confess these days, I'm as likely to be found writing Groovy scripts as "serious code" in Java.

Coming from a background in FORTRAN, PL/1, Pascal, and finally C, I found a lot of things to like about Java. Java was my first significant hands-on experience with object-oriented programming. By then, I had been programming for about 20 years, and it's probably safe to say I had some ideas about what mattered and what didn't. ~ visit the page to read more about Java

Java is a great powerful tool for building big projects that are easy to scale. You can use Java Platform to add as many features to the project as needed. Development environment comprises a wide choice of frameworks, plug-ins, APIs, libraries Runtime Environment and JVM (Java Virtual Machine).

Why does this post require moderator attention?
You might want to add some details to your flag.

2 comment threads

Most if not all examples seem to be general purpose languages, rather than fit to manage business rul... (6 comments)
Choose language (1 comment)

Sign up to answer this question »