3 ms·
What if you write code that isn't for a business? How does your workflow apply then?
by qmmmur 6y ago
What if you write code that isn't for a business? How does your workflow apply then?
- jugg1es 6y agobusiness logic does not mean it has to be for a business. It's more like calling the pointy part of a spear the "business end". It's the part that does the job.
- deleted 6y ago[deleted]
- hoorayimhelping 6y agoBusiness Logic is a euphemism. It doesn't mean literally business logic, it means the 'core functionality of your code.' When you design software, you typically model some real world process or system in the abstract. Business logic is the core problem of your model. You can also call it model code, or core functionality. It all means the same thing - it's the important part of your app. Using the old Asteroids arcade game [1] as an example: The business logic is how many lives the player has, what happens when you shoot asteroids (they break up, or disintegrate if they're small), what happens when you reach the edge of the map (you wrap around the other side), what kind of control scheme there is (there's momentum in asteroids, you don't stop on a dime) etc. 1) https://www.youtube.com/watch?v=WYSupJ5r2zo https://www.youtube.com/watch?v=WYSupJ5r2zo
- SamuelAdams 6y ago"domain logic" might be a better euphemism. Consider a library that encrypts text with AES-256. You might want unit tests that verify the IV, cypher block, plaintext and encrytped text (result) of that function. The method, "encrypt" might be your "business logic" that ought to be unit tested.
- gnulinux 6y ago"Business logic" is just another name of "logic". E.g. something like "if X is even, then print 'fizz' otherwise print 'fuzz'" is considered business logic.