Source Code Accompanies This Article. Download It Now.

WSRP

An emerging standard for portlet development is Web Services for Remote Portlets (WSRP; www.oasis-open.org). WSRP defines a set of SOAP messages that contain portlet mark-up fragments. This means that the portlets themselves can be hosted on a remote machine to the portal server. The technology used to develop the portlets is immaterial so long as the HTML is exposed by a WSRP-compliant web servicea "WSRP Producer." The portal acts as a WSRP Consumer. WSRP 1.0 supports content navigation and interactions between the user and the portlet, managed by the portal. Future versions of WSRP will also support inter-portlet communication between remote portlets, mediated by the portal.

NetUnity (www.netunitysoftware.com) offers a tool that exposes ASP.NET pages as WSRP portlets via a simple mechanism. The tool adds a new PortletLibrary template to the Visual Studio IDE that offers two new types of file: a Portlet and a WSRP Portlet Page. The Portlet is a simple file that defines the ASP.NET pages that provide the entry points for the portlet in its standard modes: View, Edit, and Help (Listing Ten). The Portlet file has parallels with the portlet.xml file of JSR 168.

WSRP Portlet Page is an ASP.NET page that inherits from NetUnity.WSRP.ASP .WsrpPage rather than the standard System.Web.UI.Page class. Other than that, the ASP.NET developer is free to develop as usual, subject to a few restrictions: Ajax currently is not well supported and Session must be managed through the use of the NetUnity.WSRP.StateBag rather than the standard ASP.NET Session. URLs (for redirection and downloading of embedded resources) must be managed using a set of special methods provided by the NetUnity assemblies. Once compiled, the portlet is deployed as a set of ASPX pages and their code behind, and an asmx file that is automatically created by the NetUnity toolkit. This provides the WSDL that is required by a WSRP consumer.

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task.
However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Video

This month's Dr. Dobb's Journal

This month,
Dr. Dobb's Journal is devoted to mobile programming. We introduce you to Apple's new Swift programming language, discuss the perils of being the third-most-popular mobile platform, revisit SQLite on Android
, and much more!