× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



And if we really stripped down BL how much is there really that has ADD,
SUB, MULT, DIV on DB data?
it is more likely that you find it in if's or simple sums of columns from
multiple rows processed.

And then there is of course dates especially stored in numeric fields but
that problem is there in any
program language because only input validation prevents you from entering
dates like 31022018 or
99992018 or any given combination.

On Tue, Mar 20, 2018 at 12:40 PM, Aaron Bartell <aaronbartell@xxxxxxxxx>
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.

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.


--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.