SlideShare una empresa de Scribd logo
1 de 37
Descargar para leer sin conexión
Use Notes objects in memory and other useful Java tips for XPages development 
Frank van der Linden
Me 
•Java/XPages/Web/Domino developer 
•Self employed at elstarIT 
•OpenNTF director 
•Speak at several national and international events 
•IBM Champion 2013 and 2014 
•Live in the Netherlands 
•Work everywhere 
@flinden68 
http://www.elstarit.nl 
http://nl.linkedin.com/in/flinden68 
flinden68@elstarit.nl
Disclaimer 
All the code and the demos in this session will use the Java Notes Objects which are part of the IBM/Lotus Notes product. 
For a modern way of Java coding with Notes Objects please use the OpenNTF Domino API. 
Or even better use OpenNTF essentials
Roadmap 
•Notes objects in memory 
•Use of JSON 
•MVC/Managed beans 
•Java tip for XPages 
•Date checks 
•Utility class 
•Extending classes 
•Unit test 
•Finally 
•Some bonus code
Notes objects in memory
Bad practice 
•Notes objects are not serializable 
•Will not recycled the Java way, it will keep a pointer to the C object 
•Can cause out of memory
What is serialization
XPagesJava doc to the rescue
Put Notes document in memory 
•Get Notesdocument 
•Wrap Notesdocument into a DominoDocument
Get field values 
•First check if document isRecycled 
•Access field
On a XPageand more 
•In a computed field 
•In an edit box 
•Update the backend document
Demo
What about attachments 
•Get easy access to your attachments
What about attachments 
•No calculation of paths 
•Works both in XPincand Web 
•Call the attachment URL
Demo
Use build-in JSON classes
JSON building classes 
•Part of the Extensibility API, since 8.5.2 
•Easy way to build JSON
JSON building classes 
•No concatenation of Strings 
•Faster 
•Readable code
MVC
MVC
MVC for XPages 
•Separation of responsibility 
•Cleaner code 
•Easier to maintain 
•Model = documents 
•View = XPage 
•Controller = Java managed bean
Managed beans
The requirements 
•Needs to be Serializable 
•At least one constructor without parameters 
•Needs to be registratedin the Faces-config.xml 
•Properties are private 
•And have Getters and Setters
Faces-config.xml syntax 
•In package-explorer, under WebContentWEB-INF 
•Name of the bean 
•Full qualified class name 
•Scope of the bean 
•Optional, initialize properties
Use the managed beans 
•Do the calculation in the class 
•Use Expression Language to access properties 
•Minimize use of SSJS 
•Some examples
Java tips for XPages
Utility class 
•All kind of methods 
•Always available as static class 
•I added some methods who were translated from SSJS
Date checks 
•Remember the TimeDifferencehorror 
•Java provide nice Date checks 
•Like… Date.before(Date) or Date.after(Date)
Extending a class 
•Extend a base class 
•Use the methods of the base class
Extending a class 
•Using the class 
•In a XPage
Unit test 
•Write code to test small portions of code, like methods 
•Test if the code is doing what was intended 
•Write better Java code 
•Use Mock Framework, like EasyMockor Mockito, to simulate objects
Unit test for XPages 
•More and more Java code in XPagesdevelopment 
•Write Unit test for better code 
•On OpenNTF Junit test for Xpagesproject (thanks Christian Guedemann)
And Finally 
•Finally will always called, even after a catch 
•Use it to recycle objects and close stream readers
Thank you 
@flinden68 
http://www.elstarit.nl 
http://nl.linkedin.com/in/flinden68 
flinden68@elstarit.nl 
https://bitbucket.org/flinden68/bccon-java-demo/src
Bonus
Eventsource
Customizable Toolbar

Más contenido relacionado

La actualidad más candente

Basic javaprogramming(session1)
Basic javaprogramming(session1)Basic javaprogramming(session1)
Basic javaprogramming(session1)
Barm Bannasan
 

La actualidad más candente (20)

Java Programming
Java ProgrammingJava Programming
Java Programming
 
Introduction to oops
Introduction to oopsIntroduction to oops
Introduction to oops
 
Features of java
Features of javaFeatures of java
Features of java
 
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and JitQSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
 
Java
JavaJava
Java
 
Learn JAVA at ASIT
Learn JAVA at ASITLearn JAVA at ASIT
Learn JAVA at ASIT
 
QSpiders - Memory (JVM architecture)
QSpiders - Memory (JVM architecture)QSpiders - Memory (JVM architecture)
QSpiders - Memory (JVM architecture)
 
Basic javaprogramming(session1)
Basic javaprogramming(session1)Basic javaprogramming(session1)
Basic javaprogramming(session1)
 
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
Java Virtual Machine (JVM), Difference JDK, JRE & JVMJava Virtual Machine (JVM), Difference JDK, JRE & JVM
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
 
Java-java virtual machine
Java-java virtual machineJava-java virtual machine
Java-java virtual machine
 
Java introduction
Java introductionJava introduction
Java introduction
 
Introduction to Core Java Programming
Introduction to Core Java ProgrammingIntroduction to Core Java Programming
Introduction to Core Java Programming
 
Jvm
JvmJvm
Jvm
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
Php traits
Php traitsPhp traits
Php traits
 
Java introduction
Java introductionJava introduction
Java introduction
 
JDK,JRE,JVM
JDK,JRE,JVMJDK,JRE,JVM
JDK,JRE,JVM
 
Java byte code presentation
Java byte code presentationJava byte code presentation
Java byte code presentation
 
Java Virtual Machine - Internal Architecture
Java Virtual Machine - Internal ArchitectureJava Virtual Machine - Internal Architecture
Java Virtual Machine - Internal Architecture
 
Alexander Kutsan "Where Unicorns Live or How To Write Good C++ Code"
Alexander Kutsan "Where Unicorns Live or How To Write Good C++ Code"Alexander Kutsan "Where Unicorns Live or How To Write Good C++ Code"
Alexander Kutsan "Where Unicorns Live or How To Write Good C++ Code"
 

Similar a ics user group dev day_2014 use notes objects in memory and other useful

Similar a ics user group dev day_2014 use notes objects in memory and other useful (20)

A Notes Developer's Journey into Java
A Notes Developer's Journey into JavaA Notes Developer's Journey into Java
A Notes Developer's Journey into Java
 
Java for XPages Development
Java for XPages DevelopmentJava for XPages Development
Java for XPages Development
 
CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011
 
DanNotes 2013: OpenNTF Domino API
DanNotes 2013: OpenNTF Domino APIDanNotes 2013: OpenNTF Domino API
DanNotes 2013: OpenNTF Domino API
 
Java Online Training
Java Online TrainingJava Online Training
Java Online Training
 
Best Java Online Training in India
Best Java Online Training in IndiaBest Java Online Training in India
Best Java Online Training in India
 
Java online training from hyderabad
Java online training from hyderabadJava online training from hyderabad
Java online training from hyderabad
 
Java and the JVM
Java and the JVMJava and the JVM
Java and the JVM
 
Selenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdfSelenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdf
 
Selenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdfSelenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdf
 
Eureka Moment UKLUG
Eureka Moment UKLUGEureka Moment UKLUG
Eureka Moment UKLUG
 
Writing better code: How the Netbeans IDE Helps you Write, Test and Debug Java
Writing better code: How the Netbeans IDE Helps you Write, Test and Debug JavaWriting better code: How the Netbeans IDE Helps you Write, Test and Debug Java
Writing better code: How the Netbeans IDE Helps you Write, Test and Debug Java
 
Java Concurrency and Performance | Multi Threading | Concurrency | Java Conc...
Java Concurrency and Performance | Multi Threading  | Concurrency | Java Conc...Java Concurrency and Performance | Multi Threading  | Concurrency | Java Conc...
Java Concurrency and Performance | Multi Threading | Concurrency | Java Conc...
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
 
Beyond Domino Designer
Beyond Domino DesignerBeyond Domino Designer
Beyond Domino Designer
 
Testing-Tools-Magnitia-Content.pdf
Testing-Tools-Magnitia-Content.pdfTesting-Tools-Magnitia-Content.pdf
Testing-Tools-Magnitia-Content.pdf
 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming
 
Javascript best practices
Javascript best practicesJavascript best practices
Javascript best practices
 
Php unit for drupal 8
Php unit for drupal 8Php unit for drupal 8
Php unit for drupal 8
 
Selenium web driver_2.0_presentation
Selenium web driver_2.0_presentationSelenium web driver_2.0_presentation
Selenium web driver_2.0_presentation
 

Más de ICS User Group

Más de ICS User Group (20)

Domino Security Present and Future ConnectED Review - ICS.UG 2016
Domino Security Present and Future ConnectED Review - ICS.UG 2016Domino Security Present and Future ConnectED Review - ICS.UG 2016
Domino Security Present and Future ConnectED Review - ICS.UG 2016
 
Moving DNUG Usergroup von on-premise in die IBM ConnectionsCloud - ICS.UG 2016
Moving DNUG Usergroup von on-premise in die IBM ConnectionsCloud - ICS.UG 2016Moving DNUG Usergroup von on-premise in die IBM ConnectionsCloud - ICS.UG 2016
Moving DNUG Usergroup von on-premise in die IBM ConnectionsCloud - ICS.UG 2016
 
IBM Notes Traveler & IBM Mobile Connect What's new?, What's next? - ICS.UG 2016
IBM Notes Traveler & IBM Mobile Connect What's new?, What's next? - ICS.UG 2016IBM Notes Traveler & IBM Mobile Connect What's new?, What's next? - ICS.UG 2016
IBM Notes Traveler & IBM Mobile Connect What's new?, What's next? - ICS.UG 2016
 
Warum IBM mit Watson den Büroalltag revolutioniert - ICS.UG 2016
Warum IBM mit Watson den Büroalltag revolutioniert - ICS.UG 2016Warum IBM mit Watson den Büroalltag revolutioniert - ICS.UG 2016
Warum IBM mit Watson den Büroalltag revolutioniert - ICS.UG 2016
 
Private Cloud Storage - ICS.UG 2016
Private Cloud Storage - ICS.UG 2016Private Cloud Storage - ICS.UG 2016
Private Cloud Storage - ICS.UG 2016
 
Die mobile Herausforderung meistern! - ICS.UG 2016
Die mobile Herausforderung meistern! - ICS.UG 2016Die mobile Herausforderung meistern! - ICS.UG 2016
Die mobile Herausforderung meistern! - ICS.UG 2016
 
Cloud Update 2016 IBM Collaboration Solutions - Verse (&Toscana) - ICS.UG 2016
Cloud Update 2016 IBM Collaboration Solutions - Verse (&Toscana) - ICS.UG 2016Cloud Update 2016 IBM Collaboration Solutions - Verse (&Toscana) - ICS.UG 2016
Cloud Update 2016 IBM Collaboration Solutions - Verse (&Toscana) - ICS.UG 2016
 
Cloud Update 2016 IBM Collaboration Solutions - ConnectionsCloud - ICS.UG 2016
Cloud Update 2016 IBM Collaboration Solutions - ConnectionsCloud - ICS.UG 2016Cloud Update 2016 IBM Collaboration Solutions - ConnectionsCloud - ICS.UG 2016
Cloud Update 2016 IBM Collaboration Solutions - ConnectionsCloud - ICS.UG 2016
 
OpenNTF - From Donation to Contribution - ICS.UG 2016
OpenNTF - From Donation to Contribution - ICS.UG 2016OpenNTF - From Donation to Contribution - ICS.UG 2016
OpenNTF - From Donation to Contribution - ICS.UG 2016
 
Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...
Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...
Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...
 
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
 
XPages on IBM Bluemix: The Do's and Dont's - ICS.UG 2016
XPages on IBM Bluemix: The Do's and Dont's - ICS.UG 2016XPages on IBM Bluemix: The Do's and Dont's - ICS.UG 2016
XPages on IBM Bluemix: The Do's and Dont's - ICS.UG 2016
 
Die Zukunft spricht Domino! - ICS.UG 2016
Die Zukunft spricht Domino! - ICS.UG 2016Die Zukunft spricht Domino! - ICS.UG 2016
Die Zukunft spricht Domino! - ICS.UG 2016
 
Smashdocs - Dokumente gemeinsam schreiben - ICS.UG 2016
Smashdocs - Dokumente gemeinsam schreiben - ICS.UG 2016Smashdocs - Dokumente gemeinsam schreiben - ICS.UG 2016
Smashdocs - Dokumente gemeinsam schreiben - ICS.UG 2016
 
Smashdocs - Collaborative authoring & reviewing - ICS.UG 2016
Smashdocs - Collaborative authoring & reviewing - ICS.UG 2016Smashdocs - Collaborative authoring & reviewing - ICS.UG 2016
Smashdocs - Collaborative authoring & reviewing - ICS.UG 2016
 
IBM Digital Experience Overview - ICS.UG 2016
IBM Digital Experience Overview - ICS.UG 2016IBM Digital Experience Overview - ICS.UG 2016
IBM Digital Experience Overview - ICS.UG 2016
 
Watson - Bitte-helfen-Sie - ICS.UG 2016
Watson - Bitte-helfen-Sie - ICS.UG 2016Watson - Bitte-helfen-Sie - ICS.UG 2016
Watson - Bitte-helfen-Sie - ICS.UG 2016
 
Planung / Terminierung eines Außendienstes mit XPages - ICS.UG 2016
Planung / Terminierung eines Außendienstes mit XPages - ICS.UG 2016Planung / Terminierung eines Außendienstes mit XPages - ICS.UG 2016
Planung / Terminierung eines Außendienstes mit XPages - ICS.UG 2016
 
Beyond XPages ICS.UG 2015
Beyond XPages  ICS.UG 2015Beyond XPages  ICS.UG 2015
Beyond XPages ICS.UG 2015
 
ATLUG comes to you ICS.UG 2015
ATLUG comes to you ICS.UG 2015ATLUG comes to you ICS.UG 2015
ATLUG comes to you ICS.UG 2015
 

Último

If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
Kayode Fayemi
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
raffaeleoman
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
Kayode Fayemi
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
amilabibi1
 

Último (18)

Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verifiedSector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatment
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
Causes of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCauses of poverty in France presentation.pptx
Causes of poverty in France presentation.pptx
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
 
Digital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalDigital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of Drupal
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
 
ICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdfICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdf
 
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
 

ics user group dev day_2014 use notes objects in memory and other useful

  • 1. Use Notes objects in memory and other useful Java tips for XPages development Frank van der Linden
  • 2. Me •Java/XPages/Web/Domino developer •Self employed at elstarIT •OpenNTF director •Speak at several national and international events •IBM Champion 2013 and 2014 •Live in the Netherlands •Work everywhere @flinden68 http://www.elstarit.nl http://nl.linkedin.com/in/flinden68 flinden68@elstarit.nl
  • 3. Disclaimer All the code and the demos in this session will use the Java Notes Objects which are part of the IBM/Lotus Notes product. For a modern way of Java coding with Notes Objects please use the OpenNTF Domino API. Or even better use OpenNTF essentials
  • 4. Roadmap •Notes objects in memory •Use of JSON •MVC/Managed beans •Java tip for XPages •Date checks •Utility class •Extending classes •Unit test •Finally •Some bonus code
  • 6. Bad practice •Notes objects are not serializable •Will not recycled the Java way, it will keep a pointer to the C object •Can cause out of memory
  • 8. XPagesJava doc to the rescue
  • 9. Put Notes document in memory •Get Notesdocument •Wrap Notesdocument into a DominoDocument
  • 10. Get field values •First check if document isRecycled •Access field
  • 11. On a XPageand more •In a computed field •In an edit box •Update the backend document
  • 12. Demo
  • 13. What about attachments •Get easy access to your attachments
  • 14. What about attachments •No calculation of paths •Works both in XPincand Web •Call the attachment URL
  • 15. Demo
  • 16. Use build-in JSON classes
  • 17. JSON building classes •Part of the Extensibility API, since 8.5.2 •Easy way to build JSON
  • 18. JSON building classes •No concatenation of Strings •Faster •Readable code
  • 19. MVC
  • 20. MVC
  • 21. MVC for XPages •Separation of responsibility •Cleaner code •Easier to maintain •Model = documents •View = XPage •Controller = Java managed bean
  • 23. The requirements •Needs to be Serializable •At least one constructor without parameters •Needs to be registratedin the Faces-config.xml •Properties are private •And have Getters and Setters
  • 24. Faces-config.xml syntax •In package-explorer, under WebContentWEB-INF •Name of the bean •Full qualified class name •Scope of the bean •Optional, initialize properties
  • 25. Use the managed beans •Do the calculation in the class •Use Expression Language to access properties •Minimize use of SSJS •Some examples
  • 26. Java tips for XPages
  • 27. Utility class •All kind of methods •Always available as static class •I added some methods who were translated from SSJS
  • 28. Date checks •Remember the TimeDifferencehorror •Java provide nice Date checks •Like… Date.before(Date) or Date.after(Date)
  • 29. Extending a class •Extend a base class •Use the methods of the base class
  • 30. Extending a class •Using the class •In a XPage
  • 31. Unit test •Write code to test small portions of code, like methods •Test if the code is doing what was intended •Write better Java code •Use Mock Framework, like EasyMockor Mockito, to simulate objects
  • 32. Unit test for XPages •More and more Java code in XPagesdevelopment •Write Unit test for better code •On OpenNTF Junit test for Xpagesproject (thanks Christian Guedemann)
  • 33. And Finally •Finally will always called, even after a catch •Use it to recycle objects and close stream readers
  • 34. Thank you @flinden68 http://www.elstarit.nl http://nl.linkedin.com/in/flinden68 flinden68@elstarit.nl https://bitbucket.org/flinden68/bccon-java-demo/src
  • 35. Bonus