# Presentation: 610302

## caBIOPortlet

***Konrad Rokicki (SAIC)***
***Manav Kher (SemanticBits)***

## Agenda

- Portal Technology
- caGrid Portal
- caBIO Portlet
- Demo
- Future Directions

## What is a Portal?	

- Central place for making all types of information accessible to an audience of varying range
- Aggregates content from several sources
- Can be accessed via a web browser
- Personalizes the presentation for each user or user role
- Presents a lot of information in a concise and central way
- Integration environment for multiple development efforts
- Examples: iGoogle (_[www.google.com/ig](http://www.google.com/ig)_)

## What is a Portal?

## What is a Portlet?

- A Portlet is a visual component that can be assimilated into portal web pages
- Portlets are based on the Java Specification Request (JSR) 168 Portlet Specification which defines a set of APIs for Portal computing (aggregation, personalization, presentation, and security)
- Portlets are deployed into a Portal Containers for accessibility
- Are pluggable into any JSR-168 compliant Portal container

## caGrid Portal - Overview

- caGrid Portal provides a visual display of the services that are running on the caGrid infrastructure and also institutions that are participating in the caBIG program.
- Built around the JSR-168 Portlet specification and deployed in Liferay Portal container
- Developed by the caGrid Portal team
- Separate instances deployed in the caGrid training and production tiers
- http://portal.training.cagrid.org
- http://cagrid-portal.nci.nih.gov

## caGrid Portal	

## Problem Statement	

- caGrid Services are middleware services and the end users are other software developers
- No user interface available by default
- Developers of caGrid Service may want to write usable interfaces to reach out to a wider audience.
- Web based UI is the easiest to use, but difficult to develop and maintain. Represents a high barrier of entry, especially true for simple use cases

## Proposed Solution

- Open up caGrid Portal for hosting Portlets developed by caBIG developers
- Create a separate section in the Portal for community Portlets
- Provide documentation, guidance and support for development teams that want to develop User Interfaces for their grid services
- Develop sample Portlets that leverage caGrid API

## Advantages 

- Low barrier of entry
- Standards based approach
- Development teams don’t have to write monolithic web or desktop applications
- Developers don’t have to maintain installations
- There is repetitive development in individual applications. Modules like user authentication and authorization, caBIG/caGrid interaction, web layouts (look and feel, page headers, footers etc), etc. can be provided by the portal. This will cut down the development time for individual projects
- Potential large audience of caGrid Portal

## caBIO Portlet - Introduction

- Background and goals
- Implementation options
- Why we chose the portlet option
- Solution architecture
- Lessons learned
- Demo
- Future directions

## caBIO Portlet Goals

**What is caBIO?**
- Repository of biomedical annotations, populated with many different data sources
- caCORE-like system utilizing a model driven architecture
- Many programmatic APIs available (Java, WS, REST, Python)
- Default QBE user interface available
**Goal for caBIO 4.2 time-frame:**

*Provide a user friendly interface for scientific researchers and other non-technical users that allows for easy and intuitive browsing of data within the caBIO system.*

## Implementation Options

- Stand-alone web application
- Extend the caCORE-generated system
- caBIO Home Page already does this to add FreestyleLM search capability
- Portlet within caGrid Portal

## Why a Portlet?

- Greater exposure through the caGrid Portal
- Reuse of technologies, modules, code
- caBIO has historically been an “early adopter” of new caBIG technologies
- Future capabilities: user customization, preferences

## Solution Architecture

- caBIO
- Server

**Solution Architecture**

- caGrid
- Portal

- caBIO Portlet

- Java API

- REST API

- HTTP

- caBIO Database

- REST API (Ajax) used for Simple Search
- Java API used for Templated Searches

## Lessons Learned

- Portlet model differs from servlet model
- Must take other portlets into account
- Using a traditional web framework requires a “bridge”

## Lessons Learned (continued) 

- Struts bridge requires a redirect to another action for rendering
- Struts action must forward to another action (redirect=true)
- Struts Bridge intercepts client redirect and processes it internally
- Ajax can make things easier, especially if you already have a REST API
- But maintaining state is harder
- Use absolute URLs to resources
- Cannot predict path structure since portlet can be deployed anywhere
- Use <c:url>

## Struts Bridge

## Lessons Learned (continued) 

- Struts can be used via the Struts Bridge
- Reuse Liferay UI elements (taglib)
- Reuse CSS for consistent look & feel

**caGrid Discovery Portlet**

**caBIO Portlet**

**caGrid Discovery Portlet**

**caBIO Portlet**

## caBIO Portlet Demo

- http://cagrid-portal.nci.nih.gov/web/guest/community

## caBIO Portlet Demo

## caBIO Portlet Demo

## caBIO Portlet Demo

## caBIO Portlet Demo

## caBIO Portlet Demo

## Future Directions

- Expanded functionality
- Advanced query builder
- Additional templated searches
- Additional portlets
- PID pathway viewer
- Synergize with other portlets
- Complementary functionality
- Find pathway in caBIO, view more information in PID pathway portlet
- Portal customization

- Advanced Search

**Context**

- Agent Chromosome Gene Pathway

**Attribute**

- Gene Name Gene Symbol   Pathway Name

- (

- (

- Gene

- Gene Symbol

- =       <          <=

**Operator**

- =

**Separator**

- EGFR

**Value**

- )

**Separator**

- And   Or

- Modified to be pull-down list, text field, etc. based on attribute selected

- And

**Query**
- (Gene Symbol = “EGFR” AND ...

- Submit

- Reset

- Dynamic based on attribute selected

**And/Or**

## Implementing Your Own Portlet

- See the wiki page for more information http://www.cagrid.org/wiki/Portal:2.1:CommunityPortlets

## Resources

- caBIO Portlet
- http://cagrid-portal.nci.nih.gov/web/guest/community
- caBIO Home Page
- http://cabioapi.nci.nih.gov/cabio41
- caBIO Wiki Page
- https://wiki.nci.nih.gov/display/ICR/caBIO
- caGrid Portal Mailing List
- cagrid_users_l@nci.nih.gov
- caGrid Portal Wiki page
- http://www.cagrid.org/wiki/Portal:Portal