Presentation on theme: "Getting Started with XPages Presented by Jeff Byrd."— Presentation transcript:
Getting Started with XPages Presented by Jeff Byrd
Agenda Who am I XPages Resources What are XPages Why Use XPages XPages Design Elements XPages CRUD XPages Template
Jeff Byrd Senior Developer at MAXIMUS Inc. Lotus Notes developer since ver. 3. Blogger at ◦ Current series is “Roll Your Own Rest Service”. Developing xPages for 2 Years.
XPages Resources ◦ Created by David Leedy ◦ 27 + hours of FREE videos on XPages ◦ Check out “Introduction to XPages” Xpages.info ◦ Daily aggregate of XPages blogs ◦ XPages Snippets OpenNTF.org – Free Source Code PlanetLotus.org StackOverflow.com – Filter for XPages The Rabbit Hole – ( nathantfreeman.wordpress.com) ◦ Taming IBM Domino Designer
Why Use XPages? Separates UI from Data ◦ Allows multiple Data sources per Page ◦ Easy access to data from other databases Improves Data capabilities ◦ from inside a view Similar to a JOIN in relational DB’s. ◦ Use Java Objects (Beans) as data source ◦ Iterate your data anyway you want via “Repeat Control” Runs inside Notes Client (XPiNC - XPages in Notes Client) ◦ Replicate your web applications.
New Design Elements XPage ◦ Similar to Notes Form But not really as you can have none or multiple datasources Data source can be: NotesDocuments, NotesViews,Java Beans, and more... ◦ It’s often used more as a container to hold custom controls Custom Control ◦ Similar to Subform But not really as you can have none or multiple datasources Just like XPages Can be used more then once on a page Can accept Parameters that you define later Allows high reusability ◦ Can not be viewed in the browser. They only work on an XPage ◦ Often Custom Controls are used to contain the graphical layout of your app
Scoped Variables ◦ In memory objects to store data ◦ No need to rely on cookies / URL parsing but you still can if you want applicationScope ◦ Like a database profile document ◦ Available to all users Store Application settings and common lookups that all users need sessionScope ◦ Life of the user session Store things specific to the user. Preferences, shopping cart, etc...
Scoped Variables viewScope ◦ Life of the current Page Store value of a current search, or items from a particular document requestScope ◦ Life of a single request ◦ Very short - just for data you’re currently processing Do NOT try and put Domino Objects (document, view, etc...) in Scope ◦ They will likely get recycled when you least expect it. ◦ For a document, just store a UNID as a string and grab the document again
Building an Application I’m using Domino and Designer ◦ Latest version is 9.0 ◦ Do not try Xpages development with any version below version and you should be using the Update Pack or OpenNTF Extension Library Update Pack is available from IBM for 8.5. Ext. Library is at What is the Update Pack / Extension Library? ◦ They are add-ons to the Domino Server / Designer ◦ Adds over 50 new tools and controls designed to speed up your application Tools for layout, Dojo integration, etc. Application layout control. ◦ Extends the core product without having to wait for next version
Sample Application Let’s build a quick Contacts Application ◦ One Form – Contact ◦ One View – Contacts ◦ Custom Control – frmContact ◦ Custom Control – vwContacts ◦ xPage – Contact.xsp ◦ xPage – Contacts.xsp ◦ Theme – Blueprint CSS
But there’s more! Things we haven’t talked about Server Side Java Script (SSJS) Client Side Java Script (CSJS) Repeat Controls Managed Beans Java!