This document provides an overview of a presentation on developing applications using the IBM Portlet Factory. The presentation covers:
1) How the Portlet Factory allows developing web applications and portlets without writing code through its rapid application development environment.
2) A demonstration of creating a basic portlet in under 20 minutes using the Portlet Factory.
3) Details on key Portlet Factory concepts like models, builders, profiling, and the code generation process.
The presentation aims to explain how the Portlet Factory can help developers work smarter by automating much of the development process.
3. Your Presenter – This Is Me!
Paul T. Calhoun
Chief Technology Officer
NetNotes Solutions Unlimited
pcalhoun@nnsu.com
www.nnsu.com
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.
4. 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
5. 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
6. 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.
7. 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
8. 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
9. 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
10. 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
12. 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
13. Zero to Portlet
Get Ready...
Get Set...
GO !!!!!!
12
11 1
10 2
9 3
8 4
7 5
6
14. 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)
15. 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
16. 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
17. Projects use Server Deployment Configurations
When creating your first project you define the Deployment
Configurations for
Application Server
Portal Server
Servers need to be
up and running before
you create the
deployment
configuration
18. 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
19. 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
20. 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
21. 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
22. 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
23. 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
24. 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
Service
Consumer
Model
Service Service Service Service
Provider Consumer Provider Consumer
Model Model Model Model
Service
Consumer
Model
25. 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
26. 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
27. 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
28. Enable the Domino Builders
The Domino Builders are enabled via a Feature set either during or
after project creation
29. 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 Notes
Password=password
30. 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
31. 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)
32. 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 !!!
33. 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
36. 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
37. Q&A
This is where you get to ask the questions.
pcalhoun@nnsu.com