Rich Sezov, author of Liferay in Action, presents many features of Liferay 6 by creating an “insult creation” application based on his high school experiences (with a mullet wig on…oh, the 80’s). Liferay’s Service Builder is used to manage persisted data. Here’s how:
- Define your entities in one file (service.xml) to create a remote or local service that will have the primary key and attributes. You can also define queries in this file.
- When complete, run ant build-service to create all the generated code.
- You can continue making customizations to certain source files that extended the generated code.
- Create DAOs to interact with Service Builder
- You can add a portlet to your Liferay instance control panel.
- MVCPortlet can be used to implement MVC inside of Liferay. Create a portlet action to call the function and then set the render parameter to show a different JSP when done.
- To pretty things up, you can use Alloy UI.
- For validation, you can use Liferay’s validator.
Some other features include internationalization, data traversal, and authorization. SearchContainer allows you to iterate through data. You can use PermissionChecker to set-up authorization to the different components on your pages based on the available roles you set-up inside of Liferay.