Java EE | Clean Code and Java EE 6 | Adam Bien

6,494 views

Published on

2011-11-01 | 10:40 AM - 11:40 AM
Although you can build Java EE 6 applications with only a fraction of the code that’s necessary with J2EE, many projects are still based on the bloated and exaggerated J2EE patterns and best practices. This session discusses how to build lean applications in a productive and maintainable way. The following pragmatic tools, patterns, and best practices will be covered with working source code, which are especially interesting to Java EE developers and architects: - Mixing CDI, JPA, EJB, JSF, and JAX-RS to save code - Mocking, unit testing, stress testing, and integration testing - Continuous integration and build (Maven 3, Git) - Efficient data access without DAOs - CAP and BASE - Asynchronous CDI events for decoupling and pub/sub - Pro-active JMX monitoring instead of logging

Published in: Technology, News & Politics

Java EE | Clean Code and Java EE 6 | Adam Bien

  1. 1. Java EE Clean Code [kill the bloat] blog.adam-bien.com / twitter:@AdamBien
  2. 2. • Expert Group Member (jcp.org) of Java EE 6, Java EE 7, JPA 2.1, EJB 3.2, CDI 1.1, JMS 2.0 (...)• Java Champion, (JavaONE) speaker + rockstar, freelancer, consultant and author: >100 articles, 7 German books,• Author: “Real World Java EE Patterns– Rethinking Best Practices” and “Real World Java EE Night Hacks” http:// press.adam-bien.com• NEW: workshops.adam-bien.com• http://kenai.com/projects/javaee-patterns/ http://java.net/projects/x-ray blog.adam-bien.com / twitter:@AdamBien
  3. 3. Adam Bien,press.adam-bien.com blog.adam-bien.com / twitter:@AdamBien
  4. 4. Adam Bien,press.adam-bien.com blog.adam-bien.com / twitter:@AdamBien
  5. 5. “Perfection (in enterprise development) isachieved not when there is nothing more toadd, but rather when there is nothing moreto take away.”--Antoine de Saint-Exupéry blog.adam-bien.com / twitter:@AdamBien
  6. 6. General Advice: Dont Distribute (CAP)
  7. 7. J2EE Patterns in Java EE adam-bien.com
  8. 8. It’s NotOverengineering... adam-bien.com
  9. 9. ...It’s Cargo Cult Programming:[http://en.wikipedia.org/wiki/Cargo_cult_programming] adam-bien.com
  10. 10. “...Cargo cult programming is a style ofcomputer programming that is characterizedby the ritual inclusion of code or programstructures that serve no real purpose...” blog.adam-bien.com / twitter:@AdamBien
  11. 11. “...Cargo cult programming can also refer tothe results of (over-)applying a design patternor coding style blindly without understandingthe reasons behind that design principle in thefirst place. Examples are adding unnecessarycomments to self-explanatory code, addingdeletion code for objects that garbagecollection would have collected automaticallywith no problem, creating factory objects tobuild simple objects, etc. It often happens whenprogrammers are inexperienced with theprogramming language, or simply overzealous...” blog.adam-bien.com / twitter:@AdamBien
  12. 12. Verify Your Design With …Aliens
  13. 13. adam-bien.com
  14. 14. ...or ask a Ruby / Python developer...
  15. 15. Continuous Everything (Integration, Deployment, QA)
  16. 16. Mocks, Unit-, Integration- and Stress Testing
  17. 17. Strict Separation Between Unit-, Integration-, and System Tests
  18. 18. Java EE 6, Maven 3,Continuous Integration And Git
  19. 19. Convention OverConfiguration with DI
  20. 20. No, I dont want your XML!
  21. 21. HomegrownFrameworks?
  22. 22. JavaDoc Is Suspicious
  23. 23. DRY And DIE
  24. 24. package private fields or public setters?
  25. 25. Back To Java SE Thinking
  26. 26. Rich Domain Objects
  27. 27. No Interfaces
  28. 28. No Extensive Layering
  29. 29. Rethink J2EE Patterns
  30. 30. Rethink GoF Patterns
  31. 31. Factory
  32. 32. Observer
  33. 33. Builder
  34. 34. Facade
  35. 35. Bridge
  36. 36. Strategy
  37. 37. Decorator
  38. 38. Entity Control Boundary
  39. 39. Thank You! blog.adam-bien.comtwitter.com/AdamBien adam-bien.com

×