Tagged: JavaScript
- This topic has 2 replies, 3 voices, and was last updated 8 years, 3 months ago by Ed Shaw.
-
AuthorPosts
-
-
August 30, 2016 at 5:59 am #7407Aditya PhatakParticipant
Hi,
From the training, I understand that NexJ also has support for JavaScript. I wanted to check how we can make use of JavaScript instead of Scheme to write scripts and/or conditional statements in NexJ Studio.
Are there any settings that we need to apply in the tool to be able to use JS? Also, since the console is specific to support Scheme, is there any way we can use the Scratchpad resource to write JS codes?
Regards,
Aditya Phatak.
0 -
August 30, 2016 at 6:59 am #7414Owen PondParticipant
For the majority of uses in NexJ Studio, it is not currently possible to script or write conditional statements in JavaScript.
In cases where your project demands you to create unsupported visualizations or very specific client side behaviour, it is possible to build custom controls using JavaScript. I recommend keeping JS custom controls to a minimum for the sake of better code management and for the sake of allowing the framework to provide multi-browser support for you.
0 -
August 30, 2016 at 11:51 am #7424Ed ShawKeymaster
I’ll just add a bit here. Although JavaScript is currently not used as a server-side scripting language in NexJ Studio, it is becoming more and more important to UI and service development.
As Owen said above, JavaScript is not currently used for business model scripting. Scheme is our scripting language and is fully integrated into the object and event model. There is also an option, in the business model class events to use Java methods as actions, but that is typically used for framework functionality. We are working on some intermediate training on this topic that I will published in a future article.
JavaScript is used mainly for custom UI development. The main use cases are in
- custom UI controls,
- 3rd party integration with the PortalAPI,
- and custom UI and data service development using our AFL JavaScript libraries.
UI Custom Controls allow you to create a control in HTML and JavaScript along with some standard interfaces to add a control to the UI control palette. This is typically an advanced technique used by our internal development team, but has been used with support from our professional services on client engagements as well.
Information about 3rd party UI development with the PortalAPI can be found in the Developer’s Guide.
AFL will become more and more important over the next few releases. It is not shipped in the current Jade release, but is compatible and can be included on a case-by-case basis. Currently, it can be used for custom UI development of controls and portlets as well as agile service development in NodeJS. In the future, it will be replacing our UI rendering engine and may deprecate the current approach to Custom UI Controls.
1
-
-
AuthorPosts
- You must be logged in to reply to this topic.