Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Be smart work together
Coding Java for xPage Developers
Woensdag 2 Oktober 2013
Jeroen Somhorst
j.somhorst@acuity.nl
http:...
Be smart work together
Coding Java for xPage Developers
• Inleiding
• Functions
• Classes
• Code comments
• Error Handling...
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 wel...
Be smart work together
Classes
• Kleine klassen maakt blije leerlingen
• SRP principle
• Kleine klassen maakt blije leerli...
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
– (.hasNe...
Be smart work together
The OpenNTF Domino Api Project to the rescue!
• Get from http://bit.ly/196Cect
• Copy .jar files to...
Be smart work together
The OpenNTF Domino Api Project to the rescue!
• Get from http://bit.ly/196Cect
• Copy .jar files to...
Upcoming SlideShare
Loading in …5
×

Presentatie xPage & Beer

1,755 views

Published on

Presentation about Clean code by Robert. C. Martin

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

Presentatie xPage & Beer

  1. 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. 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. 3. Be smart work together Coding Java for xPage Developers • Who is that guy? • Waar gaan we het over hebben?
  4. 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. 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. 6. Be smart work together Comments • Comments make things worse • Explain yourself in code not in comments
  7. 7. Be smart work together Error handling • Write your try/catch first! • Use of Finally • Use exceptions
  8. 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. 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. 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)

×