38

Zero to Portlet in 20 minutes or less

Embed Size (px)

DESCRIPTION

Lotusphere 2009Session BP113Zero to Portlet in 20 minutes or lessPaul T. Calhoun | CTO | NNSUAgendaWork Smarter Not Harder – The Portlet Factory DemystifiedZero to Portlet – Don't Blink !!The Details – The Nitty GrittyReferences – Places to get more infoQ & A

Citation preview

Page 1: Zero to Portlet in 20 minutes or less
Page 2: Zero to Portlet in 20 minutes or less

®

Zero to Portlet in 20 minutes or lessPaul T. Calhoun | CTO | NNSU

BP113

Page 3: Zero to Portlet in 20 minutes or less

Your Presenter – This Is Me!

Paul T. CalhounChief Technology OfficerNetNotes Solutions [email protected]

I'm a Speaker, Trainer and Consultant who provides customer-focused knowledge transfer and consulting to businesses worldwide. I currently develop solutions using Domino, Web, Java, and XML for customers using Domino, Portlet Factory, WebSphere and Eclipse.

I co-authored the IBM Redbook “XML Powered by Domino,” and have developed several online courses for both Application Development as well as System Administration. I have spoke at technical conferences worldwide and published over a dozen articles in leading publications.

Page 4: Zero to Portlet in 20 minutes or less

Agenda Work Smarter Not Harder – The Portlet Factory Demystified

Zero to Portlet – Don't Blink !!

The Details – The Nitty Gritty

References – Places to get more info

Q & A

Page 5: Zero to Portlet in 20 minutes or less

Work Smarter Not Harder How do you develop applications today ?

Write Compile Test Repeat (Until the project is finished or the End of Time, whichever comes first)

How much of your code is re-usable ? Can you re-factor that application you wrote for the sales department to be used

by the HR department ?– How quickly ?

What if there was a tool that allowed you to work SMARTER not HARDER ? Insert Drum Roll here

Page 6: Zero to Portlet in 20 minutes or less

Introducing the IBM Portlet Factory

The IBM Portlet Factory is a Rapid Application Development environment that allows for the creation of Web Applications and Portlets without having to write any code. These applications can then be massively customized to provide different user experiences with the use of profiled input.

Page 7: Zero to Portlet in 20 minutes or less

So What Exactly is the Portlet Factory ?

Creates WEB APPLICATIONS that can be PORTLET enabled very easily

Designer client that plugs into existing IDE’s Rational Application Developer Eclipse

Rapid Application Development Environment

Zero Code Development Portlet Factory generates ALL the code for you No, you CAN NOT alter the GENERATED code No, to the best of my knowledge, you will never be able to modify the generated

code

Allows for the MASSIVE customization of applications via PROFILING at runtime

Page 8: Zero to Portlet in 20 minutes or less

Terminology

Portlet Factory – The application design environment enabled as a plug in to IDE’s like Rational and Eclipse

Factory Project – Top level container for Portlet Factory elements (Models, supporting HTML, XML, CSS files A project can contain “N” number of models

Model – Container for all application functionality represented as an XML structure of the complete Web Application Models are made up of Builders

Page 9: Zero to Portlet in 20 minutes or less

Terminology

Builder – Component that provides specific application functionality to the Model

Profiling – The ability to dynamically alter the Application at runtime

Profile Sets – Container for the dynamic values that alter the Application at runtime

Profile Entry – Specific profiled builder input

Page 10: Zero to Portlet in 20 minutes or less

Deployment Architecture

Applications are deployed as standard JEE WAR files To the Web Application Server

Websphere– Application Server (5.x, 6.x)– Community Edition (1.1, 2.0)

Tomcat To the Portal Server

Websphere (6.x)

All necessary code is deployed with the WAR file No additional configuration is required on the WAS/Portal server

Page 11: Zero to Portlet in 20 minutes or less

Versions Latest and Greatest

6.1– Fixpak 1

Historical 6.0

– 6.0.1– 6.0.2– 6.0.3

5.x

Page 12: Zero to Portlet in 20 minutes or less

Historical Note IBM acquired “The Factory” from an IBM Business partner by the

name of BowStreet

You will still find many of the back end underlying objects use the com.bowstreet namespace

Page 13: Zero to Portlet in 20 minutes or less

Zero to Portlet Get Ready...

Get Set...

GO !!!!!!

112

2

3

4567

8

9

1011

Page 14: Zero to Portlet in 20 minutes or less

The Nitty Gritty That was really fast !!!!

Then again, that's the whole point !!

Let's look at what we did IDE

– Eclipse Project

– Container for all Factory Resources Models

– Container for application specific functionality contributed by builders Testing

– As a web application (WebSphere Application Server or WASCE)– As a portlet (WebSphere Portal Server)

Page 15: Zero to Portlet in 20 minutes or less

Integrated Development Environment Rational Developer

If you already have Rational Installed and use it for all development then this is an option

Less flexible than using Eclipse

Eclipse (Recommended) When installing The Factory, choose the Option “With Eclipse” to install with it's

own copy of Eclipse More flexible

– Allows for multiple instances of The Factory to be installed on the same computer

Page 16: Zero to Portlet in 20 minutes or less

Projects – A place to put your stuff Projects contain all of the resources for a portlet factory application

Models Profile Sets Java Source code Web Content

– HTML– CSS– Graphics– Javascript– XML– XSD – XML Schemas

Page 17: Zero to Portlet in 20 minutes or less

Projects use Server Deployment Configurations When creating your first project you define the Deployment

Configurations for Application Server Portal Server

Servers need to beup and running beforeyou create thedeployment configuration

Page 18: Zero to Portlet in 20 minutes or less

Application Server Tests your code as a WEB APPLICATION in the defined web browser

Code is auto-deployed to the defined server

Can be Rational WAS Test Server Apache Tomcat WAS CE (Recommended) WebSphere Application Server

Page 19: Zero to Portlet in 20 minutes or less

Portal Server Tests your code as a PORTLET

Deployment Auto-deployed

– Code is auto deployed to configured Portal Server Create Local WAR (Recommended)

– Code is written to a local WAR file and deployed via the Portals Admin Console

Page 20: Zero to Portlet in 20 minutes or less

Models – Where all the fun takes place All the application functionality exists in Models

Functionality is added to models via Builders

Builders add specific application functionality to a Model Actions and Events Data Integration Formatting and Visibility JSP Java Navigation and Page Actions Page Elements SQL Rich UI – AJAX Services Variables

Page 21: Zero to Portlet in 20 minutes or less

Builders are your API Models are comprised of “N” number of builders

Builders are The Factory's API Learn these first

– Use the WIKI's and on-line help Like any other language you will use 20% of the builders 80% of the time

Page 22: Zero to Portlet in 20 minutes or less

The Builder Picker As you learn The Factory add the builders you use the most often to

your favorites

This will make creating your next model much easier

Page 23: Zero to Portlet in 20 minutes or less

Accessing Data Using the core builders that ship with The Factory you can access

any JDBC data source Must be defined as a JNDI resource on the WAS/PORTAL server Project deployment configuration must point to that server in order to read JNDI

names in builders Use the testDataSourceConnection.jsp in the WebContent/factory/util folder

– This allows you to test the JNDI name prior to accessing it with builders

Page 24: Zero to Portlet in 20 minutes or less

Using the Service / Consumer Architecture Accessing RDBMS data is best done using a Service / Consumer

architecture

This separates the access of the data from the display of the data The foundation for Service Oriented Architectures (SOA's)

A single service model can provide data to single or multiple consumer models

ServiceProviderModel

ServiceConsumer

Model

ServiceProviderModel

ServiceConsumer

Model

ServiceConsumer

Model

ServiceConsumer

Model

Page 25: Zero to Portlet in 20 minutes or less

Service Model Create a Service Model that accesses the data using the following

builders SQL Datasource

– Connects the factory to the Servers JNDI data source SQL Call

– There will be “N” number of SQL calls– One for each unique call type

Service Definition– Exposes this model to service consumer models– Allows for implementing a “Test Harness” to test the service operations

Service Operation– Define one service operation for every SQL call

● These become the public “callable” interface to the consumer models

Page 26: Zero to Portlet in 20 minutes or less

Consumer Model Create a Consumer Model that calls the “public” methods of the

Service Model using the following builders Service Consumer

– Expose all of the public methods defined in the Service model or just a sub-set Then use the page and data modifier builders to display the results of the public

methods from the service model– View and Form– Data Column Modifier

Portalize the Consumer Model by adding a single additional builder– Portlet Adapter

Page 27: Zero to Portlet in 20 minutes or less

What about Domino ? To access a Domino Server from The Factory

The DIIOP sever task needs to be running Enable “Allow HTTP clients to browse databases” A generic user id with an internet password

Page 28: Zero to Portlet in 20 minutes or less

Enable the Domino Builders The Domino Builders are enabled via a Feature set either during or

after project creation

Page 29: Zero to Portlet in 20 minutes or less

Set the Domino Server access in the properties file Copy the default properties file and edit the copy

Use the FQN of the Domino Server and a service ID with an internet password

# For SeverName, specify the Domino hostname and port that can be # used to fetch the CORBA IOR. ServerName=nnsuportal.nnsu.com

# Username and Password are required for either version.UserName=Professor NotesPassword=password

Page 30: Zero to Portlet in 20 minutes or less

Use the Domino View and Form builder The Domino View and Form builder

Allows you to access a Domino View Allows access to documents with the ability to

– Create– Read– Edit– Delete

Use the same modifiers used when accessing RDBMS data Data Column Modifier Field Modifier Etc.

Add the Portlet Adapter builder to “Portalize” the application

Page 31: Zero to Portlet in 20 minutes or less

Testing – Does it Work ? A default run configuration called “Active Model” is created during

the Portlet Factory installation This will allow you to run the currently open model from a single run configuration

Test your application using the Web Server first

The majority of your functionality testing does NOT require the Portal Server

The only time you need to deploy to the Portal server is when testing Portlet specific functionality Edit Mode Config Mode Interactive Portlets (Cooperative Portlets)

Page 32: Zero to Portlet in 20 minutes or less

Final Thoughts The Portlet Factory is A tool, not THE tool

The more you know about the following the better Factory developer you will be Java XML XSD Schemas HTML CSS Javascript

You can leverage existing code you have The Factory generates the majority of the code, that does not mean you will never

need to write some code

Finally – Think of what you could do if you had more than 20 min !!!

Page 33: Zero to Portlet in 20 minutes or less

Wrap up

Other Portlet Factory Sessions AD503 - Using IBM WebSphere Portlet Factory and IBM Rational Application

Developer for Portlet and Portal Site Development AD504 - Best Practices for Creating IBM WebSphere Portal Applications with

WebSphere Portlet Factory AD505 - Dashboards - The "Superhero" of Portal Tools AD506 - IBM Dashboard Accelerator -- Build Once, Deploy Anywhere

Page 34: Zero to Portlet in 20 minutes or less

Resources

Portlet Factory WIKI http://www.lotus.com/ldd/pfwiki.nsf

Developerworks Portlet Factory Zone

http://www.ibm.com/developerworks/websphere/zones/portal/portletfactory Forums

http://www.ibm.com/developerworks/wikis/display/PortletFactoryID/Portlet+Factory+forums+on+developerWorks

Product Documentation http://www.ibm.com/developerworks/websphere/zones/portal/portletfactory/

proddoc.html

Page 35: Zero to Portlet in 20 minutes or less

Resources

Davelan Top Gun Portlet Factory Courses http://www.davalen.com/websphereportletfactory.php Booth # 713

The Learning Continuum Corporation http://www.tlcc.com

Page 36: Zero to Portlet in 20 minutes or less

Resources

Learning Portlet Factory Official IBM Curriculum

WP416 – IBM WebSphere Portlet Factory V6.0.1: Developer Fundamentals WP516 – IBM WebSphere Portlet Factory V6.0.1: Advanced Developer Topics WP520 – Using IBM WebSphere Dashboard Framework 6

Familiarize your self with ALL of the builders via the Builder help and WIKI's Samples and Tutorials

Download and review all the samples and tutorials available from the Documentation and wiki sites

Review Sample code added as part of a Feature Set Review and participate in the Portlet Factory forums

Page 37: Zero to Portlet in 20 minutes or less

Q & A This is where you get to ask the questions.

[email protected]

Page 38: Zero to Portlet in 20 minutes or less

Legal disclaimer

© IBM Corporation 2008. All Rights Reserved.

The inf ormation contained in this publication is prov ided f or inf ormational purposes only . While ef f orts were made to v erif y the completeness and accuracy of the inf ormation contained in this publication, it is prov ided AS IS without warranty of any kind, express or implied. In addition, this inf ormation is based on IBM’s current product plans and strategy , which are subject to change by IBM without notice. IBM shall not be responsible f or any damages arising out of the use of , or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall hav e the ef f ect of , creating any warranties or representations f rom IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement gov erning the use of IBM sof tware.Ref erences in this presentation to IBM products, programs, or serv ices do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities ref erenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other f actors, and are not intended to be a commitment to f uture product or f eature av ailability in any way . Nothing contained in these materials is intended to, nor shall have the ef f ect of , stating or imply ing that any activ ities undertaken by you will result in any specif ic sales, revenue growth or other results.

Perf ormance is based on measurements and projections using standard IBM benchmarks in a controlled env ironment. The actual throughput or perf ormance that any user will experience will v ary depending upon many f actors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O conf iguration, the storage conf iguration, and the workload processed. Theref ore, no assurance can be given that an indiv idual user will achieve results similar to those stated here.

All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may hav e achiev ed. Actual env ironmental costs and perf ormance characteristics may vary by customer.

IBM, the IBM logo, Lotus, Lotus Notes, Notes, Domino, Quickr, Sametime, WebSphere, UC2, PartnerWorld and Lotusphere are trademarks of International Business Machines Corporation in the United States, other countries, or both. Uny te is a trademark of WebDialogs, Inc., in the United States, other countries, or both.

Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Sy stems Incorporated in the United States, and/or other countries.

Java and all Jav a-based trademarks are trademarks of Sun Microsy stems, Inc. in the United States, other countries, or both.

Microsof t and Windows are trademarks of Microsof t Corporation in the United States, other countries, or both.

Intel, Intel Centrino, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

UNIX is a registered trademark of The Open Group in the United States and other countries.

Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.Other company , product, or serv ice names may be trademarks or serv ice marks of others.