That Java Thing, Interlude: Effective Java
Mon Nov 16 08:15:53 EST 2015
- Nov 02 2015 - That Java Thing, Part 1: The Java Problem in the Community
- Nov 03 2015 - That Java Thing, Part 2: Intro to OSGi
- Nov 04 2015 - That Java Thing, Part 3: Eclipse Prep
- Nov 05 2015 - That Java Thing, Part 4: Creating the Plugin
- Nov 06 2015 - That Java Thing, Part 5: Expanding the Plugin
- Nov 08 2015 - That Java Thing, Part 6: Creating the Feature and Update Site
- Nov 09 2015 - That Java Thing, Part 7: Adding a Managed Bean to the Plugin
- Nov 10 2015 - That Java Thing, Part 8: Source Bundles
- Nov 11 2015 - That Java Thing, Part 9: Expanding the Plugin - Jars
- Nov 12 2015 - That Java Thing, Part 10: Expanding the Plugin - Serving Resources
- Nov 16 2015 - That Java Thing, Interlude: Effective Java
- Dec 01 2015 - That Java Thing, Part 11: Diagnostics
- Dec 03 2015 - That Java Thing, Part 12: Expanding the Plugin - JAX-RS
- Feb 19 2016 - That Java Thing, Part 13: Introduction to Maven
- Feb 21 2016 - That Java Thing, Part 14: Maven Environment Setup
- Feb 22 2016 - That Java Thing, Part 15: Converting the Projects
- Feb 23 2016 - That Java Thing, Part 16: Maven Fallout
- Feb 26 2017 - That Java Thing, Part 17: My Current XPages Plug-in Dev Environment
While taking a short breather in my continuing Java series, I think that now is a good time to reiterate my advice for all Domino developers to read Effective Java. It's probably not the best way to learn Java from scratch, but it's an invaluable tour through tons of important Java concepts. Even if you don't use most of the knowledge immediately, reading every section will help immerse you in the language and give you a better appreciation for its texture, which is one of the most important aspects of being a better programmer.
There is one caveat, though, when it comes to serialization. The serialization chapter in the book, though characteristically thorough and accurate, paints a much more dire and complicated picture of serialization than we as XPages developers usually have to worry about. It focuses on long-term storage of serialized objects - say, on the filesystem as a data format - whereas most of it going on in an XPages app is to make sure that your managed beans and data contexts don't throw exceptions when you do a partial refresh. Though we do run into it a bit when storing Java objects in Domino documents with MIMEBean or ODA, a managed bean class can get away with just "implements Serializable" attached and not a second thought.
Now go, make haste to Amazon and purchase the book!
Paul Withers - Mon Nov 16 08:51:19 EST 2015
And when storing Java objects with MIMEBean or ODA, my advice would be to have serializeToMap() and deserializeFromMap() methods that convert the object to and from a basic Java map. If the class changes, the deserializeFromMap method can be modified to adjust accordingly.
Stephan Wissel - Wed Dec 02 04:17:36 EST 2015
Or serialize to XML as mused about before