Sling
  1. Sling
  2. SLING-990

Prototype for a Sling Explorer implementation based on GWT

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Extensions
    • Labels:
      None

      Description

      Following the Sling Explorer proposal [1], I have started an implementation with the SwartGwt UI framework [2] (based on GWT and under LGPL licence).
      Not sure but I think that LGPL is compatible with the Apache project.

      Until now, it is just a prototype. Can you review the code and see if this Gwt application is well integrated with Sling ?

      [1] http://cwiki.apache.org/SLING/sling-based-jcr-explorer.html
      [2] http://code.google.com/p/smartgwt/

      1. Sling Explorer.zip
        7.97 MB
        Christophe Lombart
      2. sling-explorer-only-gwt.zip
        347 kB
        Christophe Lombart
      3. slingexplorer.tiff
        117 kB
        Christophe Lombart

        Activity

        Hide
        Christophe Lombart added a comment -

        Here is the code. The README file contains information on useful maven command & GWT setting.

        Show
        Christophe Lombart added a comment - Here is the code. The README file contains information on useful maven command & GWT setting.
        Hide
        Felix Meschberger added a comment -

        > Not sure but I think that LGPL is compatible with the Apache project.

        Unfortunately not. Apache projects are not allowed to distribute artifacts including artifacts licensed under any GPL or LGPL license.

        Show
        Felix Meschberger added a comment - > Not sure but I think that LGPL is compatible with the Apache project. Unfortunately not. Apache projects are not allowed to distribute artifacts including artifacts licensed under any GPL or LGPL license.
        Hide
        Felix Meschberger added a comment -

        I did not run the code, I just looked at the contents of the package. This lookes very interesting but misses a few things:

        • We need the LICENSE and NOTICE file (and the DISCLAIMER, but this we can add on SVN commit)
        • What is the licencse (and source) of the images and CSS files included ? These might have to be
          attributed in the NOTICE file and not be (L)GPL-ed. Also a LICENSE file would be required for
          them unless they are ASL licensed.

        In tree-node.json.esp you do :

        if (childNode == null)

        { name += child.path; }

        else

        { name += childNode.name; //name = child.path; }

        To get the label of the resource. You might use ResourceUtil.getName(resource) here, which does the same and does not rely on the resource being a node.

        children.json.esp seems to be JCR-based: How about using the Sling Resource abstractions here : listing children using ResourceResolver.listChildren and getting the propreties with Resource.adaptTo(ValueMap.class) ?

        Show
        Felix Meschberger added a comment - I did not run the code, I just looked at the contents of the package. This lookes very interesting but misses a few things: We need the LICENSE and NOTICE file (and the DISCLAIMER, but this we can add on SVN commit) What is the licencse (and source) of the images and CSS files included ? These might have to be attributed in the NOTICE file and not be (L)GPL-ed. Also a LICENSE file would be required for them unless they are ASL licensed. In tree-node.json.esp you do : if (childNode == null) { name += child.path; } else { name += childNode.name; //name = child.path; } To get the label of the resource. You might use ResourceUtil.getName(resource) here, which does the same and does not rely on the resource being a node. children.json.esp seems to be JCR-based: How about using the Sling Resource abstractions here : listing children using ResourceResolver.listChildren and getting the propreties with Resource.adaptTo(ValueMap.class) ?
        Hide
        Christophe Lombart added a comment -

        I will modify the JSON scripts.

        Ok for LICENSE, NOTICE & DISCLAIMER. I will add them if we can resolve the license issue.

        The resources (images, css & js) are under LGPL. I took those files from Smart GWT 1.1 distribution. Maybe we can use others.

        If LGPL is an issue, we cannot continue to use SmartGwt because the current implementention requires 2 SmartGWT jars (see the pom.xml). Those jars are also under LGPL. There are used to run the application in the hosted mode and compile de java code into js.

        Show
        Christophe Lombart added a comment - I will modify the JSON scripts. Ok for LICENSE, NOTICE & DISCLAIMER. I will add them if we can resolve the license issue. The resources (images, css & js) are under LGPL. I took those files from Smart GWT 1.1 distribution. Maybe we can use others. If LGPL is an issue, we cannot continue to use SmartGwt because the current implementention requires 2 SmartGWT jars (see the pom.xml). Those jars are also under LGPL. There are used to run the application in the hosted mode and compile de java code into js.
        Hide
        Felix Meschberger added a comment -

        > I will modify the JSON scripts.

        Cool, so we get a Resource tree explorer !

        > The resources (images, css & js) are under LGPL. I took those files from Smart GWT 1.1 distribution. Maybe we can use others.

        Could these be extracted from the artifact downloaded from the maven repository on build time ? So that we don't have to store this in our SVN.

        > If LGPL is an issue, we cannot continue to use SmartGwt because the current implementention requires 2 SmartGWT jars
        > (see the pom.xml). Those jars are also under LGPL. There are used to run the application in the hosted mode and compile
        > de java code into js.

        Would it be a big problem to not be able to use SmartGWT ?

        Show
        Felix Meschberger added a comment - > I will modify the JSON scripts. Cool, so we get a Resource tree explorer ! > The resources (images, css & js) are under LGPL. I took those files from Smart GWT 1.1 distribution. Maybe we can use others. Could these be extracted from the artifact downloaded from the maven repository on build time ? So that we don't have to store this in our SVN. > If LGPL is an issue, we cannot continue to use SmartGwt because the current implementention requires 2 SmartGWT jars > (see the pom.xml). Those jars are also under LGPL. There are used to run the application in the hosted mode and compile > de java code into js. Would it be a big problem to not be able to use SmartGWT ?
        Hide
        Bertrand Delacretaz added a comment -

        > Would it be a big problem to not be able to use SmartGWT ?

        Or would you be able to convince the SmartGWT folks to change their license or to use a dual license?

        Show
        Bertrand Delacretaz added a comment - > Would it be a big problem to not be able to use SmartGWT ? Or would you be able to convince the SmartGWT folks to change their license or to use a dual license?
        Hide
        Christophe Lombart added a comment -

        SmartGwt provides more advanced widgets. That's the main reason why I started the explorer with it.
        We can use GWT but it will take more time to provide a nice UI.

        SmartGWT is already based on a dual license (LGPL & commercial).

        I can refactor the project to use only GWT

        Show
        Christophe Lombart added a comment - SmartGwt provides more advanced widgets. That's the main reason why I started the explorer with it. We can use GWT but it will take more time to provide a nice UI. SmartGWT is already based on a dual license (LGPL & commercial). I can refactor the project to use only GWT
        Hide
        Bertrand Delacretaz added a comment -

        I had a quick look and this looks good.

        To build it, I had to set the maven-sling-plugin <version> to 2.0.4-incubator in pom.xml

        Also, I think the URL used to access the explorer ( /explorer/index.html ) is not mentioned in the README.

        Is it correct that this version is read-only? That's not a problem, I'm just not sure if I haven't found how to edit stuff

        Show
        Bertrand Delacretaz added a comment - I had a quick look and this looks good. To build it, I had to set the maven-sling-plugin <version> to 2.0.4-incubator in pom.xml Also, I think the URL used to access the explorer ( /explorer/index.html ) is not mentioned in the README. Is it correct that this version is read-only? That's not a problem, I'm just not sure if I haven't found how to edit stuff
        Hide
        Christophe Lombart added a comment -

        Thanks for your comments.

        Yes, it is just a prototype and it is read-only
        I would like to get more comments before adding more features.

        What's the conclusion for SmartGwt ? I can make a try with SmartGwt folks to see if it is not possible to change their license. Or maybe you ? because you have more ASF/open source experience. Your arguments will be certainly better

        Show
        Christophe Lombart added a comment - Thanks for your comments. Yes, it is just a prototype and it is read-only I would like to get more comments before adding more features. What's the conclusion for SmartGwt ? I can make a try with SmartGwt folks to see if it is not possible to change their license. Or maybe you ? because you have more ASF/open source experience. Your arguments will be certainly better
        Hide
        Juan Jose Vazquez Delgado added a comment -

        Congrats Christophe, looks good!.

        Regarding SmartGwt, I´d prefer to keep more simple with just GWT .

        Show
        Juan Jose Vazquez Delgado added a comment - Congrats Christophe, looks good!. Regarding SmartGwt, I´d prefer to keep more simple with just GWT .
        Hide
        Christophe Lombart added a comment -

        Another version of the prototype :

        • Still in read only and contains some bugs.
        • I'm using only the GWT dependencies. Now, this application is compliant with the ASF license.
        • Add files mentionned by Felix.
        • Review the scripts following Felix's suggestions (thanks ).
        • The current implementation has some CSS issues (with IE). Looking for someone who can help.
        • You can read the README.TXT to get more information on the mvn commands used in this project.
        • Not yet based on plugins to render resource information.

        Let me know what do you think about that.

        Show
        Christophe Lombart added a comment - Another version of the prototype : Still in read only and contains some bugs. I'm using only the GWT dependencies. Now, this application is compliant with the ASF license. Add files mentionned by Felix. Review the scripts following Felix's suggestions (thanks ). The current implementation has some CSS issues (with IE). Looking for someone who can help. You can read the README.TXT to get more information on the mvn commands used in this project. Not yet based on plugins to render resource information. Let me know what do you think about that.
        Hide
        Juan Jose Vazquez Delgado added a comment -

        Just a point. I had to do this:

        <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.0.0</version>
        <extensions>true</extensions>
        <configuration>
        <instructions>
        <Export-Package>!*</Export-Package>
        <Private-Package>!*</Private-Package>
        <Include-Resource>
        SLING-INF=src/main/resources/SLING-INF
        </Include-Resource>
        <Sling-Initial-Content>
        SLING-INF/content/apps/explorer;overwrite:=true;uninstall=true;path:=/apps/explorer,
        SLING-INF/content/apps/sling/servlet/default/explorer;overwrite:=true;uninstall=true;path:=/apps/sling/servlet/default/explorer
        </Sling-Initial-Content>
        </instructions>
        </configuration>
        </plugin>

        in order to have a clean bundle without references which are not needed.

        IMHO, this stuff should be in contrib, maybe with a 0.9.0-SNAPSHOT version tag. WDYT?.

        Show
        Juan Jose Vazquez Delgado added a comment - Just a point. I had to do this: <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.0.0</version> <extensions>true</extensions> <configuration> <instructions> <Export-Package>!*</Export-Package> <Private-Package>!*</Private-Package> <Include-Resource> SLING-INF=src/main/resources/SLING-INF </Include-Resource> <Sling-Initial-Content> SLING-INF/content/apps/explorer;overwrite:=true;uninstall=true;path:=/apps/explorer, SLING-INF/content/apps/sling/servlet/default/explorer;overwrite:=true;uninstall=true;path:=/apps/sling/servlet/default/explorer </Sling-Initial-Content> </instructions> </configuration> </plugin> in order to have a clean bundle without references which are not needed. IMHO, this stuff should be in contrib, maybe with a 0.9.0-SNAPSHOT version tag. WDYT?.
        Hide
        Christophe Lombart added a comment -

        Does everyone agree to commit this application into the contrib/extension/gwt/sling-explorer folder ?

        Show
        Christophe Lombart added a comment - Does everyone agree to commit this application into the contrib/extension/gwt/sling-explorer folder ?
        Hide
        Juan Jose Vazquez Delgado added a comment -

        Why not in contrib/explorer directly?. I don´t find it necessary to emphasize the technology is being used.

        Show
        Juan Jose Vazquez Delgado added a comment - Why not in contrib/explorer directly?. I don´t find it necessary to emphasize the technology is being used.
        Hide
        Christophe Lombart added a comment -

        That's ok for me. Can we commit now or maybe others want to review the code ?

        Show
        Christophe Lombart added a comment - That's ok for me. Can we commit now or maybe others want to review the code ?
        Hide
        Bertrand Delacretaz added a comment -

        I would prefer contrib/explorers/gwt, to leave room for other explorers (SLING-993 for example).

        Apart from that, I'm ok for you to commit this!

        Show
        Bertrand Delacretaz added a comment - I would prefer contrib/explorers/gwt, to leave room for other explorers ( SLING-993 for example). Apart from that, I'm ok for you to commit this!
        Hide
        Mike Müller added a comment -

        Is there any issue why the explorer isn't committed yet? I think Sling just needs an explorer and if the code is committed maybe some others will take it further (same applies to SLING-993).

        Show
        Mike Müller added a comment - Is there any issue why the explorer isn't committed yet? I think Sling just needs an explorer and if the code is committed maybe some others will take it further (same applies to SLING-993 ).
        Hide
        Christophe Lombart added a comment -

        I was on vacation but now I can continue to work on this explorer.
        I will commit on contrib/explorers/gwt (probably monday). Ok for everyobdy ?

        Show
        Christophe Lombart added a comment - I was on vacation but now I can continue to work on this explorer. I will commit on contrib/explorers/gwt (probably monday). Ok for everyobdy ?
        Hide
        Christophe Lombart added a comment -

        I have committed this proto. Let me know if something is wrong.
        I'm going to continue to work on it.

        Show
        Christophe Lombart added a comment - I have committed this proto. Let me know if something is wrong. I'm going to continue to work on it.

          People

          • Assignee:
            Unassigned
            Reporter:
            Christophe Lombart
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development