Company
Date Published
Author
Mario Bodemann
Word count
1082
Language
English
Hacker News points
None

Summary

The Contentful Java SDK has been released, featuring a new method chaining feature that simplifies code readability and reduces verbosity. Method chaining allows developers to chain multiple setter methods together, making the code more concise and easier to read. This approach is particularly useful when dealing with complex resource structures or cascading settings. However, it's essential to use chaining with care, as overusing it can lead to confusing code. The Contentful Java SDK recommends adopting this paradigm where it makes sense, while keeping changes of return types in fluent interfaces to a minimum. By using method chaining effectively, developers can build better digital experiences with Contentful.