Commons Jelly
  1. Commons Jelly
  2. JELLY-1

break variable storage away from the JellyContext

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.1-beta-1
    • Component/s: core / taglib.core
    • Labels:
      None

      Description

      Implement a simpler Scope interface to be used by JellyContext for variable storage and retrieval, to allow for arbitrary integrations for storage.

        Activity

        bob mcwhirter created issue -
        Hide
        james strachan added a comment -

        Some kinda of simple Scope interface of the form...

        public interface Scope

        { Object getVariable(String name); void setVariable(String name, Object); Scope getParent(); void getParent(Scope scope); }

        Then when running Jelly inside a Servlet we could have a RequestScope, SessionScope a shared ApplicationScope.

        Also we could have things like a SystemPropertiesScope, AntProjectScope etc.

        This should make it easier to adapt the variable scopes of Jelly to other variable scopes.

        Show
        james strachan added a comment - Some kinda of simple Scope interface of the form... public interface Scope { Object getVariable(String name); void setVariable(String name, Object); Scope getParent(); void getParent(Scope scope); } Then when running Jelly inside a Servlet we could have a RequestScope, SessionScope a shared ApplicationScope. Also we could have things like a SystemPropertiesScope, AntProjectScope etc. This should make it easier to adapt the variable scopes of Jelly to other variable scopes.
        Morgan Delagrange made changes -
        Field Original Value New Value
        Component/s core / taglib.core [ 10421 ]
        Environment
        Morgan Delagrange made changes -
        Fix Version/s 1.1-beta-1 [ 10228 ]
        Hide
        Hans Gilde added a comment -

        If we break variable storage into a Scope, then we can use push/pop on the scopes as it executes, just like a regular scripting language. Sounds good.

        Show
        Hans Gilde added a comment - If we break variable storage into a Scope, then we can use push/pop on the scopes as it executes, just like a regular scripting language. Sounds good.
        Hide
        Marc DeXeT added a comment -

        I agree with this feature. With this, we could also isolate script parts by scoping to avoid var name collisions.
        see also <http://www.mail-archive.com/commons-user@jakarta.apache.org/msg08751.html>

        Show
        Marc DeXeT added a comment - I agree with this feature. With this, we could also isolate script parts by scoping to avoid var name collisions. see also < http://www.mail-archive.com/commons-user@jakarta.apache.org/msg08751.html >
        Hide
        Marc DeXeT added a comment -

        What about this feature ?
        Needs for plug in scope strategy are here.
        It seems to me this feature is not a minor but rather major one

        Show
        Marc DeXeT added a comment - What about this feature ? Needs for plug in scope strategy are here. It seems to me this feature is not a minor but rather major one

          People

          • Assignee:
            james strachan
            Reporter:
            bob mcwhirter
          • Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development