SlideShare a Scribd company logo
1 of 39
Download to read offline
Everything is designed,
few things are designed well
Unknown author

BOOTSTRAP & XPAGES:
THE BASICS AND BEYOND
Today’s topics
 What’s Bootstrap
 And more in general: “What is a design framework

and why would you use one?”

 Getting started with Bootstrap in XPages

 Challenges (yes, there are some)
 Bootstrap4XPages plugin

 Themes
 Plugins
Who’s that?
 Freelance consultant/ developer
 IBM Notes/ Domino
 XPages, web, Java, client, mobile

 OpenNTF Board member & contributor
 Auto Logins
 XPage Multiple File Uploader
 XPage Debug Toolbar

 IBM Champion
 Bootstrap4XPages.com
Why a design framework
 Because you want your apps to look good
 And so do your users!

 Consistent UI = easier to use
 So you don’t need to write documentation

 We’re developers
 We’re creative too, but in a different way

 Deal with cross browser issues
What is Bootstrap
So it looks good on all
kinds of devices

Bootstrap is a responsive
design framework to build
websites and/or web applications
So you can make your
work look good – even
as a developer…

FREE
What do you get?
 Layout

 Grids
 Styles
 Icons
 using the Glyphicon font

 Cross-browser

 Responsive
What do you get?
 Easy to use and extend
 And it looks good too (I think)
 Developed by Twitter
 Open source since 2011
 Active community (very)
 One of most popular projects on GitHub
 Sites with themes, plugins, snippets
Bootstrap 3
 Released mid 2013
 Re-built from the ground up
 Mobile first
 Responsive by default (optional in 2.3)

 Changed grid
 Icons are now fonts
 So they scale

 Support for IE 8+
 Older browsers dropped
And the downside?
 It’s Bootstrap

 Once you’ve seen one, you’ve seen them all
 So:

 Be creative
 Use a theme
 Or write your own
Bootstrap files
 Only a couple of JavaScript,

CSS & font files
 Needs jQuery for some

functions
Bootstrap in XPages
 Two methods:
 DIY (Do-it-yourself)

 Use the Bootstrap4XPages plugin
DIY
 Download
 Bootstrap
 jQuery

 Add files to

WebContent folder
 Via the package explorer
 Just drag-n-drop them
DIY
 Create a theme
 jQuery Javascript
 Bootstrap Javascript
 Bootstrap CSS

 Meta “viewport” tag

 Create a layout custom control with your page

layout
 Add an editable control for your content
Demo
Bootstrap4XPages plugin
 OpenNTF project
 Part of OpenNTF Essentials
 http://bootstrap4xpages.openntf.org/

 OSGi plugin that automatically loads the

Bootstrap resources (CSS, JavaScript)
 Uses Custom renderers
 e.g. adds the btn class to all buttons
Bootstrap4XPages plugin
 Support for Bootstrap 2.3.1, 2.3.2 and 3
 Bootstrap 3 support was just released last week

 Requires ExtLib
 Supported on Domino 9
Bootstrap4XPages plugin
 Add to Designer and Server

 Enable plugin in your application
 Set your application’s theme to either
 bootstrapv2.3.1
 bootstrapv2.3.1r
 bootstrapv2.3.1
 bootstrapv2.3.2r
 bootstrapv3.0.0
Demo
Bootstrap4XPages plugin
 Community effort

 You can contribute too!
 Actually… Phil Riand is asking for your help 

 Set up a plugin development environment
 (watch the webinar:

http://www.youtube.com/watch?v=uAff5uNwhn0)

 Fork from GitHub
 Make your changes and create a pull request
Pitfalls with XPages
 Targeting elements using jQuery $();
 Colons need to be escaped
 User Mark Roden’s xSnippet for that
http://openntf.org/XSnippets.nsf/snippet.xsp?id=x-jqueryselector-for-xpages

function x$(idTag, param){
idTag = idTag.replace(/:/gi, ":")+(param ? param : "");
return ($("#"+idTag));
}
Pitfalls with XPages

Resource aggregation & relative paths
 Conditionally load a stylesheet

<resource rendered=“#{javascript:
context.getProperty('xsp.resources.aggregate').equals('true')}">
<content-type>text/css</content-type>
<href>override.css</href>
</resource>}
Pitfalls with XPages
 Use HTML5 DocType
 Set in XSP Properties

 If you want to avoid CSS conflicts, remove the

“extends=“ from your theme
 But you need to style everything
Reusable fields & validation
 Bootstrap requires a lot of HTML for a single

form field
 Add that to a custom control
 For every field on your form: add that custom
control
 Add error class for validation errors
Demo
Themes (not the XPage ones)
 Don’t like the default look? Get a theme
 http://wrapbootstrap.com
 http://bootswatch.com

 Or create one
 http://stylebootstrap.info/

(or go hardcore and use LESS)
Plugins
 Lot of plugins available

 Mostly build on top of jQuery
 With a bit of Bootstrap styling

 Some I really like:
 Select2
 Font awesome
 jQuery File Uploader
Plugins – Select2
 Turns a boring combobox
 Into an advanced search control
 With support for:
 Typeahead-selection
 Static/ dynamic links (using Ajax)
 Markup
 Events
Demo
Select2 - basics
 Download release

 Load select2.min.js and select2.css
 Transform a xp:comboBox using:
<xp:scriptBlock id="scriptBlock2"><xp:this.value><![CDATA[
$(document).ready(
function() {
x$( "#{id:comboBox5}" ).select2();
} );
]]></xp:this.value></xp:scriptBlock>
Select2 – remote data
 Pass query to XAgent style XPage
 XPage performs query, returns JSON formatted

results
 Select2 plugin deals with creating a list based on

your query
Plugins – Font awesome
 Bootstrap 3 comes with

200 Glyphicons
 But no rocket

 Font awesome has 369
 Including a rocket
Plugins – Font awesome
 Only need to load a single CSS file

 But make a small change first:
url('../font/fontawesome-webfont.eot?v=3.2.1');
url('../font/fontawesome-webfont.eot?open&v=3.2.1');
<xp:button styleClass=“btn” value=“Home”>
<i class=“icon-home” />
</xp:button>
Demo
Plugins – jQuery File Upload
 HTML5 multi-file uploader

 Support for:
 Progress bars
 Drag-n-drop

 Client side images resizing

 Browsers:
 Internet Explorer 10+
 Chrome, Firefox
 Mobile browsers
Demo
Plugins – jQuery File Upload
 Added library to database

 Create XAgent XPage that can receive files
 upload.xsp
 eu.linqed.UploadHandler()

 jQuery with Dojo 1.8 can be is hard
 Load jQuery & plugins before anything else
 See http://hasselba.ch/blog/?p=1216
Not enough? There’s more…
 Fuel UX - http://exacttarget.github.io/fuelux/

 Tablecloth - http://tableclothjs.com/
 Jetstrap – http://jetstrap.com
 Paintstrap – http://www.paintstrap.com
 Need inspiration? http://builtwithbootstrap.com/
To summarize
 Stable framework

 Easy to get started with
 Solid backing from a large community
 Lots of resources
 “I’m not a designer” is not an excuse to create a

good looking site
What’s next?
 You’re up.

 http://bootstrap4xpages.openntf.org
 http://Bootstrap4XPages.com
 Going to Connect? Come to my and Phil Riand’s Bootstrap

session!

 Got questions?
 Twitter: @markleusink
 Email: m.leusink@linqed.eu
 Blog: http://linqed.eu

More Related Content

What's hot

Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityTeamstudio
 
IBM Connect 2016 - AD1548 - Building Responsive XPages Applications
IBM Connect 2016 - AD1548 - Building Responsive XPages ApplicationsIBM Connect 2016 - AD1548 - Building Responsive XPages Applications
IBM Connect 2016 - AD1548 - Building Responsive XPages Applicationsbeglee
 
JMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages ScalabilityJMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages ScalabilityTony McGuckin
 
SharePoint Development 101
SharePoint Development 101SharePoint Development 101
SharePoint Development 101Greg Hurlman
 
Rapid application development for WordPress using AWF
Rapid application development for WordPress using AWFRapid application development for WordPress using AWF
Rapid application development for WordPress using AWFTim Plummer
 
Cross CMS plugin development using AWF
Cross CMS plugin development using AWFCross CMS plugin development using AWF
Cross CMS plugin development using AWFTim Plummer
 
Whats new in joomla 3.5 & whats coming in future
Whats new in joomla 3.5 & whats coming in futureWhats new in joomla 3.5 & whats coming in future
Whats new in joomla 3.5 & whats coming in futureTim Plummer
 
Extension developer secrets - How to make money with Joomla
Extension developer secrets - How to make money with JoomlaExtension developer secrets - How to make money with Joomla
Extension developer secrets - How to make money with JoomlaTim Plummer
 
jQuery Chicago 2014 - Next-generation JavaScript Testing
jQuery Chicago 2014 - Next-generation JavaScript TestingjQuery Chicago 2014 - Next-generation JavaScript Testing
jQuery Chicago 2014 - Next-generation JavaScript TestingVlad Filippov
 
JMP402 Master Class: Managed beans and XPages: Your Time Is Now
JMP402 Master Class: Managed beans and XPages: Your Time Is NowJMP402 Master Class: Managed beans and XPages: Your Time Is Now
JMP402 Master Class: Managed beans and XPages: Your Time Is NowRussell Maher
 
State of play for Joomla - Nov 2014
State of play for Joomla - Nov 2014State of play for Joomla - Nov 2014
State of play for Joomla - Nov 2014Tim Plummer
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Edmund Turbin
 
Ako na vlastne WP temy
Ako na vlastne WP temyAko na vlastne WP temy
Ako na vlastne WP temyJuraj Kiss
 
Zimmertwins Presentation
Zimmertwins PresentationZimmertwins Presentation
Zimmertwins PresentationAshok Modi
 
jQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchAppsjQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchAppsBradley Holt
 
XPages Workshop: Customizing OneUI
XPages Workshop: Customizing OneUIXPages Workshop: Customizing OneUI
XPages Workshop: Customizing OneUIMichael McGarel
 
Learn How to Use Atomic Design to Make Your Site Manageable and Adaptable
Learn How to Use Atomic Design to Make Your Site Manageable and AdaptableLearn How to Use Atomic Design to Make Your Site Manageable and Adaptable
Learn How to Use Atomic Design to Make Your Site Manageable and AdaptableAcquia
 
State of jQuery June 2013 - Portland
State of jQuery June 2013 - PortlandState of jQuery June 2013 - Portland
State of jQuery June 2013 - Portlanddmethvin
 
XPages: No Experience Needed
XPages: No Experience NeededXPages: No Experience Needed
XPages: No Experience NeededKathy Brown
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX DesignersAshlimarie
 

What's hot (20)

Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate Usability
 
IBM Connect 2016 - AD1548 - Building Responsive XPages Applications
IBM Connect 2016 - AD1548 - Building Responsive XPages ApplicationsIBM Connect 2016 - AD1548 - Building Responsive XPages Applications
IBM Connect 2016 - AD1548 - Building Responsive XPages Applications
 
JMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages ScalabilityJMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages Scalability
 
SharePoint Development 101
SharePoint Development 101SharePoint Development 101
SharePoint Development 101
 
Rapid application development for WordPress using AWF
Rapid application development for WordPress using AWFRapid application development for WordPress using AWF
Rapid application development for WordPress using AWF
 
Cross CMS plugin development using AWF
Cross CMS plugin development using AWFCross CMS plugin development using AWF
Cross CMS plugin development using AWF
 
Whats new in joomla 3.5 & whats coming in future
Whats new in joomla 3.5 & whats coming in futureWhats new in joomla 3.5 & whats coming in future
Whats new in joomla 3.5 & whats coming in future
 
Extension developer secrets - How to make money with Joomla
Extension developer secrets - How to make money with JoomlaExtension developer secrets - How to make money with Joomla
Extension developer secrets - How to make money with Joomla
 
jQuery Chicago 2014 - Next-generation JavaScript Testing
jQuery Chicago 2014 - Next-generation JavaScript TestingjQuery Chicago 2014 - Next-generation JavaScript Testing
jQuery Chicago 2014 - Next-generation JavaScript Testing
 
JMP402 Master Class: Managed beans and XPages: Your Time Is Now
JMP402 Master Class: Managed beans and XPages: Your Time Is NowJMP402 Master Class: Managed beans and XPages: Your Time Is Now
JMP402 Master Class: Managed beans and XPages: Your Time Is Now
 
State of play for Joomla - Nov 2014
State of play for Joomla - Nov 2014State of play for Joomla - Nov 2014
State of play for Joomla - Nov 2014
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?
 
Ako na vlastne WP temy
Ako na vlastne WP temyAko na vlastne WP temy
Ako na vlastne WP temy
 
Zimmertwins Presentation
Zimmertwins PresentationZimmertwins Presentation
Zimmertwins Presentation
 
jQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchAppsjQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchApps
 
XPages Workshop: Customizing OneUI
XPages Workshop: Customizing OneUIXPages Workshop: Customizing OneUI
XPages Workshop: Customizing OneUI
 
Learn How to Use Atomic Design to Make Your Site Manageable and Adaptable
Learn How to Use Atomic Design to Make Your Site Manageable and AdaptableLearn How to Use Atomic Design to Make Your Site Manageable and Adaptable
Learn How to Use Atomic Design to Make Your Site Manageable and Adaptable
 
State of jQuery June 2013 - Portland
State of jQuery June 2013 - PortlandState of jQuery June 2013 - Portland
State of jQuery June 2013 - Portland
 
XPages: No Experience Needed
XPages: No Experience NeededXPages: No Experience Needed
XPages: No Experience Needed
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 

Similar to Bootstrap and XPages (DanNotes 2013)

jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks TriviaCognizant
 
Techorama 2019 - ASP.NET Core One Hour Makeover
Techorama 2019 - ASP.NET Core One Hour MakeoverTechorama 2019 - ASP.NET Core One Hour Makeover
Techorama 2019 - ASP.NET Core One Hour MakeoverJon Galloway
 
JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4alexsaves
 
J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Libraryrsnarayanan
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterpriseDave Artz
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointRene Modery
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application developmentzonathen
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQueryAlek Davis
 
Joomla Day Austin Part 4
Joomla Day Austin Part 4Joomla Day Austin Part 4
Joomla Day Austin Part 4Kyle Ledbetter
 
jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesMark Roden
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)Doris Chen
 
Frontend Workflow
Frontend WorkflowFrontend Workflow
Frontend WorkflowDelphiCon
 
How to make Ajax Libraries work for you
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for youSimon Willison
 
Building Smart Workflows - Dan Diebolt
Building Smart Workflows - Dan DieboltBuilding Smart Workflows - Dan Diebolt
Building Smart Workflows - Dan DieboltQuickBase, Inc.
 
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...tdc-globalcode
 
Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e bigAndy Peterson
 

Similar to Bootstrap and XPages (DanNotes 2013) (20)

jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks Trivia
 
Techorama 2019 - ASP.NET Core One Hour Makeover
Techorama 2019 - ASP.NET Core One Hour MakeoverTechorama 2019 - ASP.NET Core One Hour Makeover
Techorama 2019 - ASP.NET Core One Hour Makeover
 
JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4
 
J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Library
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] Enterprise
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePoint
 
jQuery
jQueryjQuery
jQuery
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
Joomla Day Austin Part 4
Joomla Day Austin Part 4Joomla Day Austin Part 4
Joomla Day Austin Part 4
 
jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPages
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
 
Frontend Workflow
Frontend WorkflowFrontend Workflow
Frontend Workflow
 
How to make Ajax Libraries work for you
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for you
 
Webpack
Webpack Webpack
Webpack
 
jQuery
jQueryjQuery
jQuery
 
Building Smart Workflows - Dan Diebolt
Building Smart Workflows - Dan DieboltBuilding Smart Workflows - Dan Diebolt
Building Smart Workflows - Dan Diebolt
 
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
 
Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e big
 

More from Mark Leusink

Now what can you really build with DQL and web components?
Now what can you really build with DQL and web components?Now what can you really build with DQL and web components?
Now what can you really build with DQL and web components?Mark Leusink
 
ICON UK 2016: Modernizing an IBM Notes applicaton using with AngularJS
ICON UK 2016: Modernizing an IBM Notes applicaton using with AngularJSICON UK 2016: Modernizing an IBM Notes applicaton using with AngularJS
ICON UK 2016: Modernizing an IBM Notes applicaton using with AngularJSMark Leusink
 
Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Mark Leusink
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...Mark Leusink
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularMark Leusink
 
A 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developersA 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developersMark Leusink
 
Get the best out of Bootstrap with Bootstrap4XPages - Engage 2014
Get the best out of Bootstrap with Bootstrap4XPages - Engage 2014Get the best out of Bootstrap with Bootstrap4XPages - Engage 2014
Get the best out of Bootstrap with Bootstrap4XPages - Engage 2014Mark Leusink
 
Get the best out of Bootstrap with Bootstrap4XPages (AD202)
Get the best out of Bootstrap with Bootstrap4XPages (AD202)Get the best out of Bootstrap with Bootstrap4XPages (AD202)
Get the best out of Bootstrap with Bootstrap4XPages (AD202)Mark Leusink
 
Introduction to Bootstrap (with XPages)
Introduction to Bootstrap (with XPages)Introduction to Bootstrap (with XPages)
Introduction to Bootstrap (with XPages)Mark Leusink
 
Stop (de)bugging me - ICON UK 2013
Stop (de)bugging me - ICON UK 2013Stop (de)bugging me - ICON UK 2013
Stop (de)bugging me - ICON UK 2013Mark Leusink
 
Stop (de)bugging me!
Stop (de)bugging me!Stop (de)bugging me!
Stop (de)bugging me!Mark Leusink
 

More from Mark Leusink (11)

Now what can you really build with DQL and web components?
Now what can you really build with DQL and web components?Now what can you really build with DQL and web components?
Now what can you really build with DQL and web components?
 
ICON UK 2016: Modernizing an IBM Notes applicaton using with AngularJS
ICON UK 2016: Modernizing an IBM Notes applicaton using with AngularJSICON UK 2016: Modernizing an IBM Notes applicaton using with AngularJS
ICON UK 2016: Modernizing an IBM Notes applicaton using with AngularJS
 
Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
 
A 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developersA 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developers
 
Get the best out of Bootstrap with Bootstrap4XPages - Engage 2014
Get the best out of Bootstrap with Bootstrap4XPages - Engage 2014Get the best out of Bootstrap with Bootstrap4XPages - Engage 2014
Get the best out of Bootstrap with Bootstrap4XPages - Engage 2014
 
Get the best out of Bootstrap with Bootstrap4XPages (AD202)
Get the best out of Bootstrap with Bootstrap4XPages (AD202)Get the best out of Bootstrap with Bootstrap4XPages (AD202)
Get the best out of Bootstrap with Bootstrap4XPages (AD202)
 
Introduction to Bootstrap (with XPages)
Introduction to Bootstrap (with XPages)Introduction to Bootstrap (with XPages)
Introduction to Bootstrap (with XPages)
 
Stop (de)bugging me - ICON UK 2013
Stop (de)bugging me - ICON UK 2013Stop (de)bugging me - ICON UK 2013
Stop (de)bugging me - ICON UK 2013
 
Stop (de)bugging me!
Stop (de)bugging me!Stop (de)bugging me!
Stop (de)bugging me!
 

Recently uploaded

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Recently uploaded (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Bootstrap and XPages (DanNotes 2013)

  • 1. Everything is designed, few things are designed well Unknown author BOOTSTRAP & XPAGES: THE BASICS AND BEYOND
  • 2. Today’s topics  What’s Bootstrap  And more in general: “What is a design framework and why would you use one?”  Getting started with Bootstrap in XPages  Challenges (yes, there are some)  Bootstrap4XPages plugin  Themes  Plugins
  • 3. Who’s that?  Freelance consultant/ developer  IBM Notes/ Domino  XPages, web, Java, client, mobile  OpenNTF Board member & contributor  Auto Logins  XPage Multiple File Uploader  XPage Debug Toolbar  IBM Champion  Bootstrap4XPages.com
  • 4. Why a design framework  Because you want your apps to look good  And so do your users!  Consistent UI = easier to use  So you don’t need to write documentation  We’re developers  We’re creative too, but in a different way  Deal with cross browser issues
  • 5. What is Bootstrap So it looks good on all kinds of devices Bootstrap is a responsive design framework to build websites and/or web applications So you can make your work look good – even as a developer… FREE
  • 6. What do you get?  Layout  Grids  Styles  Icons  using the Glyphicon font  Cross-browser  Responsive
  • 7. What do you get?  Easy to use and extend  And it looks good too (I think)  Developed by Twitter  Open source since 2011  Active community (very)  One of most popular projects on GitHub  Sites with themes, plugins, snippets
  • 8. Bootstrap 3  Released mid 2013  Re-built from the ground up  Mobile first  Responsive by default (optional in 2.3)  Changed grid  Icons are now fonts  So they scale  Support for IE 8+  Older browsers dropped
  • 9. And the downside?  It’s Bootstrap  Once you’ve seen one, you’ve seen them all  So:  Be creative  Use a theme  Or write your own
  • 10. Bootstrap files  Only a couple of JavaScript, CSS & font files  Needs jQuery for some functions
  • 11. Bootstrap in XPages  Two methods:  DIY (Do-it-yourself)  Use the Bootstrap4XPages plugin
  • 12. DIY  Download  Bootstrap  jQuery  Add files to WebContent folder  Via the package explorer  Just drag-n-drop them
  • 13. DIY  Create a theme  jQuery Javascript  Bootstrap Javascript  Bootstrap CSS  Meta “viewport” tag  Create a layout custom control with your page layout  Add an editable control for your content
  • 14. Demo
  • 15. Bootstrap4XPages plugin  OpenNTF project  Part of OpenNTF Essentials  http://bootstrap4xpages.openntf.org/  OSGi plugin that automatically loads the Bootstrap resources (CSS, JavaScript)  Uses Custom renderers  e.g. adds the btn class to all buttons
  • 16. Bootstrap4XPages plugin  Support for Bootstrap 2.3.1, 2.3.2 and 3  Bootstrap 3 support was just released last week  Requires ExtLib  Supported on Domino 9
  • 17. Bootstrap4XPages plugin  Add to Designer and Server  Enable plugin in your application  Set your application’s theme to either  bootstrapv2.3.1  bootstrapv2.3.1r  bootstrapv2.3.1  bootstrapv2.3.2r  bootstrapv3.0.0
  • 18. Demo
  • 19. Bootstrap4XPages plugin  Community effort  You can contribute too!  Actually… Phil Riand is asking for your help   Set up a plugin development environment  (watch the webinar: http://www.youtube.com/watch?v=uAff5uNwhn0)  Fork from GitHub  Make your changes and create a pull request
  • 20. Pitfalls with XPages  Targeting elements using jQuery $();  Colons need to be escaped  User Mark Roden’s xSnippet for that http://openntf.org/XSnippets.nsf/snippet.xsp?id=x-jqueryselector-for-xpages function x$(idTag, param){ idTag = idTag.replace(/:/gi, ":")+(param ? param : ""); return ($("#"+idTag)); }
  • 21. Pitfalls with XPages Resource aggregation & relative paths  Conditionally load a stylesheet <resource rendered=“#{javascript: context.getProperty('xsp.resources.aggregate').equals('true')}"> <content-type>text/css</content-type> <href>override.css</href> </resource>}
  • 22. Pitfalls with XPages  Use HTML5 DocType  Set in XSP Properties  If you want to avoid CSS conflicts, remove the “extends=“ from your theme  But you need to style everything
  • 23. Reusable fields & validation  Bootstrap requires a lot of HTML for a single form field  Add that to a custom control  For every field on your form: add that custom control  Add error class for validation errors
  • 24. Demo
  • 25. Themes (not the XPage ones)  Don’t like the default look? Get a theme  http://wrapbootstrap.com  http://bootswatch.com  Or create one  http://stylebootstrap.info/ (or go hardcore and use LESS)
  • 26. Plugins  Lot of plugins available  Mostly build on top of jQuery  With a bit of Bootstrap styling  Some I really like:  Select2  Font awesome  jQuery File Uploader
  • 27. Plugins – Select2  Turns a boring combobox  Into an advanced search control  With support for:  Typeahead-selection  Static/ dynamic links (using Ajax)  Markup  Events
  • 28. Demo
  • 29. Select2 - basics  Download release  Load select2.min.js and select2.css  Transform a xp:comboBox using: <xp:scriptBlock id="scriptBlock2"><xp:this.value><![CDATA[ $(document).ready( function() { x$( "#{id:comboBox5}" ).select2(); } ); ]]></xp:this.value></xp:scriptBlock>
  • 30. Select2 – remote data  Pass query to XAgent style XPage  XPage performs query, returns JSON formatted results  Select2 plugin deals with creating a list based on your query
  • 31. Plugins – Font awesome  Bootstrap 3 comes with 200 Glyphicons  But no rocket  Font awesome has 369  Including a rocket
  • 32. Plugins – Font awesome  Only need to load a single CSS file  But make a small change first: url('../font/fontawesome-webfont.eot?v=3.2.1'); url('../font/fontawesome-webfont.eot?open&v=3.2.1'); <xp:button styleClass=“btn” value=“Home”> <i class=“icon-home” /> </xp:button>
  • 33. Demo
  • 34. Plugins – jQuery File Upload  HTML5 multi-file uploader  Support for:  Progress bars  Drag-n-drop  Client side images resizing  Browsers:  Internet Explorer 10+  Chrome, Firefox  Mobile browsers
  • 35. Demo
  • 36. Plugins – jQuery File Upload  Added library to database  Create XAgent XPage that can receive files  upload.xsp  eu.linqed.UploadHandler()  jQuery with Dojo 1.8 can be is hard  Load jQuery & plugins before anything else  See http://hasselba.ch/blog/?p=1216
  • 37. Not enough? There’s more…  Fuel UX - http://exacttarget.github.io/fuelux/  Tablecloth - http://tableclothjs.com/  Jetstrap – http://jetstrap.com  Paintstrap – http://www.paintstrap.com  Need inspiration? http://builtwithbootstrap.com/
  • 38. To summarize  Stable framework  Easy to get started with  Solid backing from a large community  Lots of resources  “I’m not a designer” is not an excuse to create a good looking site
  • 39. What’s next?  You’re up.  http://bootstrap4xpages.openntf.org  http://Bootstrap4XPages.com  Going to Connect? Come to my and Phil Riand’s Bootstrap session!  Got questions?  Twitter: @markleusink  Email: m.leusink@linqed.eu  Blog: http://linqed.eu