8 Replies Latest reply on Jul 7, 2006 6:01 AM by maxandersen

    Standardization on runtime dependencies in JBossIDE

      Hey guys...

      In our team meeting today we started discussion on how we can standardize the distribution and user experience surrounding our runtime dependencies within the IDE. So far we've had some pretty good ideas, and we're starting this forum to get more feedback and bring closure to the issue of distribution. Here are our current ideas:

      1) Make a standard "JBoss (JEMS?)" runtime wizard that is accesible through the "Libraries" wizard page in a Java projects build path. This standard wizard would provide extension points that all of our runtimes could register with. The wizard will allow the user to either setup the runtime as an external dependency (AKA classpath container) OR import/copy those libraries into a user specified directory within their project.

      2) Try to distribute "interface" JARs where it makes sense.. mostly for the EJB3 plugin right now. Also put pressure on our runtime developers to provide us with lightweight interfaces so runtime distribution is left to a minimum. (Only HibernateTools and AOP actually need the runtime to work ATM)

      3) We left off on distribution. We basically have 3 different methods of obtaining a runtime currently:
      1. Put runtime jars in CVS/SVN
      2. Download/copy runtime jars from repository.jboss.com into plugin
      3. Let user download/register their runtime after installation

      #3 should probably be left for "runnable" runtimes i.e. JBossAS and the jBPM Server. I suggest we keep with #1 for plugins that need to distribute runtime w/ the plugin, but this is definately still up for discussion.

        • 1. Re: Standardization on runtime dependencies in JBossIDE

          Also one thing I forgot to add..

          Max had previously mentioned that this standardization could also be added through the use of WTP facets (project natures++). Thoughts?

          • 2. Re: Standardization on runtime dependencies in JBossIDE
            maxandersen

             

            "mculpepper@jboss.com" wrote:

            1) Make a standard "JBoss (JEMS?)" runtime wizard that is accesible through the "Libraries" wizard page in a Java projects build path.



            AFAIK there is no extension point for this page - do you know the name of it or ?


            ...would provide extension points that all of our runtimes could register with. The wizard will allow the user to either setup the runtime as an external dependency (AKA classpath container) OR import/copy those libraries into a user specified directory within their project.


            Sounds like some code/logic that should be shared/delegatable to a WTP facets implementation.


            2) Try to distribute "interface" JARs where it makes sense.. mostly for the EJB3 plugin right now. Also put pressure on our runtime developers to provide us with lightweight interfaces so runtime distribution is left to a minimum. (Only HibernateTools and AOP actually need the runtime to work ATM)


            I do not understand what this point is about ?
            How can we live with just "interface" JAR's when it is something the users projects need to run against ? (either we distribute or not ;)


            3) We left off on distribution. We basically have 3 different methods of obtaining a runtime currently:
            1. Put runtime jars in CVS/SVN
            2. Download/copy runtime jars from repository.jboss.com into plugin
            3. Let user download/register their runtime after installation


            I have a distinct feeling that you have a different concept of runtime than me ;)

            For me "runtime" libraries is *only* about which libraries *users* need for their projects.

            #3 sounds more like a mix on how we get libraries for the JBossIDE plugins into the build and how users can select something else ?


            #3 should probably be left for "runnable" runtimes i.e. JBossAS and the jBPM Server. I suggest we keep with #1 for plugins that need to distribute runtime w/ the plugin, but this is definately still up for discussion.


            Again, I would like us to be distinct on what kind of libraries we are talking about ;)

            Let me start with classifying:

            JBossIDEPlugin runtime-libs:
            Any library that a plugin needs to actually *run* its javacode. This includes everything from eclipse libraries to JEMS library dependencies (if they have any)

            runtime-libs:
            any library that the users need to run "something". e.g. hibernate3.jar to run Hibernate applications, jbpm.jar to run JBPM apps.

            some runtime-libs might also be needed in JBossIDEPlugin runtime-libs but they are *very* different since the plugin can e.g. be using version 2.2.1.GA where as the user want to use 3.2.4.GA.

            That means that whatever the plugin is including should not be exposed "towards" the user IMO. They should be physically seperate.

            p.s. i'm still on vacation, so don't expect instant reply on any followups

            • 3. Re: Standardization on runtime dependencies in JBossIDE
              koen.aers

              Max,

              There is another category of 'runtime' libs IMO. Namely the libs that a user needs to *develop* his application that later will be run against a 'runtime'.

              e.g. A user wants to develop a pure servlet application. The library he needs in his project is only the servlet-api.jar. If he wants to run his application, he needs all the Tomcat jars.

              What we were talking about during this meeting is that it would be good to minimize the amount of jars included (either by a classpath container or by copying them locally) in the project. It would be good to only have a 'lightweight interface' jar that includes the api classes and not the implementation details of the used technology.

              As for the Facet stuff, is there any easy example or pointer you can provide that can shed some light on this solution?

              Regards,
              Koen

              • 4. Re: Standardization on runtime dependencies in JBossIDE
                maxandersen


                For me api.jar's is part of runtime-libs.

                In what situations do we have a situation where it is not clear if you want to devel against api's or impl's ? (it might be obvious but i can't think of anyone right now ;)

                i'll try and dig out the facet stuff when i get back - but i've send all I've stumbled upon to the dev-ide list at "some point in time" :)

                • 5. Re: Standardization on runtime dependencies in JBossIDE
                  koen.aers

                  The obvious case where you want to develop against api and not against impl's is for all of the jee standard stuff... You don't need all of the JBoss runtime classes in the classpath of your project in order to develop a jee app.
                  Also, if you develop a pure jee app using the api jars, it should be fairly easy to port them between JBoss 4.0.x versions. This is (at this point) not possible easily with e.g. jBPM in the first part because of the non-existence of a jBPM-api.jar.

                  • 6. Re: Standardization on runtime dependencies in JBossIDE
                    maxandersen

                    All of those situations is *clear* for me (except the jbpm.jar) ;)

                    When do you not need to run against the jbpm.jar in e.g. your unittests ?

                    What i'm trying to say is that for me there still are only two kind of libs in this discussion: libs for the IDE and libs for the users development/runtime.

                    The last part is of course not just one big bundle of jars, but very much dependent on what kind/"facet" of development the user is doing - this is where Facet's become usefull since you here can define different "configurations" or simply just "facets".

                    • 7. Re: Standardization on runtime dependencies in JBossIDE
                      maxandersen


                      Facet tutorial with code and slides:
                      http://www.eclipsecon.org/2006/Sub.do?id=241

                      And here is a snippet from Konstantin (the guy behind the facets) on how to enable facets for non-WTP projects.

                      There exists an api for converting an existing project into a faceted
                      project. That api is...

                      import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
                      import org.eclipse.wst.common.project.facet.core.IFacetedProject;

                      final IFacetedProject fpj
                      = ProjectFacetsManager.create( , true, <IProgressMonitor )

                      That will make the project "facet-enabled", but will not install any
                      facets, set any facets as fixed, or associate the project with a
                      runtime.

                      To then install a java facet, you can do this:

                      import org.eclipse.jst.common.project.facet.JavaFacetUtils;

                      fpj.installProjectFacet( JavaFacetUtils.JAVA_50, null,
                      )

                      Adjust appropriately depending on which version of the java facet you
                      want.

                      Converting an existing project into a faceted project and auto-detecting
                      which facets should be install is not a typical WTP usecase, so we have
                      no neat api for doing all of this or the associated ui. Thus, if you
                      roll out this functionality, you would not be duplicating anything.
                      Depending on how generic you make it, it may be appropriate to push it
                      down into WTP.

                      Hope that answers your questions. Let me know if you have any other.

                      Thanks,

                      - Konstantin

                      • 8. Re: Standardization on runtime dependencies in JBossIDE
                        maxandersen

                        note that i'm not 100% sure facet is the answer to everything, but it at least is a good way to integrate into the built-in "configurability" of WTP