I'm not suggesting you can't write typical "business logic" in Javascript,
but I'm questioning the wisdom of it and your workarounds demonstrate why
IMO.

I agree the decimal math isn't optimal in Javascript, but it seems like
such a small thing compared to adopting an entirely other language to do
the business logic (i.e. RPG, Java). While there are tools to span the gap
(iToolkit), it is still a gap that needs to be crossed for each business
logic call. And then there are two separate change management and
deployment processes that need to be coordinated. And maintaining knowledge
in both languages.

Regardless of our different views on possibilities of where business logic
should be, I am curious of the following given that you have a decent
amount of experience in a variety of languages...

If tasked with building an application from the ground up, what would your
language stack look like?

Aaron Bartell
IBM i hosting, starting at $157/month. litmis.com/spaces


On Tue, Mar 20, 2018 at 4:33 AM, Tim Fathers <X700-IX2J@xxxxxxxxxxx> wrote:

I'm not suggesting you can't write typical "business logic" in Javascript,
but I'm questioning the wisdom of it and your workarounds demonstrate why
IMO. The solution below is like something from a 1980's Windows program
before preemptive multitasking was around you had to remember to yield to
the OS and I'm sure you don't need me to explain the potential drawbacks.
The fixed point function doesn't round properly, as far as I remember, the
only safe way to do fixed point maths is to shift the numbers to integers
first, either way, it's not as straightforward as you claim. Even if it
were, having to wrapper all of your basic maths operations in a function
call is error prone and ugly and simply clutters up the program with noise.
The benefits of using JS or even Typescript to express your business logic
over a language designed specifically for that purpose would have to be
significant to outweigh the disadvantages and in it's current state, I
don't think they are.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.