Overview of the Content Development Process
h5. Background Information The SAP Enterprise Portal is a web interface for SAP NetWeaver and non-SAP content delivered seamlessly. From the user’s perspective, its an extremely convenient way to get to all kinds of applications and data in one easy to use and consistent format via a web browser. The technology allows content from anywhere, using a Single Sign-On to be customized for the ultimate user experience. From the developer’s perspective, the opportunities are endless. A developer can use this platform to incorporate data from various sources – SAP, databases, the web, Microsoft Outlook and IBM Lotus Notes, for example into a Portal page. h5. What is content and how can it be developed? Portal Content consists of Applications that run in the Portal Runtime (Java) or the Web Dynpro Runtime. I will cover the details of Web Dynpro applications in another blog entry. Applications can also be created using the Business Server Pages (within the R/3 system using ABAP and HTML) and .Net. I will also explore these in another blog entry. h5. What is a Java Applications in the Portal Java applications in the Portal are basically made up of either Components or Services or both. One or more Portal Components can be used to display HTML in an iView – which is a basic building block of Portal applications. A component typically extends a class called AbstractPortalComponent – which is part of the Portal Runtime API: com.sapportals.portal.prt.component.AbstractPortalComponent A Portal Service provides functionality that can be used by a portal component or another service. A service typically implements the IService interface – which is also part of the PRT API: com.sapportals.portal.prt.service.IService h5. The Structure of a Java Application Portal applications are stored in PAR files (which are just zipped files with a .par extension). A PAR file contains web resources, Java classes and a deployment descriptor called portalapp.xml. As a developer, you’ll get used to ensuring that your applications have the following general folder hierarchy: This is the file structure of a typical Portal Application The portalapp.xml file above (known as the deployment descriptor) is probably the most important part of the PAR file. Even if a component or service is provided with the PAR file, if its not in the portalapp.xml file, its as if it does not exist. Therefore, I suggest that you use the NetWeaver Developer Studio (NDS) software to develop your Java applications as this software creates the appropriate deployment descriptor for you automagically. h5. The Deployment Descriptor h5. Creating Java Portal Content, Step by Step Overview: * Create a Portal Application Project in NDS: * 1. 2. File > New > Other… > Portal Application > Create a Portal Application Project 3. 4. Click Next and type a name for the project and click Finish 5. * Create a Portal Application Object – for this step one of the following items can be created, depending on the need: * 1. 2. Portal Component 3. 4. Portal Service 5. 6. Portal Web Service 7. * Once the Portal Objects have been developed, the project is ready to be deployed either directly from NDS or uploaded into the portal manually. * 1. 2. File > Export > PAR File and click Next 3. 4. select the project you wish to deploy and click Next 5. 6. ensure the correct PAR file is selected, select if you wish to include the source code and whether you wish to deploy the project right from NDS and click Finish 7. 8. If you elected to deploy directly from NDS, you’ll need to make sure that NDS is configured to do this (a future blog entry in this series describes the details) 9. 10. If you elected to manually upload the PAR file into the portal, log into the portal with an account that has Developer access (a future blog entry in this series covers the details of portal security) and go to Java Development > Tools > PRT Admin Console and click on Browse from Archive Uploader and select the PAR file to upload and click on Upload. 11. * Create the iView based on the PAR file * 1. 2. Log in to the portal with Content Administrator access and navigate to Content Administration > Portal Content 3. 4. Right click on the folder in the Portal Content Directory (PCD) in which you’d like the iView to be created and select New from PAR > iView from the context menu 5. 6. Select the PAR file uploaded in Step 3 above and click Next 7. 8. Select one of the components on the next screen and click Next 9. 10. Type an iView name and ID and click on Next and Finish 11. 12. You can right click on the iView you just created and click on Preview from the context menu to see what the iView looks like or attach it to a page and workset to display it on a portal page (a future blog entry in this series describes the details). 13. h5. Development Methods Now that we’ve seen the structure of a typical portal application, let’s look at the different methods of developing Java applications for the SAP EP. There are other ways of developing content (such as Web Dynpro), which are not discussed in this entry. If you’re using NDS for development, there are easy to use tools and wizards available for speeding up the initial development process. I strongly suggest using these, as they will make your life easier as an EP Developer. I will briefly go over each of them, but for detailed descriptions of each, please refer to the Help provided with NDS, under the SAP EP Plugins Guide section. Note that we’ll be using the EP perspective in NDS for these methods. Here’s a screenshot of the different component and service types currently available from NDS by default.