Presentatie xPage & Beer

1,589 views
1,568 views

Published on

Presentation about Clean code by Robert. C. Martin

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,589
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

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)

×