|
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
XML Easy XML Publishing into Your Enterprise Portal
Sharing the power with non-techies
Jul. 2, 2004 12:00 AM
Enterprise portals provide a single interface to aggregated and componentized information. They significantly reduce the navigational issues inherent with Web sites and make it easier to publish information from disparate sources. The basic building blocks of enterprise portals are portlets, which are reusable, personalized Web components displaying content from various data sources. One data source, XML, has become a widely used tool in enterprise portals. The work needed to integrate XML with a portal is often considered a highly technical and time-consuming task. For example, to publish XML into a portal, developers usually think that programming is their only option. They go through the entire process of using Beans, compiling XML Schemas, and processing and binding XML instance documents. Developers go through this process without considering the level of complexity needed to publish the content. This article covers the options available to both page designers and developers to simplify XML publishing. These options range from using portlet building tools that are highly productive and geared toward page designers, to coding using the Java portlet standard Java Specification Request (JSR) 168, which offers developers complete control over the portlet application. Portlet Building Tools Ease Portal Development A few of the most important characteristics and capabilities of portlet building tools include:
Leveraging existing XML feeds and rendering directly into your portal The feed from XML-Journal shown in Listing 1 is an example that provides the latest news information relating to XML. Using the wizard, a page designer provides the URL to this RSS feed (www.sys-con.com/story/category.cfm?id=1080&rss=1 ) and an optional XSL filter to transform the data. The portlet tool consumes the XML, applies any necessary filters, and maps any parameters if necessary (see Figure 1). Once the XML has been consumed by the tool and the page designer selects a layout appropriate for this feed, the tool creates the portlets, which are added to the portal page. To the end user, this news feed is just another portlet on the portal page (see Figure 2). Accessing XML and Web services feeds At other times the parameter is a personalization parameter. Let's suppose the portlet retrieves weather information from the following URL: myweatherinfo.com/rss_weather_info.xml. To be able to retrieve personalized weather information, the requested URL must contain a parameter indicating the ZIP or area code: myweatherinfo.com/rss_weather_info.xml?zip=94065. In this scenario the portlet should support user-level personalization, so that users can specify the geographical location in which they are interested. Let's consider another scenario. When the URL of the portal page is invoked, a parameter called zipcode is passed to it indicating that the page should display information relevant to that particular ZIP code. In this case it is not the portal user, but the calling environment, that specifies the value of the parameter and passes it to the portal page: myportal.com/page?zipcode=94065 (see Figure 3). The parameter that is passed to the portal page has to be passed further to the portlet. The task of mapping the page parameter, zipcode, to the portlet parameter, zip, needs to be performed by the page designer. Note: The ability to map page parameters to portlet parameters declaratively is a portal feature. As a result of this, the portlet can contact the data source and pass the required parameter to it: myweatherinfo.com/rss_weather_info.xml?zip=94065. As this example illustrates, portlet building tools can empower non-technical page designers to map portal page parameters to portlet parameters, ensuring the seamless information flow. Creating reusable portlets with events Any user action performed in a portlet, such as a clicking on a hyperlink or a button, may trigger an event in the portal. Page designers then have the ability to map events to actual links: portal pages or physical URLs. When the portal receives the event, it navigates the user to the page as specified by the page designer (see Figure 4). Access to protected URLs Since the same data source could be accessed by a number of portal users, authentication on a per user basis should also be possible. The user dependent authentication information may be stored in the portlet's preference store or in the repository (usually LDAP repository), where the portal user information is being stored. Caching portlets The importance of portlet caching increases dramatically when the data source itself (e.g., the provider of the XML feed) has performance issues. As long as the cached portlet content is displayed on the portal page to the end users, the delay that users would experience by accessing the news feed directly is eliminated. Supporting filtering and layout formatting Wizard-based portlet building tools tend to be limiting on the user interface front. They are expected to offer a wide variety of flexible views (e.g., tabular, chart, tree, scrolling news) and pagination support. Some may also provide APIs to create custom layouts. Accessing XML through Java using the Portal Standard JSR 168 When creating portlets using XML where full control is needed and where the portlets will be rendered on multiple portals, developers can program portlets using the portlet standard, Java Specification Request (JSR) 168. JSR 168 is a specification that defines a set of APIs to enable interoperability between portlets and portals, addressing the areas of aggregation, personalization, presentation, and security. JSR 168 defines:
Some available APIs include:
As this article has described, XML publishing into a portal can be a fairly easy process. Page designers can use portlet building tools that are very productive and simplify the process of integrating applications and content that could normally take weeks to code. For developers, Java offers a viable solution to XML publishing into a portal with the portal standard, JSR 168. JSR 168 provides all the APIs for publishing XML with Java as well as the APIs to render that Java application as a portlet into the portal. Reader Feedback: Page 1 of 1
SOA World Latest Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||