SlideShare a Scribd company logo
1 of 10
Be smart work together
Coding Java for xPage Developers
Woensdag 2 Oktober 2013
Jeroen Somhorst
j.somhorst@acuity.nl
http://www.jeroensomhorst.eu
Be smart work together
Coding Java for xPage Developers
• Inleiding
• Functions
• Classes
• Code comments
• Error Handling
• The OpenNTF Domino Api Project to the rescue
Be smart work together
Coding Java for xPage Developers
• Who is that guy?
• Waar gaan we het over hebben?
Be smart work together
Functions
• Functienamen moeten vertellen wat de functie doet
• Do one thing, they should do it well and they should do it only
• Never use an input parameter as an output!
• Flag parameters
Be smart work together
Classes
• Kleine klassen maakt blije leerlingen
• SRP principle
• Kleine klassen maakt blije leerlingen
• SRP principle
– Houd rekening met verandering!
Be smart work together
Comments
• Comments make things worse
• Explain yourself in code not in comments
Be smart work together
Error handling
• Write your try/catch first!
• Use of Finally
• Use exceptions
Be smart work together
The OpenNTF Domino Api Project to the rescue!
• Wat is de OpenNTF Domino API?
• Iterators
– (.hasNext(), .next());
• No recycle!
• No default try/catch for exceptions
Be smart work together
The OpenNTF Domino Api Project to the rescue!
• Get from http://bit.ly/196Cect
• Copy .jar files to designer jvm/lib/ext
• Copy jar files to domino jvm/lib/ext
• Create update site for osgi domino
• Added entry to xsp.properties on domino server to use
session/database classes from api
(org.openntf.domino.xsp=godmode)
Be smart work together
The OpenNTF Domino Api Project to the rescue!
• Get from http://bit.ly/196Cect
• Copy .jar files to designer jvm/lib/ext
• Copy jar files to domino jvm/lib/ext
• Create update site for osgi domino
• Added entry to xsp.properties on domino server to use
session/database classes from api
(org.openntf.domino.xsp=godmode)

More Related Content

What's hot

ES6 - Make JavaScript Great for the First Time
ES6 - Make JavaScript Great for the First TimeES6 - Make JavaScript Great for the First Time
ES6 - Make JavaScript Great for the First TimeLeo Hernandez
 
Migrate PHP E-Commerce Site to Go
Migrate PHP E-Commerce Site to GoMigrate PHP E-Commerce Site to Go
Migrate PHP E-Commerce Site to GoWeng Wei
 
Fast Web Applications with Go
Fast Web Applications with Go Fast Web Applications with Go
Fast Web Applications with Go Eylem Ozekin
 
YAGNI Principle and Clean Code
YAGNI Principle and Clean CodeYAGNI Principle and Clean Code
YAGNI Principle and Clean CodeLuan Reffatti
 
Good code, Bad Code
Good code, Bad CodeGood code, Bad Code
Good code, Bad Codejosedasilva
 
Jak aspekty uporządkują twój kod.
Jak aspekty uporządkują twój kod.Jak aspekty uporządkują twój kod.
Jak aspekty uporządkują twój kod.Future Processing
 
IBM Watson as tutor, not a voice interface
IBM Watson as tutor, not a voice interfaceIBM Watson as tutor, not a voice interface
IBM Watson as tutor, not a voice interfaceKirill Zonov
 
User stories deep dive
User stories deep diveUser stories deep dive
User stories deep diveAmir Barylko
 
TDC2016POA | Trilha DevOps - DevOps Anti-Patterns
TDC2016POA | Trilha DevOps - DevOps Anti-PatternsTDC2016POA | Trilha DevOps - DevOps Anti-Patterns
TDC2016POA | Trilha DevOps - DevOps Anti-Patternstdc-globalcode
 
How aspects clean your code
How aspects clean your codeHow aspects clean your code
How aspects clean your codeBarbara Fusinska
 

What's hot (14)

Event4 better javascript
Event4   better javascriptEvent4   better javascript
Event4 better javascript
 
ES6 - Make JavaScript Great for the First Time
ES6 - Make JavaScript Great for the First TimeES6 - Make JavaScript Great for the First Time
ES6 - Make JavaScript Great for the First Time
 
Migrate PHP E-Commerce Site to Go
Migrate PHP E-Commerce Site to GoMigrate PHP E-Commerce Site to Go
Migrate PHP E-Commerce Site to Go
 
Useful automation
Useful automationUseful automation
Useful automation
 
Fast Web Applications with Go
Fast Web Applications with Go Fast Web Applications with Go
Fast Web Applications with Go
 
How to write bad code using C#
How to write bad code using C#How to write bad code using C#
How to write bad code using C#
 
YAGNI Principle and Clean Code
YAGNI Principle and Clean CodeYAGNI Principle and Clean Code
YAGNI Principle and Clean Code
 
Good code, Bad Code
Good code, Bad CodeGood code, Bad Code
Good code, Bad Code
 
Jak aspekty uporządkują twój kod.
Jak aspekty uporządkują twój kod.Jak aspekty uporządkują twój kod.
Jak aspekty uporządkują twój kod.
 
IBM Watson as tutor, not a voice interface
IBM Watson as tutor, not a voice interfaceIBM Watson as tutor, not a voice interface
IBM Watson as tutor, not a voice interface
 
User stories deep dive
User stories deep diveUser stories deep dive
User stories deep dive
 
TDC2016POA | Trilha DevOps - DevOps Anti-Patterns
TDC2016POA | Trilha DevOps - DevOps Anti-PatternsTDC2016POA | Trilha DevOps - DevOps Anti-Patterns
TDC2016POA | Trilha DevOps - DevOps Anti-Patterns
 
How aspects clean your code
How aspects clean your codeHow aspects clean your code
How aspects clean your code
 
How to do b tech be projects or any academic projects
How to do b tech be projects or any academic projectsHow to do b tech be projects or any academic projects
How to do b tech be projects or any academic projects
 

Similar to Presentatie xPage & Beer

Introduction to Functional Programming
Introduction to Functional ProgrammingIntroduction to Functional Programming
Introduction to Functional ProgrammingDave Fancher
 
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Molieremfrancis
 
Effective Code Review (Or How To Alienate Your Coworkers)
Effective Code Review (Or How To Alienate Your Coworkers)Effective Code Review (Or How To Alienate Your Coworkers)
Effective Code Review (Or How To Alienate Your Coworkers)Perforce
 
Prototyping like it is 2022
Prototyping like it is 2022 Prototyping like it is 2022
Prototyping like it is 2022 Michael Yagudaev
 
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...Sébastien Levert
 
Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Codersebbe
 
Python programming lab 23
Python programming lab 23Python programming lab 23
Python programming lab 23profbnk
 
Improve performance of developer - Khodak
Improve performance of developer  - KhodakImprove performance of developer  - Khodak
Improve performance of developer - KhodakIgor Bronovskyy
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overviewJesse Warden
 
The Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with androidThe Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with androidStanojko Markovik
 
SharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
SharePoint Fest DC - SharePoint Framework, Angular and Azure FunctionsSharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
SharePoint Fest DC - SharePoint Framework, Angular and Azure FunctionsSébastien Levert
 
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...Sébastien Levert
 
Raspberry using Python Session 1
Raspberry using Python Session 1Raspberry using Python Session 1
Raspberry using Python Session 1Mohamed Abd Ela'al
 
Phpworks enterprise-php-1227605806710884-9
Phpworks enterprise-php-1227605806710884-9Phpworks enterprise-php-1227605806710884-9
Phpworks enterprise-php-1227605806710884-9PrinceGuru MS
 

Similar to Presentatie xPage & Beer (20)

Introduction to Functional Programming
Introduction to Functional ProgrammingIntroduction to Functional Programming
Introduction to Functional Programming
 
Eurosport's Kodakademi #2
Eurosport's Kodakademi #2Eurosport's Kodakademi #2
Eurosport's Kodakademi #2
 
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
 
Clean code
Clean codeClean code
Clean code
 
Effective Code Review (Or How To Alienate Your Coworkers)
Effective Code Review (Or How To Alienate Your Coworkers)Effective Code Review (Or How To Alienate Your Coworkers)
Effective Code Review (Or How To Alienate Your Coworkers)
 
Prototyping like it is 2022
Prototyping like it is 2022 Prototyping like it is 2022
Prototyping like it is 2022
 
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
 
Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Code
 
l2-es6-160830040119.pdf
l2-es6-160830040119.pdfl2-es6-160830040119.pdf
l2-es6-160830040119.pdf
 
Python programming lab 23
Python programming lab 23Python programming lab 23
Python programming lab 23
 
Improve performance of developer - Khodak
Improve performance of developer  - KhodakImprove performance of developer  - Khodak
Improve performance of developer - Khodak
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overview
 
The Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with androidThe Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with android
 
SharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
SharePoint Fest DC - SharePoint Framework, Angular and Azure FunctionsSharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
SharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
 
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
 
Lecture 2: ES6 / ES2015 Slide
Lecture 2: ES6 / ES2015 SlideLecture 2: ES6 / ES2015 Slide
Lecture 2: ES6 / ES2015 Slide
 
Software development fundamentals
Software development fundamentalsSoftware development fundamentals
Software development fundamentals
 
Raspberry using Python Session 1
Raspberry using Python Session 1Raspberry using Python Session 1
Raspberry using Python Session 1
 
Functional Programming in Java
Functional Programming in JavaFunctional Programming in Java
Functional Programming in Java
 
Phpworks enterprise-php-1227605806710884-9
Phpworks enterprise-php-1227605806710884-9Phpworks enterprise-php-1227605806710884-9
Phpworks enterprise-php-1227605806710884-9
 

Recently uploaded

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Recently uploaded (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

Presentatie xPage & Beer

  • 1. Be smart work together Coding Java for xPage Developers Woensdag 2 Oktober 2013 Jeroen Somhorst j.somhorst@acuity.nl http://www.jeroensomhorst.eu
  • 2. Be smart work together Coding Java for xPage Developers • Inleiding • Functions • Classes • Code comments • Error Handling • The OpenNTF Domino Api Project to the rescue
  • 3. Be smart work together Coding Java for xPage Developers • Who is that guy? • Waar gaan we het over hebben?
  • 4. Be smart work together Functions • Functienamen moeten vertellen wat de functie doet • Do one thing, they should do it well and they should do it only • Never use an input parameter as an output! • Flag parameters
  • 5. Be smart work together Classes • Kleine klassen maakt blije leerlingen • SRP principle • Kleine klassen maakt blije leerlingen • SRP principle – Houd rekening met verandering!
  • 6. Be smart work together Comments • Comments make things worse • Explain yourself in code not in comments
  • 7. Be smart work together Error handling • Write your try/catch first! • Use of Finally • Use exceptions
  • 8. Be smart work together The OpenNTF Domino Api Project to the rescue! • Wat is de OpenNTF Domino API? • Iterators – (.hasNext(), .next()); • No recycle! • No default try/catch for exceptions
  • 9. Be smart work together The OpenNTF Domino Api Project to the rescue! • Get from http://bit.ly/196Cect • Copy .jar files to designer jvm/lib/ext • Copy jar files to domino jvm/lib/ext • Create update site for osgi domino • Added entry to xsp.properties on domino server to use session/database classes from api (org.openntf.domino.xsp=godmode)
  • 10. Be smart work together The OpenNTF Domino Api Project to the rescue! • Get from http://bit.ly/196Cect • Copy .jar files to designer jvm/lib/ext • Copy jar files to domino jvm/lib/ext • Create update site for osgi domino • Added entry to xsp.properties on domino server to use session/database classes from api (org.openntf.domino.xsp=godmode)