Skip to content
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

Use self-executing anonymous function in osgi.js #171

Merged
merged 1 commit into from
Jun 27, 2019

Conversation

5iver
Copy link
Member

@5iver 5iver commented Jun 26, 2019

@lewie, it didn't look necessary, but I added this because it looked like a nice design pattern to follow for the JS libraries. I've used this in metadata.js too. WDYT?

Signed-off-by: Scott Rushworth openhab@5iver.com

Signed-off-by: Scott Rushworth <openhab@5iver.com>
@5iver 5iver requested a review from lewie June 26, 2019 00:05
Copy link

@lewie lewie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I have indicated here, this design pattern is a very clean solution. Personally, I always prefer it.

In particular it is not mandatory, because every loaded rule file in openHAB is assigned its own scope by Java and can work independently.

But I support the idea to propose this design pattern as a uniform standard in the documentation. If the complexity increases in the future, the community solutions will be cleanly separated from each other!

The individual community solutions don't know anything about each other and could easily interfere with each other without it. From this point of view it becomes even more important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants