Difference Between GenericPortlet and MVCPortlet
GenericPorlet is part of jsr286 this means that if your portlet extends from this class and does not use any liferay specific code, your portlet will be portable across portlet containers. MvcPortlet extends from GenericPortlet and adds to it several convenience methods. You use it at the cost of being tied to liferay. Personay i would use neither in non trivial scenarios and instead would use a framework like spring mvc.
The GenericPortlet class provides a default implementation for the Portlet interface.
It provides an abstract class to be subclassed to create portlets. A subclass of GenericPortlet should either use one of the following annotations:
@ProcessAction
@ProcessEvent
@RenderMode
or override at least one method, usually one of the following:
processAction, to handle action requests.
Portlets typically run on multithreaded servers, so please note that a portlet must handle concurrent requests and be careful to synchronize access to shared resources. Shared resources include in-memory data such as instance or class variables and external objects such as files, database connections, and network connections.
No comments:
Post a Comment