Home Is it good to execute javascript methods received from REST API's
Reply: 1

Is it good to execute javascript methods received from REST API's

Thillai Narayanan
Thillai Narayanan Published in 2018-01-12 05:52:11Z

We have a single page application build on Angular 4 and based on the customer requirements, we will change the input fields.All business rules for changing the fields are written in javascript and execute in the Java Platform and we will receive the output via REST API.

Now we plan to send the Javascript rules (function and methods) rules in REST API. So that UI can read the JS methods from REST and execute it and render the values and fields accordingly.

Is it good to have the latter approach of executing the JS received from REST API.

Sunil B N
Sunil B N Reply to 2018-01-12 06:01:37Z
  1. There is nothing wrong in executing JavaScript received from REST APIs.
  2. Make sure you are applying the same rules/validations before doing CRUD operations. User can manipulate these validations on client side and by pass them.
  3. And also make sure they have the same behaviour in client and server.. You may be running on some rhino engine or something.
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.258586 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO