Contenu connexe
Similaire à The xsp starter kit (20)
Plus de Stephan H. Wissel (6)
The xsp starter kit
- 1. The XSP Starter Kit
Stephan H. Wissel | NotesSensei | IBM
© 2012 IBM Corporation
- 3. 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
3 | © 2012 IBM Corporation
- 4. 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
4 | © 2012 IBM Corporation
- 9. Work in progress
New releases coming often
Rough edges
Eclipse experience required
9 | © 2012 IBM Corporation
- 10. Global Architecture
Supports both the Domino server and the
rich client
Supports the data and the design elements
replication
Domino Server Notes Client
The runtime directly reads
from the NSF
Domino Designer in Eclipse
NSF files
NSF replication
Eclipse
Workspace
Eclipse directly reads/writes to the NSF
thanks to a custom EFS
10 | © 2012 IBM Corporation
- 11. J2EE Artifacts
C li e n t R e q u e s t
D o m in o H T T P S e rv e r
X P a g e s S e r v le t E n g i n e 2 . 4 s e r v le t e n g i n e
V i r t u a l J 2 E E m o d u le s
N o W A R d e p lo y m e n t
re q u ire d
T h e s e r v e r d ir e c tly r e a d s
th e d e s ig n e le m e n ts fr o m
th e N S F d a ta b a s e
N S F d a ta b a s e c o n ta in in g th e d e s ig n
e le m e n t s & t h e d a t a
11 | © 2012 IBM Corporation
- 12. XPages Architecture – 8.5.2++
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.
NSF Applications NSF Applications
XPages Extensions
OSGi bundles
XPages Extensions
OSGi bundles
XPD Profile XPages XPD Profile XPages
Runtime +Web Runtime
Container
OSGi Runtime OSGi Runtime
Domino HTTP Task Notes Client Process
Domino Server Notes Client
| © 2012 IBM Corporation
12
- 13. JSF Processing Model
http://www.ibm.com/developerworks/java/library/j-jsf2/
13 | © 2012 IBM Corporation
- 14. What you need
http://eclipse.org
Eclipse (current version is Indigo 3.7)
http://openntf.org
Works on Mac/Linux too!
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
14 | © 2012 IBM Corporation
- 15. What you read
The “Classic” Just released Coming soon
15 | © 2012 IBM Corporation
- 19. 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
19 | © 2012 IBM Corporation
- 22. 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
22 | © 2012 IBM Corporation
- 26. 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
26 | © 2012 IBM Corporation
- 29. Wouldn't it be nice
if you don't have to
start from scratch?
29 | © 2012 IBM Corporation
- 33. 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!
| © 2012 IBM Corporation
- 34. Components
The core of UI experience
Create new tags (JSP tags)
“Knows” properties and how to save/restore them
Delegates rendering to a Renderer
| © 2012 IBM Corporation
- 36. Context
Interface from JSF to J2EE servlet implementation
Custom application wide actions (e.g. request logging)
Filters go there
| © 2012 IBM Corporation
- 37. 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
| © 2012 IBM Corporation
- 39. 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!)
| © 2012 IBM Corporation
- 41. 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)
| © 2012 IBM Corporation
- 42. Servlet
Bypass the JSF rendering completely
Provide their own URL
e.g. DominoWebDAV
Servlet configuration required
| © 2012 IBM Corporation
- 43. SSJS
Provide system wide JavaScript libraries
Would be a good place for common.js
Define new system wide global objects
| © 2012 IBM Corporation
- 44. 44 | © 2012 IBM Corporation
- 45. Thank you!
FILL IN YOUR SESSION
EVALUATIONS*
45 | © 2012 IBM Corporation
* or a kitten must die!
- 46. 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 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.
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.
46 | © 2012 IBM Corporation