0
 Followers
3
 Likes

Improve javascript for web development

Frontend
Implemented
on 02 Oct 2018
Platform Server Release Oct.2019 CP2

Currently the javascript we can add on screens is very limited, we can't add parameters so if we want to do something on a specific Id, or use dynamic values which we receive as inputs on the screen, we end up having to use an expression, which can get very messy because we have to concatenate multiple strings and variables. (also have to watch out when using "" and '')

On mobile you can atleast at variables and use them by using the @ symbol.
Something like this would improve the usability for javascript alot.

As a plus it would be great to have autocompletion in javascript just like in css.

Created on 31 Oct 2017
Comments (5)

On web, there is no JavaScript node (as opposed to mobile). So where would your parameters even go? I'm not sure I'd like a JavaScript node for web though, it kinda defeats the low-code paradigm. I dislike it being necessary on mobile.

Sure it would defeat the low-code paradigm, but we would get more flexibility in creating javascript.

In the end ofcourse, it would be great if we didn't have to use any javascript at all, but currently that's not the case.

Yeah it defeat (little) the low-code paradigm, only I never had a project without own javascript being added. But the idea might be to add the javascript widget also to the web development part?

Evert,

I feel like we're going back to 4.2 then, where JavaScript was needed for about everything (except it's not needed now per se, but no doubt lots of front-end hackers will jump to the occasion like starving rabbits to a bowl of carrots :)).

Changed the status to
Implemented
on 02 Oct 2018


Hi Joey,

Thanks a lot you for your idea. We've recently released reactive web apps, a new generation of web applications that brings several cool features from mobile (and some improvements). Regarding JavaScript you will be happy to know that you'll be able to use the JavaScript node and pass parameters as you are describing. There is also some auto-complete, but it's rudimentary (CTRL + Space), there is another idea to improve that and I hope we can pick that one up.

In these new reactive apps you also need to write a lot less JavaScript, as client actions will automatically compile to it (and are easier to read and change).

As for using (or abusing) the JavaScript node, my recommendation would be to try to centralize its usage as much as possible in reusable libraries, so you don't have high code scattered all over you apps. This will make your app a lot easier to maintain.

Thanks again for your idea,
Tiago Simões

views
629
Followers
0