ICEfaces
  1. ICEfaces
  2. ICE-9502

Provide load only dependency configuration for resources

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 4.0.BETA, 4.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces
    • Assignee Priority:
      P1
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration

      Description

      Sometimes the dependency relationship between resources is not that strict, that is when there is no need to load all the transitive resources before. It is good enough to just load the resource after the resources defined in the metadata, if some are not loaded the dependant resource's code will adapt.
      For example:

      E depends on B
      C depends on B
      B depends on A

      D depends (load only) on E, C

      When only A and B is loaded, D is just ordered after these without forcing the loading of E and C.

        Issue Links

          Activity

          Hide
          Mircea Toma added a comment - - edited

          "load-after" tag was introduced in the resource-dependency.xml structure that can be used to define dependencies that require only ordering.

          Example:

          <resource name="E" library="...">
             <depends-on>
                <resource name="B" library="..."/>
             </depends-on>
          </resource>
          ...
          <resource name="D" library="...">
             <load-after>
                <resource name="C" library="..."/>
                <resource name="E" library="..."/>
             </load-after>
          </resource>
          
          Show
          Mircea Toma added a comment - - edited "load-after" tag was introduced in the resource-dependency.xml structure that can be used to define dependencies that require only ordering. Example: <resource name= "E" library= "..." > <depends-on> <resource name= "B" library= "..." /> </depends-on> </resource> ... <resource name= "D" library= "..." > <load-after> <resource name= "C" library= "..." /> <resource name= "E" library= "..." /> </load-after> </resource>
          Hide
          Mircea Toma added a comment -

          Implemented soft resource dependency feature.

          Show
          Mircea Toma added a comment - Implemented soft resource dependency feature.
          Hide
          Ken Fyten added a comment -

          I think it makes sense to keep the original "depends-on" element name for the original dependency-only (not loading) behaviour. This protects any existing applications from possible negative side-effects.

          Then we just document the new "load-after" element as a new improvement that also loads the resource in addition to declaring the ordering dependency.

          We can update our own resource-dependency.xml files readily to use the new feature as well.

          Show
          Ken Fyten added a comment - I think it makes sense to keep the original "depends-on" element name for the original dependency-only (not loading) behaviour. This protects any existing applications from possible negative side-effects. Then we just document the new "load-after" element as a new improvement that also loads the resource in addition to declaring the ordering dependency. We can update our own resource-dependency.xml files readily to use the new feature as well.
          Hide
          Mircea Toma added a comment - - edited

          depends-on element is used now for the original dependency-only (not loading) behaviour. requires is the (container) element that enforces the loading of listed dependencies before the specified resource is loaded.

          Show
          Mircea Toma added a comment - - edited depends-on element is used now for the original dependency-only (not loading) behaviour. requires is the (container) element that enforces the loading of listed dependencies before the specified resource is loaded.
          Hide
          Mircea Toma added a comment -

          Update docs.

          Show
          Mircea Toma added a comment - Update docs.
          Hide
          Mircea Toma added a comment -
          Show
          Mircea Toma added a comment - Updated the documentation at http://www.icesoft.org/wiki/display/ICE/Resource+dependencies .

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Mircea Toma
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: