Skip to content

Control Method Exposure #2

@bobgarner

Description

@bobgarner

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions