Earlier, you created a Guestbook portlet prototype. Then you wrote a service.xml file to define your application’s data model, and used Service Builder to generate the back-end code (the model, service, and persistence layers). You also added service methods using the appropriate extension points: your entities’ *LocalServiceImpl classes. Now you must integrate the original prototype with the new back-end to create a fully functional application.

There are many differences between the prototype and the application you’ll create. In the back-end, you’ve already accounted for one big difference: users can create multiple Guestbooks that each have their own entries. In the front-end, however, only Site administrators should be able to create guestbooks. Therefore, you’ll create another portlet called Guestbook Admin and place it in the Content menu for Sites.

To turn this application from a prototype into a full-fledged Liferay web application, you’ll make these changes:

  • Modify your view layer’s folder structure to account for the administrative portlet
  • Set the Display Category so users can find the application more easily
  • Create a file to store the application’s text keys
  • Change the controller to call your new Service Builder-based back-end
  • Update the view so it can display multiple Guestbooks in tabs

Ready to begin?

Let’s Go!

Organizing Folders for Larger Applications

Refactoring the Prototype Step 1 of 6 In larger projects, it is important to have all of your files and modules well organized. You’ll make two changes to help better organize your project: Move...

Read More

Defining the Component Metadata Properties

Refactoring the Prototype Step 2 of 6 When users add applications to a page, they pick them from a list of display categories. Figure 1: Users choose applications from a list of display categories....

Read More

Creating Portlet Keys

Refactoring the Prototype Step 3 of 6 PortletKeys manage important things like the portlet name or other repeatable, commonly used variables in one place. This way, if you need to change the...

Read More

Integrating the New Back-end

Refactoring the Prototype Step 4 of 6 It’s a good practice to start with a working prototype as a proof of concept, but eventually that prototype must transform into a real application. Up to this...

Read More

Updating the View

Refactoring the Prototype Step 5 of 6 You updated more than just the mechanism behind creating entries: you completely changed the method and structure. You must, therefore, update the UI as well....

Read More

Fitting it All Together

Refactoring the Prototype Step 6 of 6 You’ve created a complete data-driven application from the back-end to the display. It’s a great time to review how everything connects together. The Entry...

Read More
+1 (1 Vote)
Implementing Service Methods Previous