websphere portlet factory: davalen’s practical advice from the field

22
© 2008 IBM Session ID: D23 WebSphere Portlet Factory: Davalen’s Practical Advice from the Field Speaker: Michael “Spoon” Witherspoon WebSphere Portal Technical Conference U.S. 2008

Upload: davalen-llc

Post on 12-May-2015

747 views

Category:

Technology


1 download

DESCRIPTION

WebSphere Portal Technical Conference 2008:Session ID: D23 WebSphere Portlet Factory: Davalen’s Practical Advice from the Field Speaker: Michael “Spoon” Witherspoon

TRANSCRIPT

Page 1: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

© 2008 IBM

Session ID: D23

WebSphere Portlet Factory:Davalen’s Practical Advice from the Field

Speaker: Michael “Spoon” Witherspoon

WebSphere Portal Technical Conference U.S. 2008

Page 2: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 200822 2

Practical Advice from the Field Agenda

Introduction

Presentation

Questions / Answers

Page 3: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 200833 3

Introduction

Who is Davalen, LLC?

Premier IBM Business Partner & IBM Authorized Training Center since 1993

Who is Michael “Spoon” Witherspoon?

Career instructor, application developer, course writer

Former Lead Technical Instructor at Bowstreet

Current Portlet Factory Practice Manager at Davalen

Writes the Davalen Top Gun for WPF courses

Page 4: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 200844 4

Presentation Be Prepared

Know the Product Well

Advice on:

Services Schemas Builder Calls User Interface (UI) Linked Java Objects (LJOs) Profiling Programming Patterns

10 Practical Tips from the Field

Page 5: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 200855 5

Be Prepared: The Customer is Relying on You!

Customer may not know Portlet Factory

Maybe has tried and failed

Customer specs may not be complete

Heavy focus on user interface (UI) Little detail on data and services

Customer may not understand profiling

Roles-based profiling is very powerful

Page 6: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 200866 6

Know the Product Well: Everyone Expects You to Know Start with training and mentoring

Davalen’s Top Gun courses for WPF developers• Comprehensive, Practical, Real-World Examples

http://www.davalen.com IBM Course Catalog – search for “Top Gun”

Use Portlet Factory Wiki and Forums

See URLs at end of presentation

Practice, Investigate, Innovate

Develop new patterns and techniques Learn new things

Page 7: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 200877 7

Advice on Services Expect to Design the Services Layer Yourself

The customer is hyper-focused on the UI

Think About the Schemas Tip! Input schemas should be custom

• More stable• Generated schemas - all inputs are string, all are

required Tip! Figure them out early

• They drive the UI• Avoid late game schema changes

Stabilize the Database Structure Early Structure changes often force schema changes Use Views when possible

Tip!

Page 8: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 200888 8

Advice on Services – Don’t be Afraid to:

Break up the Services into Multiple Service Provider models

One per type of data i.e. Customer or Product One per data relationship i.e. Invoice : LineItems Something else logical

Have one Provider Consume Another’s Services

It is OK to have a Service Consumer builder in a Service Provider model

Tip! Make Extra Services

Utilities that return short lists – Lookup Table Think broadly now, save time later Easy to disable

Tip!

Page 9: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 200899 9

Advice on Schemas

The World is not Flat – neither is the data

Learn to work with complex XML

Leverage Simple Schema Generator builder

Modify generated schema as needed Custom input schemas aid Data Page validation

Put repeating elements in a parent node

<Children><Child></Child>…<Child></Child>…</Children>

Easier to work with in Action Lists, Methods, LJOs

Tip!

Page 10: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 20081010 10

Advice on Schemas – Don’t be Afraid to: Write your own Schemas

Customize generated schemas for convenience and consistency

Streamline complex schemas W3Schools – http://www.w3schools.com

Use Schema-Typed Variables

Regular Variable builder• Choose schema element

Very useful with• Data Page builder• WebCharts builder• XML inputs for

− Action Lists, Event Handlers, Method Calls

Page 11: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 20081111

Advice on Builder Calls

Use Comments to group builders by feature / function

Use naming conventions

Action List – Act_ActionName LJO – LJO_ClassName Service Definition / Service Consumer – end with

underscore• Service method names are much easier to read

Variables by purpose• Temporary – temp_VariableName• Shared – shared_VariableName

− The actual Variable and not the Shared Variable builder

Tip! Use self-documenting naming rules and be consistent

Tip!

Page 12: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 20081212

Advice on UI Learn Data Page well – you will definitely use it

Tip! Place on <div> tag and not <span> tag Use it even when there is only one input field Learn to Nest Repeated Region builders Excellent control over presentation of complex,

hierarchical data Good time to use schema-type variables

Use AJAX

Refresh just one region instead of entire portal page

Use Visibility Setter

Show / Hide notes, markers, complex variables, service results

Drive with Profiling

Tip!

Page 13: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 20081313

Advice on UI – Don’t be Afraid to:

Make your own Layout Pages

Generated pages can be too generic Data Page works with custom pages Tip! Use Imported HTML pages for layout and Page

builders for snippets

Use Data Page instead of View and Form

It is more work but offers more control• Page flow• Naming of pages, methods, etc.• View and Form encapsulates too much

Tip! Always put each Data Page builder on its own Page builder.

• Combine onto separate page using Inserted Page

Tip!

Tip!

Page 14: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 20081414

Advice on Linked Java Objects (LJOs)

Tip! Learn the IXml API

Thorough API for manipulating XML objects

Use in Services

Complex transforms Complex processing / data manipulation Pre- and Post-Execution methods

Use in Service Consumers

Process / modify service results for UI purposes

Use Builders whenever you can

Don’t write everything in LJOs

Tip!

Page 15: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 20081515

Advice on Profiling

Do not copy a Profile Set

Create new Profile Set from existing instead

Name using package name convention

Encourage customer to use Profiling

Portlet configuration, defaults, user personalization Roles-based application versions

Use Profiling during application development

Set Default profile to “normal” input values Use a “developer” profile to expose options and

visibility for developer’s convenience

Page 16: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 20081616

Advice on Programming Patterns Use Services Oriented Architecture

Service Provider / Service Consumer Beware: not all services generate code equally

Use Imported Models for Common Builder Calls

Event Declarations SQL Data Source Shared Variables Schemas

Build Application Models from Components

Static / Dynamic Model Containers Profiled Imported Model

• Giant step toward model-based builders

Page 17: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 20081717

10 Practical Tips from the Field:

1. Always make custom input schemas.

2. Nail down the schemas early in the project.

3. Make extra, small utility services even if you think you won’t need them.

4. Put repeating schema elements inside a parent node.

5. Use self-documenting naming of builder calls and be consistent.

Page 18: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 20081818

10 Practical Tips from the Field:

6. Place Data Page builder calls on <div> tags instead of <span> tags.

7. Use Data Page even when there is only one input field.

8. Use Imported Page builder with HTML pages for page structure / layout and use Page builder for snippets.

9. Always put each Data Page builder on its own Page builder.

10. Learn the IXml API and use it liberally in LJOs.

Page 19: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 20081919 19

Additional Information and Resources Cited in Presentation

Davalen, LLC – WebSite and Top Gun Informationhttp://www.davalen.com

IBM Training Course Catalog http://www.ibm.com/training

Search Training Finder for “Top Gun”

WebSphere Portlet Factory Wiki http://www-10.lotus.com/ldd/pfwiki.nsf

WebSphere Forums http://www-128.ibm.com/developerworks/forums/wsdd_forums.jspa

Websphere Portlet Factory Documentation Page

http://www-128.ibm.com/developerworks/websphere/zones/portal/portletfactory/proddoc.html

Or use the link for Tutorial #5 on the Start Menu in Windows

Page 20: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 20082020 20

Additional Information and ResourcesWebSphere Portal – IBM Site

http://www-3.ibm.com/software/genservers/portal/

WebSphere Portal Business Solutions Catalog:

http://catalog.lotus.com/wps/portal/portal

WebSphere Portal 6.0 DemoNet

http://docs.dfw.ibm.com/wp6/?DDSPageRequest=/

Product Documentation and WebSphere Portal Wiki

http://www-3.ibm.com/software/genservers/portal/library/

http://www-10.lotus.com/ldd/portalwiki.nsf

Education

http://www-3.ibm.com/software/genservers/portal/education/

Websphere Portal Developer’s Zone

http://www-106.ibm.com/developerworks/websphere/zones/portal/

Page 21: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 20082121 21

Session ID: D23

Session: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

Presenter(s): Michael “Spoon” Witherspoon

Please take a few minutes to fill out the session survey. Thank you

Mark your calendars!Mark your calendars!

2009 U.S. WebSphere Portal Technical Conference2009 U.S. WebSphere Portal Technical ConferenceOctober 12-15, 2009, Sheraton San Diego Hotel and MarinaOctober 12-15, 2009, Sheraton San Diego Hotel and Marina

WebSphere Portal Technical Conference U.S. 2008

Page 22: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

STORY TITLE

WebSphere Portal Technical Conference U.S. 20082222 22

© IBM Corporation 2008 All Rights Reserved.

The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for 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 have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.

References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.

All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer.

IBM, the IBM logo, WebSphere, Lotus, Lotus Notes, Domino, Quickplace, Sametime, Workplace and Quickr are trademarks of International Business Machines Corporation in the United States, other countries, or both.

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

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

Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.

Other company, product, or service names may be trademarks or service marks of others.

All references to Renovations Inc. refer to a fictitious company and are used for illustration purposes only.