5 Replies Latest reply on Jun 30, 2010 4:02 AM by jbossvenkat

    Best Practices for developing a portal from scratch

      First of all, I am new to either eXo or JBoss Portal.  I have read the User Guide, Reference Guide, and pretty much all postings and articles in this forum; Unfortunately, I have not found an answer I am looking for so my hope is some GateIn Expert out here can help me.  I would like to leverage GateIn features to implement a brand new portal with my own logo, graphics, slogan, gadgets, and portlets.  Which one of the following option should I follow? and why? Please point me to an example if possible.

       

      Option 1: Download GateIn source code and jump right into the sources to make modifications that I need then package for deployment. 

       

      Option 2: Follow instructions in the Reference Guide and postings in this forum to implement an ext portal to override behaviors in GateIn ear (specifically portal.war)

       

      Option 3: Log into GateIn as administrator to create a new site.  Design a new site layout then populate a site with custom portlets for user registration, banner, footer, and a main portlet for my site.

       

      I know eventually someone is going to write a "GateIn in Action" or "The Definitive Guide to GateIn" and all 3 options are doable but each comes with its own pros and cons depending on a developer's skills in GateIn.  Could the experts on this forum guide me to the right path. 

       

      Your help is greatly appreciated.

       

       

        • 1. Re: Best Practices for developing a portal from scratch
          prabhat.jha

          You have answered your own question. You should proceed with option 3 and take a look at user guide. It should give you a very good feel of GateIn portal and then you can dive deep into writing your own portlets.

          • 2. Re: Best Practices for developing a portal from scratch

            Prabhat

             

            First of all, thank you for your answer.  I posted my question so that not only I but also other community members will benefit from reading this thread.  Even though I am a new comer to GateIn, I am not at all a stranger to Java, JEE, and portal world.  Let me share my view points on the pros and cons for each option.  First let me address option 3 which is what you recommended.

             

            Option 3: Use GateIn to create a new site with my own portal populate with my own portlets.

             

            Pros:

            1. Leverage out-of-the-box full feature sets of GateIn, specifically in the administrative portlets for managing skins, portlets, gadgets, themes, and user management (groups, permissions,etc...) .

            2. Leverage GateIn to create my new site's portal and its layout, theme, skin, permissions,

            3. Develope my custom portlets/gadgets to deploy onto JBoss application server then leverage GateIn Application Registry Portlet/Gadget to add my portlets/gadgets into GateIn Applicaiton Registry so that they can be available for usage inside my new site through GateIn's Application Registry

             

            Cons:

            1. It is most likely that I am going to have tp implement my own custom interface portlets unless there is a way to customize their existing GateIn Porlet via ext programming model. (Refer to the UserGuide for the differences between functional and interface portlet in GateIn)

            2. Regarding to functional portlets, at the very least I am going to need to provide my own user management-related portlet unless my changes are simple so that they can be done via an extension model which usually applies to portlet resources.

            3. The deployment of my new portal is an area where I have the most concern.  It is not a clean-cut process as deploying a new EAR file which contains everything about my new site onto JBoss.  Instead what I will be deploying are my custom portlets.  My main site's portal is instead created and managed by GateIn in this scenario.  I don't see an easy way to export my portal from GateIn in one environment to deploy it onto another environment as an EAR file.  In addition, GateIn contents are stored in the database using JCR standard, which is great but how do I easily migrate my new site's portal from one environment (DEV) to another (SQA)

            4. Let's talk about coninuous integration. I want to automate my whole deployment and execution of my test cases.  How would I acomplish this task when the task itself involves both JBoss and GateIn.  I can easily automate the process of running my test cases and deploying my own portlet to JBoss but what about deploying my new portal which was designed and managed through GateIn UI?

             

            I really don't want to proceed with option 1 which basically involves making changes directly in GateIn.  However, this option will solve my challenge with implementing a continuous integration process as stated in #3 and #4 above.  Regarding to option 2, the pros and cons will be similar to option 3.

             

            So let's recap.  I know I can use GateIn.  The question for me is how to use its development model efficiently.  I don't know if you have successfully gone through an eXo (now GateIn) implementation.  If you have, perhaps you can share your practical experiences.  If you are an eXo/JBoss developer, I appreciate your help knowing that you are developing codes and monitoring this forum at the same time.  I personally know what it is like to wear many hats.

             

            Your response is greatly appreciated.

            • 3. Re: Best Practices for developing a portal from scratch
              prabhat.jha

              Cons:

              1. It is most likely that I am going to have tp implement my own custom interface portlets unless there is a way to customize their existing GateIn Porlet via ext programming model. (Refer to the UserGuide for the differences between functional and interface portlet in GateIn)

              You would have to write your custom portlets in any case. No portal server provider will have portlets to match all your needs.

              2. Regarding to functional portlets, at the very least I am going to need to provide my own user management-related portlet unless my changes are simple so that they can be done via an extension model which usually applies to portlet resources.

              What's missing in current user management portlet? Of course if does not cover all use cases. If you have good ideas, please start a thread on that topic and let's see what community thinks about that.

              . The deployment of my new portal is an area where I have the most concern.  It is not a clean-cut process as deploying a new EAR file which contains everything about my new site onto JBoss.  Instead what I will be deploying are my custom portlets.  My main site's portal is instead created and managed by GateIn in this scenario.  I don't see an easy way to export my portal from GateIn in one environment to deploy it onto another environment as an EAR file.  In addition, GateIn contents are stored in the database using JCR standard, which is great but how do I easily migrate my new site's portal from one environment (DEV) to another (SQA)

              This needs a separate thread to discuss and we currently don't have everything to easily migrate from one environment to another. However I suggest you to look into gatein-sample-skin.war (extension for your own skin),  gatein-sample-extension.ear and gatein-sample-portal.ear for portal extensions.

               

              4. Let's talk about coninuous integration. I want to automate my whole deployment and execution of my test cases.  How would I acomplish this task when the task itself involves both JBoss and GateIn.  I can easily automate the process of running my test cases and deploying my own portlet to JBoss but what about deploying my new portal which was designed and managed through GateIn UI?

               

              We do this on our side too. We have selenium cases that do everything you have mentioned..starting from importing portlets using application registry to creating brand new portal. Take a look at http://hudson.jboss.org/hudson/view/GateIn/job/gatein_portal_ui_selenium_tests_jboss5/ You can use other UI testing frameworks as well.

              • 4. Re: Best Practices for developing a portal from scratch

                Thanks for your response

                 

                <Prabhat>  You would have to write your custom portlets in any case. No portal server provider will have portlets to match all your needs.

                <Prabhat> What's missing in current user management portlet? Of course if does not cover all use cases. If you have good ideas, please start a thread on that topic and let's see what community thinks about that.

                 

                <Vu> Agreed that custom portlets are already needed.  However, the GateIn portlets are very close to provide the most common attributes and all we need are either documnentation/samples/tutorials (I know there is no time) to show how to extend them.  I am not talking about using new skin, or resouces. Simple addition of properties can be done through the UI but more complex modifications such as adding a new set of forms to persist a new set of properties during registration to another data source.

                 

                <Prabhat> This needs a separate thread to discuss and we currently don't have everything to easily migrate from one environment to another. However I suggest you to look into gatein-sample-skin.war (extension for your own skin),  gatein-sample-extension.ear and gatein-sample-portal.ear for portal extensions.

                 

                I will start a thread

                 

                <Prabhad> We do this on our side too. We have selenium cases that do everything you have mentioned..starting from importing portlets using application registry to creating brand new portal. Take a look at http://hudson.jboss.org/hudson/view/GateIn/job/gatein_portal_ui_selenium_tests_jboss5/ You can use other UI testing frameworks as well.

                 

                I know about Hudson.  In fact, we have been using it for years in our projects; However, I have not looked into using it with GateIn.  I am going to research on how to import portlets using GateIn application Registry and how to create breand new portal.  Perhaps there is a plug-in somewhere that I need to look for.  If you know of a write-up, please point me to the right direction.

                 

                Thanks again.

                • 5. Re: Best Practices for developing a portal from scratch
                  jbossvenkat

                  Hi All

                   

                  Could anyone let me know as how to change the new portal having my own logo css and starts with jboss gate in portal.