Internet Engineering Portal Outline • • • • Introduction Portal Architecture Java Specification for Portal (JSR 168) Cocoon Introduction • A portal, or enterprise information portal (EIP), is a Web site that integrates an organization's knowledge base and all related applications into a single user-customizable environment. • This environment acts as a one-stop shop, or "gateway," for users' information and system needs. • Enables an organization's entire content database; search facilities; collaboration tools; individual department, workgroup, and projectspecific intranets; online applications; and security mechanisms fused into one cohesive environment that's accessible from a single starting point. • It gives large amounts of disparate content and applications an overall sense of unity and continuity. • One important feature of a portal is Personalization Introduction (cont.) • My Yahoo! and MSN are perfect examples of Internet portals. Users have the ability to select only the news that's of interest to them — news stories and weather reports in their home city, the results from their favorite sports teams, the latest from their industry, and their daily fix of stock quotes — without having to sift through mounds of content that's not relevant to them. • EIPs are developed specifically to work within business environments, often integrating standard corporate collaboration tools — e-mail, shared calendars, discussion forums, and online meetings • This not only eases software rollout and maintenance but also reduces total cost of ownership because you're dealing with one portal suite rather than separate software tools. • Since portal software integrates various key components into one suite, you don't have to negotiate multiple licensing agreements and support contracts. Introduction (cont.) Seven common portal applications • Line-of-Business portals: provide easy access to applications that serve a specific area, such as procurement or human resources. • Corporate Intranet Portal: acts as gateway to other portals and websites operated by an organization. • Corporate Extranets: act as an interface between companies, customers and suppliers, revealing subsets of information to specific audiences. • Customer Service or Self-Service: are subsets of a corporate Extranet, delivering online personalized content and services, as well as training, support and more. Seven common portal applications (cont.) • Team or Divisional Portal: is used by groups or communities that want to share specific content or business functions. • Personal Portal: This portal is geared to assist individuals who access information and resources. • Enterprise Portals: The Enterprise Portal is the central portal for an entire organization. Main Features • • • • • • • Content and document management — services that support the full life cycle of content and document creation and provide mechanisms for authoring, approval, version control and scheduled publishing. Some portal solutions providers aim to remove the need for a third-party content management system. Collaboration — portal members can communicate synchronously (through chat, or messaging) or asynchronously through threaded discussion and email digests (forums) and blogs. Search & Navigation — Content is meant to be read, so on the usage side of the equation, being able to find and retrieve targeted content is the essential task. As more content is added to repositories, the more valuable those repositories become. Unfortunately, retrieving useful information becomes more difficult as the volume of information grows unless effective search and navigation methods are employed. Personalization — the ability for portal members to subscribe to specific types of content and services. Users can customize the look and feel of their environment. Entitlement — the ability for portal administrators to limit specific types of content and services users have access too. For example, a company's proprietary information can be entitled for only company employee access. Integration — the connection of functions and data from multiple systems into new components/portlets. Single sign-on — most enterprise portals provide single sign-on capabilities to their users. This requires a user to authenticate only once. Access control lists manage the mapping between portal content and services over the portal user base. Features • • • • • • • • • • • • Calendars and to-do lists - schedules, hours of operation Discussion groups and chat Announcements & alerts Job openings, career opportunities Reports and documents Personal HR info - benefits, medical info, Access to data warehouse Search E-mail and address book Collaboration - intranet and internet Applications - including access to legacy systems Work flow Features (cont.) • • • • • • • • • • Course schedules, grades, GPAs, transcripts, etc. , degree audit Residence hall menus News - campus and world Weather Maps and images Org charts Finance - stocks and investments, expenses, budget, credit union, bank accounts Access to online shopping and vendors Links - reference material, bookmarks IP telephony Portal example - MSN Search Channels (a.k.a portlets) Portal example – my yahoo Links Channels Portlet • Portlets are web components--like servlets--specifically designed to be aggregated in the context of a composite page. • Usually, many portlets are invoked to in the single request of a portal page. • Each portlet produces a fragment of markup that is combined with the markup of other portlets, all within the portal page markup • In a typical portal page there are different windows. Each window is represented by a portlet. • Each window can be a different application and they maybe developed independent of each other. Elements of a Portal Page Portlet technical aspect • portlet is a class that implements the javax.portlet.Portlet interface and is packaged and deployed as a .war file inside of a portlet container. Portlets are similar to Servlets, in that: • – – – – • Portlets are managed by a specialized container. Portlets generate dynamic content. A portlet's life cycle is managed by the container. Portlets interact with web client via a request/response paradigm. Portlets are different from servlets, in that: – – – Portlets only generate markup fragments, not complete documents. Portlets are not directly URL addressable. You cant send somebody URL of a portlet. You can send him the URL of the page containing a portlet. Portlets cannot generate arbitrary content, since the content generated by a portlet is going to be part of portal page. If a portal server is asking for html/text, then all portlets should generate text/html content. On the other hand, if the portal server is asking for WML, then each portlet should generate WML content. HelloWorld portlet public class HelloWorld extends GenericPortlet{ protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { response.setContentType("text/html"); response.getWriter().println("Hello Portlet"); } } Deployment descriptor <portlet> <description>HelloWorldDescription </description> <portlet-name>HelloWorld </portlet-name> <display-name>Hello World </display-name> <portlet-class>com.test.HelloWorld </portlet-class> <expiration-cache>-1 </expiration-cache> <supports> <mime-type>text/html</mime-type> <portlet-mode>VIEW </portlet-mode> </supports> <supported-locale>en </supported-locale> <portlet-info> <title>Hello World</title> <short-title>Hello World </short-title> <keywords>Hello,pluto</keywords> </portlet-info> </portlet> Deployment in Pluto • Pluto is the reference implementation of JSR 168 (Portlet specification) • portletentityregistry.xml : <application id="5"> <definition-id>HelloWorld</definition-id> <portlet id="1"> <definition-id> HelloWorld.HelloWorld </definition-id> </portlet> </application> Open Source Portal Solutions Portal Software • • • • • uPortal Blackboard Portal System Microsoft Sharepoint Sun One Portal Server …. etc etc …. Portals @ Apache • Top-level ASF project • Contains several portal-related sub-projects – – – – Jetspeed 1 Jetspeed 2 Pluto WSRP-4J (Web Services for Remote Portlets) • Cross-pollination with other Apache projects – Maven – Jakarta Tomcat – Cocoon What is Apache Cocoon? • A publishing engine • An application framework • A panacea for the internet pan·a·ce·a n. A remedy for all diseases, evils, or difficulties; a cure-all. Gregarious Cocoon Same again… Once more, different view The Project • Origins – Started in 1999 by Stefano Mazzocchi • Redesign of apache.org • Frustrated by the limitations of HTML • Wanted to use emerging technologies (XML/XSL) – Today • Now one of the most important Apache projects • Incorporates technologies from various projects • Just under 2000 registered on all mailing lists Overview • XML publishing / application platform • Framework integrated into a Servlet • Makes extensive use of XML and XSLT • Aim: Separation of Concerns (SoC) • Management, Logic, Content, Presentation • Written in Java Overview • Dynamic Document Generation – Based on XML and XSLT – But not limited to … • Runs in different environments – Servlet Engine – Command line • Used in various scenarios – – – – – Web sites Web publishing XML portals XML processing systems … What’s it look like? Separating Content and Layout Building a Pipeline The Sitemap • Centralised configuration file – Sub-sitemaps possible • Contains set of ready-to-use components – Use them to build functions – Write and “drop in” your own • Contains collection of Pipelines <map:sitemap> <map:components> <map:generators/> <map:transformers/> <map:serializers/> <map:readers/> <map:selectors/> <map:matchers/> <map:actions/> <map:pipes/> </map:components> <...> <map:pipelines> <map:pipeline/> <map:pipeline/> <...> </map:pipelines> </map:sitemap> Defining a Pipeline • Pipelines are specified in the Sitemap – Describes the processing steps for a request –<map:match Matches a pipeline to a request URI pattern="helloworld" type="wildcard"> <map:generate type="file" src="helloworld.xml"/> – Example: http://localhost:8888/helloworld <map:transform type="xslt" src="helloworld2html.xsl"/> <map:serialize type="html"/> </map:match> Matching a request • Matcher – Matches the incoming request to the correct pipeline – Different types of matchers available – Most common: wildcard <map:match pattern="news/*" type="wildcard"> <map:generate src="newsfeeds/{1}.xml" type="file"/> <map:transform src="news2html.xsl" type="xslt"/> <map:serialize type="html"/> </map:match> <map:match pattern="products/*" type="wildcard"> <map:generate src="products/infos/product_{1}.xml" type="file"/> <map:transform src="products2html.xsl" type="xslt"/> <map:serialize type="html"/> </map:match> Complex Pipeline • Transformer example with commands Multi Channeling But there is more • Many usable components • Managing the application – Flow control – Input modules • More features in the Sitemap – – – – Content Aggregation Redirects Resources Views A Typical Installation A Typical Installation Benefits • No real alternative – That offers everything available in Cocoon • XML driven architecture – Extensible with own components • Flexible data integration and publishing – Often: no programming needed • Large code base – Many components provided – Most of the hard work is already done History of the Cocoon Portal • Started in September 2000 – Commercial product developed by S&N – Based on Cocoon – Additional components and project specific additions – CMS, Tools, documentation, training • Completed in mid 2001 – sunRise and sunSpot – Used in various projects • Donated to the Cocoon project in February 2002 – Used around the world • Started new Portal Engine in the end of 2002 – Together with other interested parties – The usual advantages • New portal engine in Cocoon since the beginning of 2004 Common Requirements… • Integration of different data sources – Static sources (HTML, XML, Office Documents…) – Dynamic sources (CMS, Archives…) – Databases (SQL DB, XML DB, LDAP…) – Complex Applications • Single Sign-On • Personalisation • Individualisation • Multi Channel – PCs (HTML, XML) – Mobile, Organizer (WML) – Documents (PDF, Office Documents) – Email – Applications …fulfilled by Cocoon • Integration of data sources – Advantages of the pipeline concept – Different Generators for retrieving data • Complex Applications – Logic: Page Flow and Actions • Single Sign-On – Authentication framework • Personalisation and Individualisation – Different Transformers for manipulating/augmenting data • Multi Channel – Stylesheet Transformations for various output formats Getting Content from Coplets • Coplets are “Cocoon Portlets” • Different types of coplets – – – – – Static URI based Pipeline based JSR 168 portlets Custom The Cocoon Portal Coplets in action Static Coplet XML File Dynamic Portlet using JSR 168 Role Dependent Coplet Pipeline: XML + XSLT Dynamic RSS Coplet Pipeline: Remote XML XSLT Static Coplet Own Java Class Cocoon Portal • Definition and configuration in XML – Layout (ordering) separated from content – Using existing types – Requires no Java coding • Predefined coplet types – Simple usage of Cocoon for delivering content – Requires no Java coding Cocoon Portal Internals Portal Generator Portal Manager Transformer Serializer Profile Manager - Portal Profile - Layout Coplet Adapter Custom Event Manager - Publish and Subscribe JSR 168 Renderer URI Coplet Container Portal Features • Everything is configurable – – – – Available coplets Features of a coplet Layout information User rights • Flexible Presentation – Stylesheets for multi-channel – Coplets can be channel-dependent • Parallel Processing The Portal Stack References • Wikipedia • http://www.onjava.com/pub/a/onjava/2005/ 09/14/what-is-a-portlet.html • Java.sun.com • Cocoon.apache.org