Teamsite, JAVA and Groovy

Options
Just wanted to get your feedback.

We are in the process of migration from PERL to JAVA for our custom scripts and although CSSDK API is well designed, I still feel that there are certain things that PERL is designed to handle where JAVA falls short. Things are very verbose in Java.

So I think there is benefit to use Servlets and JSPs - I think some of the low level scripting can be done on Groovy instead of core Java.

I was wondering if anybody in this forum has given any thoughts to use CSSDK API in Groovy. Groovy is just suited nicely for scripting. Runs on JVM, can use all the CSSDK objects natively.

I'd really appreciate your thoughts!!!

Comments

  • Sounds like you're porting to Java just because someone asked you to do so. As much as I love PERL, it has a crapload of shortcomings in 'enterprise-grade applications'. Yes, it's amazing for string manipulation and quick scripting, but the whole point of Java is to have legible and maintainable code for years to come. The main benefits of going to Java, beyond the obvious performance increase of going through the CSSDK, are that you open the door to automated unit testing and quality control, not to mention a solid structure and more reusable code. If you're just going to port your .ipls to .jsps just by adjusting the syntax, you're introducing overhead without getting any benefits, so you'd just as well best stick with the perl you've got.

    That said, there's potentially room for Groovy on TS and I find the suggestion intriguing. I've built very large TS implementations on Java, but I always end up writing perl scripts for quick EA manipulation, admin-type things, and content migration. For those types of edge-cases, being able to use Groovy would be very cool. However, the message I'm trying to get across is that I would very much recommend against building the core of your implementation in Groovy.
  • Thanks for taking time in providing such a detailed explanation.

    I agree with you 100% - I've always found PERL as a write-only language ( I hope I'm not hurting people's sentiments over here)

    Because I'm a JAVA programmer at heart and it comes pretty naturally to me and agree to all the benefits that you described in your post. My thought process was can I have best of both the worlds - use the CSSDK API with Groovy - because I can pretty much do anything with Groovy that I can do with core Java and still not lose a heartbeat including unit tests with Junit.

    And I was wondering if anybody had given any thoughts of using Groovy on the Teamsite platform.

    While we are on the subject - I have another question, are all future enhancements to this platform will happen on the JAVA and not on PERL?

    Once again, appreciate your response!
  • And I was wondering if anybody had given any thoughts of using Groovy on the Teamsite platform.

    While we are on the subject - I have another question, are all future enhancements to this platform will happen on the JAVA and not on PERL?
    Should work in theory, but be aware that dependencies ASM and antlr are already included with TS, so you'll have to make sure that the versions of those JARs you add are compatible with what TS is using. That may limit the version of Groovy that you can use, or whether you can use it at all on your TS version.

    And yes, the TS PERL modules are deprecated (unofficially?) and they haven't budged since at least as far back as TSv6.5. All new APIs have been put into the CSSDK.
TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs