Summary
In this chapter, we have learned about the interoperability of Clojure and Java. We saw how to import Java classes in Clojure. We constructed instances of Java classes and called methods on these instances. We have also learned about macros that help us use Java in Clojure.
Next, we learned about input/output (I/O) operations in Java. We accessed files from a disk, both reading and writing content. We saw how to get input from a user using a keyboard and how to display information back to the user.
After that, we learned about interoperability in ClojureScript. We created a drag and drop application using objects and methods from JavaScript libraries.
Finally, we learned about exceptions and errors in Clojure and ClojureScript. We saw how errors are thrown and how to guard against errors using try-catch
blocks. We investigated the finally
block and when to use it.
We finished the chapter by working on a help desk application that allows users to sort a list of items...