1
 Follower
6
 Likes

Modern JavaScript (ES6, ES7) support in ServiceStudio

Frontend
On our radar

Hello All,


JavaScript has had ES6 and ES7 syntax since a couple of years. The new syntax provides some good features like lambda syntax, the 'let' keyword, the 'const' keyword, template literals etc.

While some old browsers do not support all of the syntax, there are libraries like 'babel.js' (https://babeljs.io/) which transform modern JS to ES5 (the usual JS syntax).

It would be great if the OutSystems product allowed using modern JS directly in ServiceStudio.

OutSystems can integrate the babel.js within the platform - so that it can convert any modern JS syntax to ES5 (older JS when required for old browsers, already most modern browsers do support ES6 , but not all..).

Advantages:

1. Developer productivity with modern JS will be very good. Many forge components rely on JS and JS libraries and having support for modern JS will be great.

2. Modern JS is helpful for writing easier to read and maintainable JS code.

3. On the mobile front in OutSystems - apache cordova for the mobile plugins is JS based - so supporting modern JS would be a win over there too.

Created on 12 Nov 2018
Comments (5)

Changed the category to Frontend


Hi Chetan,

I'm not sure I follow. Service Studio allows you to use whatever JavaScript you like? Or is it the integrated syntax checker that throws errors on valid ES6/7 code?

Hello Killian,


Yes, we can use the modern JavaScript directly in service studio.

But:

1. There is no syntax highlighting for modern JS. 

2. And, there is no on demand translation of modern javascript to the usual javascript. Some browsers like IE 11 do not support all of the modern javascript yet. So - the javascript community has babel.js as a solution - which translates the modern JS to the older JS (ES5) if required.

OutSystems can integrate the babel.js within the platform and intelligently decide (depending on support provided by browser for modern JS) whether babel.js transformation should be applied or not. A browser like Chrome wont need the transformation, but a browser like IE 11 may (and all older IE versions). Edge browser also supports some features already for modern JS and firefox too.



Changed the status to
On our radar


Hi Chetan,

Thanks for the idea. We've actually already had similar conversations at R&D to allow something similar to what you're proposing.

We're evaluating how we have a broader support for modern JS.  We'll tackle something along these lines soon. 

Kind regards,

Ricardo Alves


Thank you Ricardo.

views
209
Followers
1