this post was submitted on 22 Feb 2025
21 points (100.0% liked)

Ask Lemmy

28582 readers
1379 users here now

A Fediverse community for open-ended, thought provoking questions


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.


6) No US Politics.
Please don't post about current US Politics. If you need to do this, try !politicaldiscussion@lemmy.world or !askusa@discuss.online


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 2 years ago
MODERATORS
top 4 comments
sorted by: hot top controversial new old
[–] grue@lemmy.world 8 points 7 hours ago* (last edited 7 hours ago)

There's a certain amount of stuff that's more or less common to all computer programs: the need to get input from and display output to the user, the need to interact with various features of the hardware (e.g. saving data to disc), etc. A lot of the code in the program is infrastructural boilerplate, transforming and moving around data between those things.

"Business logic" is everything else -- the code implementing the computation that fulfills the program's purpose, described in terms of the problem domain.

For example, if you're "manipulating a string" that's probably infrastructural code, whereas if you're "formatting a mailing address" that's probably business logic.

The common sorts of apps that exist to automate some straightforward bureaucratic workflows (i.e. filling out forms, but on a computer) are often designed with a "three tier" application architecture. The first tier is the UI, the third tier is the database store, and the middle tier is the business logic doing the calculation and validation that a clerk would've done by hand in the previous paper-based process.

Apps that operate in a more complicated way, such as CAD software, might tend to have a fuzzier distinction between business logic and infrastructural code.

[–] stinky@redlemmy.com 28 points 10 hours ago

In software, business logic is the non-technical requirements. For example, users with the "trainer" role can only take on four "trainees" maximum and cannot train each other. Note there was no discussion of code in that example, it was just a requirement of a system that a software developer will have to meet.

[–] MagosInformaticus@sopuli.xyz 13 points 10 hours ago

It's the parts of a program's concepts, rules and behaviours that are specific to the program's task. For instance

  • Items, a shopping cart and the conversion of such a cart into an order at checkout in an e-commerce application.
  • Clips of video and audio, static images etc. and the compiling of these into a single output video for a video editor.
  • Vertices, triangles, meshes, animation rigs etc. for a 3d editing program.
  • Accounting standards and tax laws for an accounting system.

When developing software you deal both with these kinds of specifics and generically reusable concepts that are more purely computational science, so a term to distinguish them is handy.

[–] 0x01@lemmy.ml 3 points 8 hours ago

I think of it as the parts of code that are specific to a business. The unique stuff that the business itself does, not generic stuff that all software does.

Spotify does music, a "play" function that starts music is business logic. A function that calculates the average of a set of numbers is generic code so not business logic.