11.07.2015 Views

What is an XPage? - LSBG

What is an XPage? - LSBG

What is an XPage? - LSBG

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Xpages workshop 9. og 10. November 2010Vidar Svendsen | Lotus Techsale


<strong>XPage</strong>s workshop 9. og 10. november 2010●Velkommen●Intro●Runden●Hva vi skal gjennom I dag:09:00 Start, Kaffe12:00 lunsj13:00 frukt, kaffe16:00 ferdig for i dag2


Intro●Vidar Svendsen●Lotus Techsale fra 2009●ISSL konsulent/utvikler fra 2000 til 2009●Vidar.Svendsen@no.ibm.com●Mobil: 41 53 53 083


“runden”●●●HvemHvaHvor●T<strong>an</strong>ker rundt bruk av Xpages4


Hva vi skal gjennom●●●●xpages bakgrunn, prinsipperØvelserØvelserØvelser●●●Av<strong>an</strong>serte xpages tipsØvelserØvelser5


<strong>XPage</strong>s Continues Its Way!2009Domino 8.5- First release of <strong>XPage</strong>s- Runs on the Dominoserver2010Notes/Domino 8.5.1Notes/Domino 8.5.x• - Stability/perform<strong>an</strong>ce•improvements- Runs within the Notes client••- Better client integration- Generates iWidget••- Fixing pending- Active Content Filtering•<strong>is</strong>sues/requests- Perform<strong>an</strong>ce/scalability• - ExtensibilityimprovementsLater...Notes/Domino next• - <strong>XPage</strong>s next generation•- Consumes/generates RESTservices•- Generates Dojo based UI•- Adv<strong>an</strong>ced set of Webcontrols• - Full client integration• - Mobile devices support• - Integration with other Lotusproducts•- Quickr, Connections,Sametime• - More data sources (RDBMS...)• - iWidget consumptionThe information on the new product <strong>is</strong> intended to outline our general product direction <strong>an</strong>d it should not be relied on in making a purchasing dec<strong>is</strong>ion. Theinformation on the new product <strong>is</strong> for informational purposes only <strong>an</strong>d may not be incorporated into <strong>an</strong>y contract. The information on the new product <strong>is</strong> not acommitment, prom<strong>is</strong>e, or legal obligation to deliver <strong>an</strong>y material, code or functionality. The development, release, <strong>an</strong>d timing of <strong>an</strong>y features or functionalitydescribed for our products remains at our sole d<strong>is</strong>cretion6


Why <strong>XPage</strong>s?●●●●Separation of data <strong>an</strong>d presentation▬▬Build multiple presentations to the same document storeCreate web, Notes <strong>an</strong>d mobile interfacesNew user functionality▬▬▬▬Type-aheadPartial page refreshCombine data from multiple views/sourcesBreak out of Domino presentation norms (navigator + view)Cons<strong>is</strong>tent user interface▬▬▬Deep CSS integration in UI controlsApply CSS styles <strong>an</strong>d themes (themes are higher-level org<strong>an</strong>izations of CSSs)Reuse CSS from ex<strong>is</strong>ting web appsReduction in development costs▬▬▬Use highly flexible UI controlsCreate cle<strong>an</strong>er solutions that are inherently less costly to produce <strong>an</strong>d maintainAvoid hacks7


Why <strong>XPage</strong>s?●Leverages Notes/Domino strengths:▬▬▬▬▬Security;▬▬▬User identificationEncryptionAccess controlReplicationOffline accessClusteringNotes object store●Why <strong>is</strong> th<strong>is</strong> import<strong>an</strong>t?▬<strong>XPage</strong>s <strong>is</strong> a modern, very compelling presentation tool. But look what it's sitting on! There's areason comp<strong>an</strong>ies have 1000s of apps – Domino works. The question of whether to use <strong>XPage</strong>s<strong>is</strong>n't a presentation one, it's a question of whether the app fits Domino's document-centric storagemodel. If so, <strong>XPage</strong>s <strong>is</strong> a VERY compelling choice. We've beaten .NET in a bake-off.8


Why <strong>XPage</strong>s?●Some interesting things you c<strong>an</strong> do over Notes development:▬▬▬▬▬▬▬▬▬▬hide/when on individual controldynamic HTMLleverage 3rd party controlsauto type-aheadauto validation based on regexseparate presentation from datamultiple presentations for multiple conditionsstylingshare code easily (post <strong>XPage</strong> or custom control to blog)localize using st<strong>an</strong>dard properties files9


<strong>XPage</strong>s Basics●●●●●IDE<strong>What</strong> <strong>is</strong> <strong>an</strong> <strong>XPage</strong>?Data SourcesControlsScript10


IDE11


<strong>What</strong> <strong>is</strong> <strong>an</strong> <strong>XPage</strong>?●●●●XML documentMarkup <strong>an</strong>d controls aggregated together on a page▬Component have properties, events <strong>an</strong>d c<strong>an</strong> emit markupMarkup <strong>an</strong>d components compiled to Java <strong>an</strong>d executed in Domino's (orNotes client's) servlet containerCompilation happens in IDE12


Server Architecture13


Client Architecture14


Data SourcesDocument <strong>an</strong>d View Data Sources are buffersbetween controls <strong>an</strong>d real Domino document<strong>an</strong>d view objectsDominoDocumentData SourceNSFDominoViewData SourceNSF………Extendiblearchitecture allowsnew data sourcesto be added later,e.g. relational dbs,web services, etc.15


Controls●●●●Core Controls▬Edit Box, Check Box, Button, Computed Field,etc.Container Controls▬▬▬▬P<strong>an</strong>el, Table, View, Data Table, Section, RepeatContain other controlsSome c<strong>an</strong> be bound to Data Sources (View,Data Table, Repeat)P<strong>an</strong>els often used to group controls for applyingstyles, partial refresh, v<strong>is</strong>ibility, etc.Properties▬▬▬Events▬▬Name, v<strong>is</strong>ibility, style, width, height, binding, …Some properties exposed in UIRest are exposed in All Propertiesonclick, onch<strong>an</strong>ge, …onclick used most often, in Links <strong>an</strong>d Buttons16


Script●●Client-side script▬▬▬▬Normal browser JavaScriptalert(“Hello World”);Access to global objects like window, documentUse expression to resolve DOM Ids on controls▬▬<strong>XPage</strong>s generates unique IDs for its elementsResolve DOM ID with expression #{id:control_name}Server-side script▬▬▬▬●example: document.getElementById("#{id:inputText1}");Execute logic server-sideGlobal objects (Notes <strong>an</strong>d XSP)▬session, database, currentDocument, …C<strong>an</strong> call Java seamlesslyMost of your <strong>XPage</strong>s development will be server-side JavaScript (SSJS)17


<strong>XPage</strong>s Development Model<strong>XPage</strong>sarchitectureDrag & dropapplicationbuilding using<strong>XPage</strong>sJavaScriptlibraries <strong>an</strong>dcustom controlsIntegration ofJavalibraries/classesUse m<strong>an</strong>agedbe<strong>an</strong>s <strong>an</strong>dadv<strong>an</strong>cedextensionsAdv<strong>an</strong>ced users withdevelopment skillsUse the<strong>XPage</strong>s nativeAPIJava developers<strong>XPage</strong>s Extensibility API8.5.xPower users18


From good old notes app to xpages app19


Tr<strong>an</strong>slate Classic Notes to <strong>XPage</strong>sNotes artifactNotes FormNotes Subform<strong>XPage</strong>s artifact<strong>XPage</strong> <strong>an</strong>d a serverside JS librarywith a governing JS object, CustomControlCustom controlNotes View<strong>XPage</strong> with embedded view


Tr<strong>an</strong>slate Classic Notes to <strong>XPage</strong>sNotes artifactView ActionsNotes fieldsNotes tablesNotes tabbedtableHide whenformula<strong>XPage</strong>s artifactCustom control with unordered l<strong>is</strong>t(ul) of action links, server side JSlibraryControls with data bindingTable controlTab control in conjunctions withcontent p<strong>an</strong>elsv<strong>is</strong>ibility formula in conjunctionwith a page wide governing object


Tr<strong>an</strong>slate Classic Notes to <strong>XPage</strong>sNotes artifactSingle p<strong>an</strong>el tableSectionText fieldsAccess controlledsectionButton, Color pick.Lotus Script client<strong>XPage</strong>s artifactaccordeon containercombination of 2 p<strong>an</strong>els <strong>an</strong>d 2 images <strong>an</strong>d<strong>an</strong> action to exp<strong>an</strong>d/collapse (Dojo)Input boxes or Dijit Text Area.custom control build of 3 p<strong>an</strong>elsButton, Dijit Color pickerJavaScript functions


Tr<strong>an</strong>slate Classic Notes to <strong>XPage</strong>sNotes artifact<strong>XPage</strong>s artifactRichText Mime Based RichTextNames (+Au,+Re)Custom control with name pickerFramesets Dropped for Ajax UIOutlines L<strong>is</strong>ts of links styled with CSSEmbedded views views in a <strong>XPage</strong>Pages<strong>XPage</strong>sAgentAgents called from a <strong>XPage</strong> event


JSF Processing Modelhttp://www.ibm.com/developerworks/java/library/j-jsf2/24


Øvelser...25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!