The xsp starter kit

Embed Size (px)

Citation preview

The XSP Starter Kit

Stephan H. Wissel | NotesSensei | IBM

Agenda

What is it

Installation

Module overview

About Me

IBM Collaboration & Productivity Advisor

Counsellor for personcentric development

IBM Singapore Pte Ltd

Blog: http://www.wissel.net/

Twitter: notessensei

Google: http://www.wissel.net/+

Lotus Notes since 2.1

Favorite motorbike: Moto Guzzi Le Mans

Speaks Singlish with a German accent

About You*

Develop software
(or need to know about it)

Have a Java background
(or heard about it)

Want to advance XPages development
(or let develop)

Love Code deep dives
(your dog's name is Eclipse)

Just are a fan
(welcome back)

* 2 out of 5 qualify you

Really about you

This session

XPage application development

XSP Starter Kit

Agenda

What is it

Installation

Module overview

Work in progress

New releases coming often

Rough edges

Eclipse experience required

Global Architecture

Eclipse
Workspace

Domino Server

NSF files

Eclipse directly reads/writes to the NSF thanks to a custom EFS

Domino Designer in Eclipse

The runtime directly reads from the NSF

Notes Client

NSF replication

Supports both the Domino server and the
rich client

Supports the data and the design elements
replication

J2EE Artifacts

XPages Architecture 8.5.2++

Domino HTTP Task

OSGi Runtime

XPages
Runtime

NSF Applications

XPages Extensions
OSGi bundles

Notes Client Process

OSGi Runtime

XPages
Runtime

XPD Profile
+Web Container

XPD Profile

Domino Server

Notes Client

NSF Applications

Both the Domino server and the Notes client are deployed as OSGi bundles
The same extension mechanism is used in both platforms; extensions are provided as OSGi bundles.

XPages Extensions
OSGi bundles

JSF Processing Model

http://www.ibm.com/developerworks/java/library/j-jsf2/

What you need

http://eclipse.org

Eclipse (current version is Indigo 3.7)

http://openntf.org

XPages SDK for Eclipse RCP (Nathan Freeman, GBS)

XPages Starterkit (Nathan Freeman, GBS)

Domino Debug Plug-in (David Taieb, IBM)

http://ibm.com

Domino Designer

Domino server

Oracle

JSF Know-How

Works on Mac/Linux too!

What you read

The Classic

Just released

Coming soon

Agenda

What is it

Installation

Module overview

Installation

Extract Eclipse version to disk

Configure Eclipse

Edit eclipse.ini:
From: -Xms40m -Xmx512m
To: -Xms512m -Xmx1024m

Start Eclipse, select workspace

Add Plug-ins

Unzip com.ibm.domino.osgi.debug.site.zip from
IBM Domino Debug Plugin build.zip

Help Install new Software

Add new sites
- com.ibm.domino.osgi.debug.site.zip

- org.openntf.xsp.sdk.update.zip

Uncheck: Group by category

Add Plug-ins

Reboot after install

Configure Target Platform

One for Notes, one for Domino

Configure Domino Debug setup

2 settings needed

OSGi Debug to make plug-in available

Remote Java to actually debug

Remote SSJS is future

Create new OSGi Debug configuration

Details in Plug-in documentation

Debug configuration

Debug configuration

JavaDoc for XSP

www.ibmpressbooks.com/title/9780132486316/XPages_JavaDoc_852.zip

JavaDoc from ExtLib

Even more debug configuration!

Add to Notes.ini:
JavaEnableDebug=1
JavaDebugOptions=transport=dt_socket,
server=y,suspend=n,address=8000

Eclipse parameter need to match

Create the project

File New Plug-in Project

Creating a library

File New Other XSP SDK XPages Library

Wouldn't it be nice
if you don't have to
start from scratch?

Agenda

What is it

Installation

Module overview

Modules

Application

Beans

Components

Context

Expression Language

LiveCycle

Listeners

RenderKit

Resolver

Resources

Servlet

SSJS

Application

The god objects

Beans

Alternative to SSJS stored in a scope

Java classes with an empty constructor

Method pairs with get/set

public String getApprover() { }

public void setApprover(String newApprover) { . }

Very usable in Expression language (EL) #{beanName.approver}

Starter kit adds sample for Server context - not available in SSJS!

Components

The core of UI experience

Create new tags (JSP tags)

Knows properties and how to save/restore them

Delegates rendering to a Renderer

Renderer & Renderkit

Renderkit is a collection of Renderers

Problem of potentially leaking implementation

Context

Interface from JSF to J2EE servlet implementation

Custom application wide actions (e.g. request logging)

Filters go there

Expression Language

XPages uses javascript: as additional binding

Method and Value binding allow to implement additional language bindings. A few ideas:

Jython

LUA

Rhino

Direct Java calls

Lolcode

LiveCycle

Intercept and extend the standard lifecycle.

Interesting for custom phase listeners

Listeners

React on events in the application live cycle: creation and deletion of things

Application start/stop

Context (runs always on a request)

Phase (JSF processing model! - not all phases need to run)

Session (finally the when has he logged out question answered)

Value changed (back-end of course!)

Resolver

Intercept when variables or properties get resolved

e.g add other language bindings than javascript:

Resources

Anything that is static addressable via an URL

Lives under .ibmxspres

Ideas:

Images that render based on device or network (yes the IP address would give it away when you are mobile)

Variations of documents based on a user role

Additional JavaScript libraries (I'm waiting for jquery)

Servlet

Bypass the JSF rendering completely

Provide their own URL

e.g. DominoWebDAV

Servlet configuration required

SSJS

Provide system wide JavaScript libraries

Would be a good place for common.js

Define new system wide global objects

Thank you!

FILL IN YOUR SESSIONEVALUATIONS*

* or a kitten must die!

Legal disclaimer

IBM Corporation 2012. 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 IBMs 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 IBMs 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. Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual 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 have achieved. Actual environmental costs and performance 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. Unyte 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 Systems Incorporated in the United States, and/or other countries.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.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 service names may be trademarks or service marks of others.: All references to a fictitious company refer to a fictitious company and are used for illustration purposes only.

2012 IBM Corporation

Click to edit the outline text format

Second Outline Level

Third Outline Level

Fourth Outline Level

Fifth Outline Level

Sixth Outline Level

| 2012 IBM Corporation

Click to edit the outline text format

Second Outline Level

Third Outline Level

Fourth Outline Level

Fifth Outline Level

Sixth Outline Level

| 2012 IBM Corporation

Click to edit the outline text format

Second Outline Level

Third Outline Level

Fourth Outline Level

Fifth Outline Level

Sixth Outline Level

| 2012 IBM Corporation