Changes between Version 1 and Version 2 of Ticket #4421, comment 37


Ignore:
Timestamp:
2012-03-06T19:54:41+01:00 (15 years ago)
Author:
akks

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4421, comment 37

    v1 v2  
    1 I am not going to rewrite the whole thing from scratch (You can do it if needed) :)
     1I am not going to rewrite the whole thing from scratch (you can do it if needed) :)
    22
    3 Though we can add scripting for preferences manipulation, if it is already available in JDK. I imagine how to start JS engine and pass objects to it, but have no idea what "API" it should use with complex functions like "parseMapXPath". I am not so familiar with JavaScript, XPath, etc. , so I can not implement it myself. I also do not want to make all code dependent on preferences.xml format.
     3Though we can add scripting for preferences manipulation, if it is already available in JDK. I imagine how to start JS engine and pass objects to it, but have no idea what "API" it should use with complex functions like "parseMapXPath". I am not so familiar with JavaScript, XPath, etc. , so I can not implement it myself (or even write good scripts for it).
     4
     5I also do not want to make all code dependent on preferences.xml format (especially duplicate parsing code).
    46
    57Another problem - if all actions like asking user confirmations, deleting keys, etc. will be based on JS and XPATH only, the code may be shorter and cleaner, but resulting config file will be unreadable and ununderstandable by non-programmers. We need to find good balance between "declarative syntax" (simple, but harder to extend) and "JS API" (universal, but harder to undersatnd).