Skip to Content
Practical API Design
book

Practical API Design

by Jaroslav Tulach
June 2008
Intermediate to advanced
400 pages
14h 4m
English
Apress
Content preview from Practical API Design

CHAPTER 6

image

Code Against Interfaces, Not Implementations

An old and true rule of thumb useful for every piece of code is to “separate your code into interface and implementation and then let other parts of the system rely just on the interfaces.” This advice is much older than Java, but it’s so true that it’s valuable to investigate its implications for writing Java APIs. This chapter provides an overview from various angles.

First, this rule of thumb implies that if you have a working application and want to provide some APIs to allow others to access it, it’s not reasonable simply to make a few classes public and then pretend it is an API. Without ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

API Design Patterns

API Design Patterns

John J. Geewax
Hands-On RESTful API Design Patterns and Best Practices

Hands-On RESTful API Design Patterns and Best Practices

Harihara Subramanian J, Anupama Murali, Pethuru Raj
Designing Web APIs

Designing Web APIs

Brenda Jin, Saurabh Sahni, Amir Shevat

Publisher Resources

ISBN: 9781430209737Supplemental Content