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

Control Method Exposure #2

Open
bobgarner opened this issue Oct 13, 2021 · 0 comments
Open

Control Method Exposure #2

bobgarner opened this issue Oct 13, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bobgarner
Copy link
Member

The template engine does not explicitly try to control which objects or methods can be accessed by template code.

This has the advantage that there is less work to do when you want to expose a new class and its methods. However it also has a downside that you may not want to allow such access. As well, the exposed classes can get pretty full of methods and thus difficult to manage.

We should look into adding some kind of interface that these classes need to implement in order to be accessible by the template engine. The interface doesn't have to have any methods, the code that searches for a method would simply check if the object's class implements that interface.

Another idea would be to require a class to be extended and have the extended class implement that interface. The template engine would then have to cast objects to the extending class before looking for the method (not sure this would even work). This could get complicated fast.

If a viable way to solve this issue could be found it could help manage access to the internal objects.

@bobgarner bobgarner added the enhancement New feature or request label Oct 13, 2021
@bobgarner bobgarner self-assigned this Oct 13, 2021
@bobgarner bobgarner added this to the First Beta milestone Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant