Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Let's Make a Contract - The Art of Designing a Java API

Devoxx via YouTube

Overview

Explore the art of designing effective Java APIs in this 49-minute Devoxx conference talk. Delve into the principles and techniques for developing user-friendly APIs, examining real-world examples and standard Java libraries. Learn about key characteristics of good API design, including consistency, simplicity, and the principle of minimum surprise. Discover how to write meaningful Javadocs, create convenience methods, promote fluent APIs, and utilize appropriate return types. Gain insights on breaking down large interfaces, implementing defensive programming, and leveraging enums. Understand the importance of API design as an iterative process and its crucial role in software development and third-party interactions.

Syllabus

Red Hat
What is an API? ?
And why should I care?
Understandable Basic Principles
If in doubt, leave it out
Write meaningful Javadocs
Convenience methods
Promote fluent API
Use the weakest possible type also for returned value
Support lambdas
Avoid checked exceptions
Stay in control (loan pattern)
Break apart large interfaces into smaller versions
Be defensive with your data
Prefer enums to boolean parameters
Use meaningful return types
API design is an iterative process

Taught by

Devoxx

Reviews

Start your review of Let's Make a Contract - The Art of Designing a Java API

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.