Clojure in Action

By Amit Rathore


Clojure in Action is a hands-on instructional for the operating programmer who has written code in a language like Java or Ruby, yet has no past adventure with Lisp. It teaches Clojure from the fundamentals to complex themes utilizing functional, real-world software examples. Blow throughout the thought and dive into sensible concerns like unit-testing and atmosphere set-up, all through construction a scalable web-application utilizing domain-specific languages, Hadoop, HBase, and RabbitMQ.
About the Technology
Clojure is a contemporary Lisp for the JVM, and it has the strengths you'd count on: first class features, macros, help for useful programming, and a Lisp-like, fresh programming style.
About this Book
Clojure in Action is a realistic advisor curious about making use of Clojure to sensible programming demanding situations. You'll begin with a language instructional written for readers who already recognize OOP. Then, you'll dive into the use situations the place Clojure particularly shines: nation administration, secure concurrency and multicore programming, top quality code new release, and Java interop. In each one bankruptcy, you'll first discover the original features of an issue zone after which realize find out how to take on them utilizing Clojure. alongside the best way, you'll discover functional issues like structure, unit checking out, and set-up as you construct a scalable internet program that comes with customized DSLs, Hadoop, HBase, and RabbitMQ.

buy of the print booklet comes with a proposal of a unfastened PDF, ePub, and Kindle book from Manning. additionally on hand is all code from the book.
What's Inside* A fast paced Clojure tutorial
* growing internet companies with Clojure
* Scaling via messaging
* developing DSLs with Clojure's macro system
* Test-driven improvement with Clojure
* allotted programming with Clojure and more

This publication assumes you're conversant in an OO language like Java, C#, or C++, yet calls for no history in Lisp or Clojure itself.

Table of Contents<ol><h5>PART 1 GETTING STARTED</h5> * creation to Clojure
* A whirlwind tour
* development blocks of Clojure
* Polymorphism with multimethods
* Clojure and Java interop
* nation and the concurrent world
* Evolving Clojure via macros
<h5>PART 2 GETTING actual </h5> * Test-driven improvement and more
* information garage with Clojure
* Clojure and the web
* Scaling via messaging
* info processing with Clojure
* extra on useful programming
* Protocols, files, and type
* extra macros and DSLs

Show description

Preview of Clojure in Action PDF

Similar Java books

Mastering Lambdas: Java Programming in a Multicore World (Oracle Press)

The Definitive advisor to Lambda Expressions gaining knowledge of Lambdas: Java Programming in a Multicore global describes how the lambda-related good points of Java SE eight will permit Java to satisfy the demanding situations of next-generation parallel architectures. The ebook explains easy methods to write lambdas, and the way to exploit them in streams and in assortment processing, supplying code examples all through.

Mastering JavaFX 8 Controls (Oracle Press)

Layout and installation High-Performance JavaFX Controls carry state of the art functions with visually gorgeous UIs. getting to know JavaFX eight Controls offers transparent directions, distinct examples, and ready-to-use code samples. tips to paintings with the newest JavaFX APIs, configure UI elements, immediately generate FXML, construct state of the art controls, and successfully follow CSS styling.

Data Abstraction and Problem Solving with Java: Walls and Mirrors (3rd Edition)

The 3rd version of information Abstraction and challenge fixing with Java: partitions and Mirrors employs the analogies of partitions (data abstraction) and Mirrors (recursion) to coach Java programming layout recommendations, in a manner that starting scholars locate obtainable. The ebook has a student-friendly pedagogical strategy that conscientiously bills for the strengths and weaknesses of the Java language.

Java Software Solutions: Foundations of Program Design (7th Edition)

Java software program options teaches a starting place of programming strategies to foster well-designed object-oriented software program. Heralded for its integration of small and massive lifelike examples, this all over the world best-selling textual content emphasizes development good problem-solving and layout talents to write down high quality courses.

Extra info for Clojure in Action

Show sample text content

If any returns a logical precise, it returns it because the worth of the or. If none go back a logical real, then the worth of the final one is lower back. or additionally short-circuits its arguments. Here’s an instance: (if (or (never-logged-in? consumer) (has-no-expenses? user)) (email-encouragement user)) one other focal point is that either and and or also are macros. which means the Clojure language doesn’t offer those as a part of its middle, yet as an alternative they’re a part of the traditional library. It additionally signifies that we will write our personal macros that behave like and or or and they might be indistinguishable from the language. i do know we continue asserting this, yet you will see what this suggests in bankruptcy 7. software movement forty five eventually, Clojure offers a now not functionality that inverts the logical price of no matter what is handed in as an issue. Here’s an instance: (if (not (thrifty? user)) (email-savings user)) As a proper part be aware, Clojure presents the entire ordinary comparability and equality services. Examples are <, <=, >, >=, and =. all of them paintings the best way you’d anticipate them to, with an extra function: they take any variety of arguments. The < functionality, for example, tests to work out if the arguments are in expanding order. The = functionality is equal to Java’s equals, however it works for a much broader diversity of items together with nil, numbers, and sequences. word that it’s a unmarried = image and never ==, that's time-honored in lots of programming languages. those logical services are enough as a way to create compound logical expressions from basic ones. Our subsequent cease during this part goes to be iterations—not strictly the type supported by means of central languages akin to C++ and Java, however the practical type. 2. three. 2 useful new release so much useful languages don’t have conventional new release constructs like for simply because ordinary implementations of for require mutation of the loop counter. as an alternative, they use recursion and serve as program to strategy lists of items. We’ll commence this part through the wide-spread whereas shape, via interpreting Clojure’s looping build of loop/recur. Then we’ll research a number of handy macros reminiscent of doseq and dotimes, that are equipped on most sensible of loop/recur. whereas Clojure’s whereas macro works similarly to these noticeable in primary languages resembling Ruby and Java. the overall shape is as follows: (while try & physique) An instance is (while (request-on-queue? ) (handle-request (pop-request-queue))) the following, requests will stay processed so long as they retain showing at the request queue. The whereas loop will finish if request-on-queue? returns a price both fake or nil, possibly simply because anything else occurred in different places within the method. notice that the one means for it slow loop to finish is for an aspect impression to reason the attempt expression to come back fake. Now, let’s flow directly to one other looping build, one that’s a bit of assorted from primary languages, since it is dependent upon what seems to be recursion. LOOP/RECUR Clojure doesn’t have conventional for loops for new release; in its place, courses can in attaining related habit by utilizing higher-level capabilities resembling map and different 46 bankruptcy 2 A whirlwind travel services within the series library.

Download PDF sample

Rated 4.85 of 5 – based on 47 votes