SlideShare a Scribd company logo
Java and XPages
MVC
Software architectural pattern.
Divides an application into three interconnected parts.
Separates internal representations of information from the ways information is presented
to the user.
Model: 
These are your Java objects that contain and manipulate the data from the database and 
implement business rules for managing that data.
View: 
These are your presentation Java objects. Mostly a 1-to-1 relationship between an XPage 
(graphical view) and a related view Bean.
Controller: 
This middle layer is the JSF API. No code is written here by the developer of JSF applications 
(including XPages). This is the FacesServlet.
MVC Diagram
Components we will run into and their role in
MVC
FacesServlet
● Part of Controller in MVC
● Core of the JSF architecture, part of the web application server (Domino) API
– E.g. renders the XPage
– E.g. receives requests from a XPage
– E.g. creates & updates Managed Beans
● Already setup for us by IBM. We do not write code for FacesServlet :::
XPages
● Sounds familiar :::
● Part of View in MVC
– E.g. controls the look and feel of your web page
– E.g acts as the set of instructions for the FacesServlet to do its job.
● All of those tags/controls you place on the XPage have related Java code behind the
scenes.
– Simple as HTML rendering information
– Or complex processing instructions for datasets
– All executed by the FacesServlet
Managed Bean
● Part of View in MVC
● Simplified: a set of instructions for the FacesServlet to process
● XPages does nothing to or with a Managed Bean
● XPages stores only references to a Managed Bean
– Tells FacesServlet to place data in the HTML
– Tells to store data in the Managed Bean
● Acts as the client to the Façade
Example: EmployeeBean
● Primary goal to work only at the View layer
● Should not contain data processing business logic
– Delegate this to the Model layer
CRUD Facade
● Part of Model in MVC
● Enclose the business logic of retrieving data from the system
– Create Read Update Delete actions
● Provides a client interface to a logically grouped set of instructions executed on other
Java objects.
– Managed Bean is the client 
– Low level work and instructions are delegated to classes that make up the Data
Access Objects
● Example: EmployeeCRUDFacade
Data Access Object (DAO) – Interface
● Part of Model in MVC
● Sort of contract:
– Common methods that each DAO must implement
– From ”application point of view”, not from the system or database.
– The client (Facade) can always expect to run the same method, regardless
underlying database (Domino, Oracle, SQL)
● Example: EmployeeDOA
Data Access Object (DAO) - Database
● Describes how to access the data from ”database point of view”
● Domino:
– Database (NSF)
– Views
– Collections
– Notes document
– Fields etcetera
● Example: DominoEmployeeDOA
Data object class
● Part of Model in MVC
● Low(est) level description of data/object e.g. an employee
● Contains properties (~ fields) and methods (getter and setters for fields)
● Contains no real logic
Everything in a diagram
Java classes & conventions
● Objects represented by classes
● Resides in a package (~ folder):
– Toplevel domain.domain.application/project.folder.object
– E.g. se.acme.project.model.employee.class
●
● *1 Class names starts with capital e.g. Employee.class
● *2 Package resides in WebContent/WEB-INF/src folder
Documentation:
*1) http://www.oracle.com/technetwork/java/codeconventions-135099.html
*2) https://www-10.lotus.com/ldd/ddwiki.nsf/dx/Creating_a_Java_Control_in_an_NSF

More Related Content

What's hot (20)

PPTX
CollabSphere 2018 - Java in Domino After XPages
Jesse Gallagher
 
PPTX
Project Presentation on Advance Java
Vikas Goyal
 
PDF
Test Driven Development with JavaFX
Hendrik Ebbers
 
PPTX
Maven
Khan625
 
PPSX
Maven Presentation - SureFire vs FailSafe
Holasz Kati
 
PPTX
Apache maven 2 overview
Return on Intelligence
 
PDF
Play Framework workshop: full stack java web app
Andrew Skiba
 
PPTX
Maven plugins, properties en profiles: Advanced concepts in Maven
Geert Pante
 
PDF
Maven tutorial for beginners
inTwentyEight Minutes
 
PPTX
Introduction to Maven
Onkar Deshpande
 
PDF
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
Paul Withers
 
PDF
Jdc 2010 - Maven, Intelligent Projects
Mert Çalışkan
 
PDF
Preparing your code for Java 9
Deepu Xavier
 
PDF
Intelligent Projects with Maven - DevFest Istanbul
Mert Çalışkan
 
PDF
vJUG - The JavaFX Ecosystem
Andres Almiray
 
PDF
Apache DeltaSpike the CDI toolbox
Antoine Sabot-Durand
 
PPTX
Maven tutorial
Dragos Balan
 
PPTX
Introduction to maven
Manos Georgopoulos
 
PDF
JavaFX Uni Parthenope
Emanuela Giannetta
 
CollabSphere 2018 - Java in Domino After XPages
Jesse Gallagher
 
Project Presentation on Advance Java
Vikas Goyal
 
Test Driven Development with JavaFX
Hendrik Ebbers
 
Maven
Khan625
 
Maven Presentation - SureFire vs FailSafe
Holasz Kati
 
Apache maven 2 overview
Return on Intelligence
 
Play Framework workshop: full stack java web app
Andrew Skiba
 
Maven plugins, properties en profiles: Advanced concepts in Maven
Geert Pante
 
Maven tutorial for beginners
inTwentyEight Minutes
 
Introduction to Maven
Onkar Deshpande
 
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
Paul Withers
 
Jdc 2010 - Maven, Intelligent Projects
Mert Çalışkan
 
Preparing your code for Java 9
Deepu Xavier
 
Intelligent Projects with Maven - DevFest Istanbul
Mert Çalışkan
 
vJUG - The JavaFX Ecosystem
Andres Almiray
 
Apache DeltaSpike the CDI toolbox
Antoine Sabot-Durand
 
Maven tutorial
Dragos Balan
 
Introduction to maven
Manos Georgopoulos
 
JavaFX Uni Parthenope
Emanuela Giannetta
 

Similar to Java and XPages (20)

ODP
MVC and IBM XPages - from #DanNotes in Korsør (DK) 28 November 2013
John Dalsgaard
 
PPT
Metamorphosis from Forms to Java: A technical lead's perspective, part II
Michael Fons
 
PPT
MVC
akshin
 
ODP
MVC and IBM XPages - from #DanNotes in Korsør (DK) 28 November 2013
John Dalsgaard
 
PPTX
Jsp with mvc
vamsitricks
 
PPTX
Jsf
Esraa Yaseen
 
PDF
MVC
Ravi Bansal
 
PPT
Mvc architecture
Surbhi Panhalkar
 
PDF
MVC Seminar Presantation
Abhishek Yadav
 
PPTX
An Introduction To Model  View  Controller In XPages
Ulrich Krause
 
PDF
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET Journal
 
PPSX
Software Design Patterns
alkuzaee
 
PDF
A guide to ADF fusion development
DataNext Solutions
 
PDF
JMP402 Master Class: Managed beans and XPages: Your Time Is Now
Russell Maher
 
PPTX
MWLUG 2015 - An Introduction to MVC
Ulrich Krause
 
PPTX
Jsf presentation
Ashish Gupta
 
PDF
IRJET- A Study Focused on Web Application Development using MVC Design Pa...
IRJET Journal
 
PDF
A study of mvc – a software design pattern for web application development
IAEME Publication
 
ODP
Mvc
abhigad
 
MVC and IBM XPages - from #DanNotes in Korsør (DK) 28 November 2013
John Dalsgaard
 
Metamorphosis from Forms to Java: A technical lead's perspective, part II
Michael Fons
 
MVC
akshin
 
MVC and IBM XPages - from #DanNotes in Korsør (DK) 28 November 2013
John Dalsgaard
 
Jsp with mvc
vamsitricks
 
Mvc architecture
Surbhi Panhalkar
 
MVC Seminar Presantation
Abhishek Yadav
 
An Introduction To Model  View  Controller In XPages
Ulrich Krause
 
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET Journal
 
Software Design Patterns
alkuzaee
 
A guide to ADF fusion development
DataNext Solutions
 
JMP402 Master Class: Managed beans and XPages: Your Time Is Now
Russell Maher
 
MWLUG 2015 - An Introduction to MVC
Ulrich Krause
 
Jsf presentation
Ashish Gupta
 
IRJET- A Study Focused on Web Application Development using MVC Design Pa...
IRJET Journal
 
A study of mvc – a software design pattern for web application development
IAEME Publication
 
Mvc
abhigad
 
Ad

Recently uploaded (20)

PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Ad

Java and XPages

  • 2. MVC Software architectural pattern. Divides an application into three interconnected parts. Separates internal representations of information from the ways information is presented to the user. Model:  These are your Java objects that contain and manipulate the data from the database and  implement business rules for managing that data. View:  These are your presentation Java objects. Mostly a 1-to-1 relationship between an XPage  (graphical view) and a related view Bean. Controller:  This middle layer is the JSF API. No code is written here by the developer of JSF applications  (including XPages). This is the FacesServlet.
  • 4. Components we will run into and their role in MVC
  • 5. FacesServlet ● Part of Controller in MVC ● Core of the JSF architecture, part of the web application server (Domino) API – E.g. renders the XPage – E.g. receives requests from a XPage – E.g. creates & updates Managed Beans ● Already setup for us by IBM. We do not write code for FacesServlet :::
  • 6. XPages ● Sounds familiar ::: ● Part of View in MVC – E.g. controls the look and feel of your web page – E.g acts as the set of instructions for the FacesServlet to do its job. ● All of those tags/controls you place on the XPage have related Java code behind the scenes. – Simple as HTML rendering information – Or complex processing instructions for datasets – All executed by the FacesServlet
  • 7. Managed Bean ● Part of View in MVC ● Simplified: a set of instructions for the FacesServlet to process ● XPages does nothing to or with a Managed Bean ● XPages stores only references to a Managed Bean – Tells FacesServlet to place data in the HTML – Tells to store data in the Managed Bean ● Acts as the client to the Façade Example: EmployeeBean ● Primary goal to work only at the View layer ● Should not contain data processing business logic – Delegate this to the Model layer
  • 8. CRUD Facade ● Part of Model in MVC ● Enclose the business logic of retrieving data from the system – Create Read Update Delete actions ● Provides a client interface to a logically grouped set of instructions executed on other Java objects. – Managed Bean is the client  – Low level work and instructions are delegated to classes that make up the Data Access Objects ● Example: EmployeeCRUDFacade
  • 9. Data Access Object (DAO) – Interface ● Part of Model in MVC ● Sort of contract: – Common methods that each DAO must implement – From ”application point of view”, not from the system or database. – The client (Facade) can always expect to run the same method, regardless underlying database (Domino, Oracle, SQL) ● Example: EmployeeDOA
  • 10. Data Access Object (DAO) - Database ● Describes how to access the data from ”database point of view” ● Domino: – Database (NSF) – Views – Collections – Notes document – Fields etcetera ● Example: DominoEmployeeDOA
  • 11. Data object class ● Part of Model in MVC ● Low(est) level description of data/object e.g. an employee ● Contains properties (~ fields) and methods (getter and setters for fields) ● Contains no real logic
  • 12. Everything in a diagram
  • 13. Java classes & conventions ● Objects represented by classes ● Resides in a package (~ folder): – Toplevel domain.domain.application/project.folder.object – E.g. se.acme.project.model.employee.class ● ● *1 Class names starts with capital e.g. Employee.class ● *2 Package resides in WebContent/WEB-INF/src folder Documentation: *1) http://www.oracle.com/technetwork/java/codeconventions-135099.html *2) https://www-10.lotus.com/ldd/ddwiki.nsf/dx/Creating_a_Java_Control_in_an_NSF