4 Replies Latest reply on Apr 2, 2004 7:26 AM by Viet

    Display options: Templates / XSLT / JSP

    joe hobson Newbie

      So i'm just digging in to develop a module to use on Nukes. I'm sure some out there will agree with me that it's so completely clear where to begin. Since there's a module in there called "Template", i duped the code from that one and made it my own. Not sure if this is what was intended, but it worked. So now i understand a little more that there are multiple ways to handle the HTML code in Nukes development. These are what i see so far...

      Templates : a template file is used to include HTML with variable placeholders that the Java code refers to. In the end it's all packed into the sar when you build.

      JSP : sounds like a good amount of work is now going into having Nukes make use of jsp files. I've played with Tomcat5 and really liked its features, but not sure i'd attempt jsp under Tomcat4. Of course JBoss will be going to Tomcat5 soon.

      Embed : not the best way, but many modules do it this way, simply embedding HTML code in java code.

      XSLT : okay, i know i should already be familiar with this one, but like most out there, i just haven't had the time. As far as i understand and xslt stylesheet is used to transform XML data into an HTML page.


      Okay, now does anyone want to let me know which one is preferrable to Nukes and why? speed and/or caching issues? HTML developer access?

      quite curious... .joe


        • 1. Re: Display options: Templates / XSLT / JSP
          Sherman Wood Apprentice


          Given JBoss Nukes' heritage of leveraging the success of PHPNukes, there is a benefit to reusing templates from PHPNukes to redevelop modules for JBoss Nukes - a look & feel + functionality that has been tested.

          IMHO, for non-PHPNukes modules, simple modules will probably use inline HTML, while more complicated ones will use JSP or Velocity => Struts (?), in order to be close to J2EE land.


          Sherman

          • 2. Re: Display options: Templates / XSLT / JSP
            joe hobson Newbie

            Thanks for response to this one. Maybe I made it look too much like a statement and not enough like a question. For those newbies (like me) that go thru the forums looking for the answer to this question, please keep in mind that my statements above ARE NOT the answer, merely what i was trying to guess at after some looking around.

            "sgwood" wrote:

            Given JBoss Nukes' heritage of leveraging the success of PHPNukes, there is a benefit to reusing templates from PHPNukes to redevelop modules for JBoss Nukes...


            I'm all for doing it that way, though i haven't yet seen great documentation on the templates, the module that is included with the distribution does a good job of giving you an example to work from. Since templates came from PHPNukes i think i might turn there next for some sort of docs on how templates can be used.

            "sgwood" wrote:

            IMHO, for non-PHPNukes modules, simple modules will probably use inline HTML, while more complicated ones will use JSP or Velocity => Struts (?), in order to be close to J2EE land.


            I'd love to use JSP, i'm just not sure how to go about that. I remember seeing a few topics in the forums discussing some hurdles they were trying to overcome in the JSP integration. Maybe i'll give that another look before i decide on using templates.

            thanks for your help. More comments and insights are definitely welcome... .joe


            • 3. Re: Display options: Templates / XSLT / JSP
              Sherman Wood Apprentice


              The JSP integration is little bit difficult at the moment. The aim is to have module specific JSPs be in a WAR in a module EAR, but we are not there yet. Julien is working in this area.

              I am using JSPs right now, but I deploy them by putting them in an exploded nukes.ear/nukes.war.


              Sherman

              • 4. Re: Display options: Templates / XSLT / JSP
                Viet Master

                jsp support will come with the portlets stuff for the 2.0 version.