In our system everything in the backend is a stored procedure, most of which are written in pure SQL because they are for retrieving data from the database but even the basic CRUD APIs to simple files are also pure SQL stored procedures. Anything more complex or needing to use existing stuff is done in RPG, but even then, embedded SQL is used for all I/O on new programs, I never use native I/O these days, hence most of what I end up writing is SQL.

________________________________
From: WEB400 <web400-bounces@xxxxxxxxxxxx> on behalf of Justin Taylor <JUSTIN@xxxxxxxxxxxxx>
Sent: 19 March 2018 15:51
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] Rise of Node

"The majority of the backend work I do is pure SQL."

IMO, "backend" means business logic, which wouldn't be just SQL. Where's your business logic?



-----Original Message-----
From: Tim Fathers [mailto:X700-IX2J@xxxxxxxxxxx]
Sent: Saturday, March 17, 2018 10:37 AM
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Subject: Re: [WEB400] Rise of Node

Henrik, I fear you may have missed my point and perhaps misunderstood where I am coming from too. I have written hardly any RPG in the last few years, most of my time has been spent writing Typescript/Angular, with a smattering of Java. The majority of the backend work I do is pure SQL. I've also a reasonable amount of experience with languages away from the IBM i, having spent some time writing microlight avionics stuff with embedded C and assembly so I can assure you I am not stuck in some RPG/IBM i comfort zone 😉 I'm also quite a fan of Javascript and especially Typescript, but that doesn't mean I can't see their weaknesses too.

I made no comment about the stability of Javascript in terms of the VM or the environment in which it runs, I said I thought Javascript was a poor choice for implementing core business logic. Its lack of static typing and the fact it's interpreted at runtime make it very easy to write poor and unreliable code. There are way too many programming pitfalls in the standard language IMO to make it a good choice for critical code (I highly recommend Douglas Crockford's "Javascript - The Good Parts" if you want to know some of them, it's a bit out of date, but still worth a read). Javascript doesn't even support decimal numbers natively, which makes it pretty useless for doing almost any kind of financial calculations without some sort of workaround (try typing 0.1 + 0.2 in your Javascript console - most people might be surprised to find the answer isn't 0.3!). I know there are tools and libraries to mitigate many of these issues, for example Typescript IMO is a massive step forward and linters can pickup common coding mistakes, but I still don't think I'd use even Typescript for my core business code and I definitely wouldn't suggest to anyone they bin their existing stuff and rewrite it.

The stability issues I mentioned are more to do with the stability of the libraries that you inevitably end up depending on, in terms of breaking changes being made, not the stability of VM or the platform itself. Having made the journey from Angular 1 to Angular 5, I can tell you, it's been painful at times and I don't think this is unique to Angular.

I believe it's about using the best tool for the job, for the front-end I think Progressive Web Apps written in Typescript and Angular, interfacing to the backend over a RESTful API, are absolutely the way forward. But, as I said, I think there are better languages for writing the server side code in.

--
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://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fweb400&data=02%7C01%7C%7Ce5f6a68612bf479dd70f08d58da8fd64%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636570679304782545&sdata=hFTdGJWeXolEQv4cvjQGU4bcAriSQOdUsduh8GQGNFA%3D&reserved=0
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fweb400&data=02%7C01%7C%7Ce5f6a68612bf479dd70f08d58da8fd64%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636570679304782545&sdata=QMV5Pu8pDH0I2bc0P64GS0xu4WceuLsi99IC3NNpoGk%3D&reserved=0.


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.