-
-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation on Automation / Scripting #1780
Comments
No, despite looking the way it is and how it's written, it doesn't belong in the Developer's section because it actually does show end users what is available in their rules when using one of the JSR223 languages. I don't know where it's best placed but in the Development section isn't where it belongs, at least not yet. I fully expect it to become deprecated at some point anyway since I think only ECMAScript 5.1 and Jython use it. The rest of the automation add-ons provide their own helper libraries that hide all of that detail. Maybe it would make sense to move it to the development section when ECMAScript 5.1 and Jython completely goes away. For ECMAScript 5.1 that will be relatively soon (within a year or two I expect, as soon as we move to Java 17).
While I don't disagree, it doesn't feel like it's the core documentation's job to document what individual add-ons do or do not provide. How would we keep up? Because the Jython and ECMASCript 5.1 Helper Library was never actually made a part of the openHAB project, documenting it too seems a bit out of place since, for all intents and purposes it's a third party package. The helper libraries for individual add-ons (e.g. jRuby, JS Scripting) should be thoroughly documented in the individual add-on's docs for sure. I know that's the case for JS Scripting at least. I completely agree that the rules docs need a complete overhaul. But a lot is also in flux right now with ECMAScript 5.1 definitely going away sometime soon, Jython likely to go away sometime soon since the upstream doesn't seem to be well maintained any more. There's even rumblings that the upstream for Xtend (upon which Rules DSL is built) might be abandoned by the Xtext folks. So right now OH ships with default languages whose future are not certain. I fear spending too much time making changes that ultimately will not be relevant for long. As I've been working on the Getting Started Tutorial, which I need to find time to get back to so I can get it submitted as a PR, I've considered the following as potential next steps.
So the basic flow would be to look at the generic docs for general rules concepts and then click through to the specific page that provides the detailed reference for the language you are using. Each automation add-on provider would be responsible for providing information about their respective helper library and any other relevant reference documentation. It doesn't make sense to me to put a whole lot of effort into ECMAScript 5.1 docs since we know for sure it's going away, which is why I recommend just pointing to the JSR223 docs for it for now and then when it goes away move the JSR223 docs to the development section. It might make sense to not even reference ECMAScript 5.1 in these docs at all and instead jump straight to the JS Scripting for the examples in the generic docs. Right now Blockly renders to ECMAScript 5.1. When that goes away it will be modified to render to JS Scripting. At that time, JS Scripting will need to become something installed by default, similar to rrd4j so it wouldn't be inappropriate to reference it in the generic docs. Those are just my thoughts. I'm stretched pretty thin right now trying to finish the Getting Started Tutorial and adding features to the JS Scripting helper library so that when the time comes to move Blockly to it it won't be too hard to do, and add some nice features while I'm at it. That's my two cents worth at least. |
So for a first short response: Configuration is (at least currently) the proper area for the JSR223 Article. The paragraph above goes into the right direction for me. We should
Pointing and linking is also the only way for external libraries, as long as they don't integrate into any repository we have under our control. And we should stay with this workfow.
I perfectly understand and respect the thoughts behind this, but the honest questions we would have to ask are:
|
It seems to me that the current documentation at https://www.openhab.org/docs/ doesn't really explain that well, the wonderful options we have for automation and scripting.
The text was updated successfully, but these errors were encountered: