The Learning Curve, Chapter 6 - Java Web Development

Are you new to Liferay? Found Liferay and want to know what it can do for you? Or are you with Liferay and still remember the time when you were new and unexperienced? Where did you come from and what was the biggest problem you faced? Can you ever learn enough? And how do you keep up with the current trends and new features?

A platform as big as Liferay spans several technologies and areas of best practices that are beneficial to know of. Nobody can know everything - there's always a learning curve. At the beginning, it's quite steep. Some argue that it's flattening the more you know. Some argue that it gets steeper: The more you know, the more you know what you don't know.

I'd like to give you pointers to resources that are available to you, in order to learn about Liferay, resources that help you avoid steep detours, when there are flatter direct connections. This is meant to be (eventually) comprehensive but I'm sure that it will never be complete. It's just what I remember while I write this article and the follow ups (yes, there are more, already drafted)

Today's Target Audience: Developers, new to Liferay

Java Web Technology

You new Developers will have to know some things about the internals of an Application server. Don't worry, not the implementation, but the Servlet Specification (which assumes that you know Java). In a Java Application, you typically deal with a lot of different classloaders - no difference in Liferay, although this is mostly abstracted away. In some random cases it's coming back at you though.

Where to learn about the Servlet Specification? The spec is going back quite far - it's been updated a few times, but I can't even remember how I learnt it back when I did. I'm relying on suggestions in this article's comments on what resources to recommend (and why). I know there are trainings offered, you can even get certified. IMHO nothing beats experience. So even after you've read a book or been in training: You want to get your hands dirty and actually use that knowledge in practice. (and while you're at it, it's probably good to learn the basics of JSPs). After all, a typical plugin to Liferay starts as nothing else but yet another web application on the same server.

Having some experience in Java and Java Web Development is the precondition to take Liferay Developer Training 1, where we help you map that knowledge onto the portal world. From a comparison of portlets to servlets, JSR-286, through an introduction of service builder and the Liferay API and into extending Liferay through Themes, Layout Templates, Hooks and Ext plugins, you'll have some time to learn the basics of everything - hands on - and can ask your questions to an experienced trainer. Check the schedule for the next available public trainings in your area.

This training also covers most of what's required for becoming a Liferay 6.2 Certified Professional Developer. Add some experience and routine and the certification should be a breeze.

Choosing and learning Frameworks

Did I really just mandate knowledge of servlets? Well, knowing them really makes it easy to transfer the existing knowledge to portlets. But do you want to develop application logic in servlets, or in portlets that are nothing more than the Portlet-Spec implementation? Most likely not.

There's a lot of frameworks for you to choose - but even then: To debug your code and understand application classloader problems, experience with raw servlets sometimes brings you a long way solving problems, or just understanding answers that you get on random places on the internet.


CC BY 3.0 (by Oliver Widder, geek&poke)

Liferay does not mandate any UI technology or framework for you to use. You should pick one of the existing frameworks - they're all good and have different pros and cons. Liferay Portlet MVC? JSF? Vaadin? Spring (portlet) MVC? All fine. Any that I've not named here? Probably also fine - there are too many frameworks to name them here and compare them in a single blog post.

If you're looking at Liferay's implementation, you'll find plenty of JSPs as well as Liferay's MVC portlet and some use of Struts. This, however, does not imply anything for your own applications and portlets - if you're embarrassed to see Struts in use: Don't worry - there's not a lot of it and you don't get in contact with unless you specifically customize existing functionality implemented in struts. Liferay is agnostic to the framework you use in your extensions and plugins. Choose whatever you're most familiar with. If you're not familiar with one framework: Check back with your team. Or just pick one. SRSLY - it's your choice.

More?

Planned for next chapters:

  • Training
  • The search engine of your least distrust
  • Asking questions on the community forums and other platforms.

For more "Learning Curve" tips, check the previous chapters (listed below, under "Related")