16. Java driver
✗ Easy to use, hard to misuse
✗ When in Rome, do as the romans do
✗ Don't make the client do anything
the library could do
17. Java driver
✗ Easy to use, hard to misuse
✗ When in Rome, do as the romans do
✗ Don't make the client do anything
the library could do ☑
18. Casbah
✗ Easy to use, hard to misuse
✓ When in Rome, do as the romans do
✗ Don't make the client do anything the library
could do
✗ Obey the principle of least astonishment
19. Casbah
✗ Easy to use, hard to misuse
✓ When in Rome, do as the romans do
✗ Don't make the client do anything the library
could do
✗ Obey the principle of least astonishment
Leaky abstractions
20. codes: [ “foo”, “bar” ]
obj.as[BasicDBList]("codes")
.toList
.map(_.asInstanceOf[String])
Don’t make me think
22. Casbah
✗ Easy to use, hard to misuse
✓ When in Rome, do as the romans do
✗ Don't make the client do anything the
✗
library could do
Obey the principle of least
astonishment
☑
23. Salat
✗ Easy to use, hard to misuse
✓ When in Rome, do as the romans do
✓ Don't make the client do anything the
✗
✗
✓
library could do
Obey the principle of least astonishment
Control
Symmetry
☒