Drowning in unnecessary complexity, unmanaged state, and tangles of spaghetti code? In the best tradition of Lisp, Clojure gets out of your way so you can focus on expressing simple solutions to hard problems. Clojure cuts through complexity by providing a set of composable tools--immutable data, functions, macros, and the interactive REPL. Written by members of the Clojure core team, this book is the essential, definitive guide to Clojure. This new edition includes information on all the newest features of Clojure, such as transducers and specs.
Clojure joins the flexibility and agility of Lisp with the reach, stability, and performance of Java. Combine Clojure's tools for maximum effectiveness as you work with immutable data, functional programming, and safe concurrency to write programs that solve real-world problems.
Start by reading and understanding Clojure syntax and see how Clojure is evaluated. From there, find out about the sequence abstraction, which combines immutable collections with functional programming to create truly reusable data transformation code. Clojure is a functional language; learn how to write programs in a functional style, and when and how to use recursion to your advantage. Discover Clojure's unique approach to state and identity, techniques for polymorphism and open systems using multimethods and protocols, and how to leverage Clojure's metaprogramming capabilities via macros. Finally, put all the pieces together in a real program.
New to this edition is coverage of Clojure's spec library, one of the most interesting new features of Clojure for describing both data and functions. You can use Clojure spec to validate data, destructure data, explain invalid data, and generate large numbers of tests to verify the correctness of your code.
With this book, you'll learn how to think in Clojure, and how to take advantage of its combined strengths to build powerful programs quickly.
What You Need:
Behind every programming language lies a vision of how programs should be built. The vision behind Clojure is of a radically simple language framework holding together a sophisticated collection of programming features. Learning Clojure involves much more than just learning the mechanics of the language. To really get Clojure you need to understand the ideas underlying this structure of framework and features. You need this book: an accessible introduction to Clojure that focuses on the ideas behind the language as well as the practical details of writing code.
Clojure attracts developers on the cutting edge and is arguably the best language for learning to program in the functional style without compromise. But this comes with a steep learning curve. Getting Clojure directly addresses this by teaching you how to think functionally as it teaches you the language. You'll learn about Clojure's powerful data structures and high-level functions, but you'll also learn what it means for a language to be functional, and how to think in Clojure's functional way.
Each chapter of Getting Clojure takes a feature or two or three from the language, explains the syntax and the mechanics behind that feature so that you can make it work before digging into the deeper questions: What is the thinking behind the feature? And how does it fit in with the rest of the language? In Getting Clojure you'll learn Clojure's very simple syntax, but you'll also learn why that syntax is integral the way the language is constructed. You'll discover that most data structures in Clojure are immutable, but also why that leads to more reliable programs. And you'll see how easy it is to write Clojure functions and also how you can use those functions to build complex and capable systems.
With real-world examples of how working Clojure programmers use the language, Getting Clojure will help you see the challenges of programming through the eye of experienced Clojure developers.
You will need to some background in programming. To follow along with the examples in the book, you will need Java 6 or new, Clojure 1.8 or 1.9, and Leiningen 2.
If youâre an experienced programmer who has not worked with Clojure before, this guide is the perfect thorough but gentle introduction for you. Author Carin Meier not only provides a practical overview of this JVM language and its functional programming concepts, but also includes a complete hands-on training course to help you learn Clojure in a structured way.
The first half of the book takes you through Clojureâs unique design and lets you try your hand at two Clojure projects, including a web app. The holistic course in second half provides you with critical tools and resources, including ways to plug into the Clojure community.
The Joy of Clojure, Second Edition is a deep look at the Clojure language. Fully updated for Clojure 1.6, this new edition goes beyond just syntax to show you the "why" of Clojure and how to write fluent Clojure code. You'll learn functional and declarative approaches to programming and will master the techniques that make Clojure so elegant and efficient.
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
About the Technology
About the Book
The Joy of Clojure, Second Edition is a deep account of the Clojure language. Fully updated for Clojure 1.6, this new edition goes beyond the syntax to show you how to write fluent Clojure code. You'll learn functional and declarative approaches to programming and will master techniques that make Clojure elegant and efficient. The book shows you how to solve hard problems related to concurrency, interoperability, and performance, and how great it can be to think in the Clojure way.
Appropriate for readers with some experience using Clojure or common Lisp.
About the Authors
Michael Fogus and Chris Houser are contributors to the Clojure and ClojureScript programming languages and the authors of various Clojure libraries and language features.
Table of Contents
Modern web applications deserve modern tools. Harness the JVM's rich infrastructure while taking advantage of the expressive power and brisk performance of a modern functional language. Exploit Clojure's unique advantages for web development. Step by step, apply the fundamentals of programming in Clojure to build real-world, professional web applications. This edition features new libraries, tools, and best practices, and focuses on developing modern single-page applications. Stop developing web apps with yesterday's tools. Today, developers are increasingly adopting Clojure as a web-development platform. See for yourself what makes Clojure so desirable, as you create a series of web apps of growing complexity, exhibiting the full process of web development using a modern functional language. Journey through all the steps in developing a rich Picture Gallery web application--from conception to packaging and deployment. You'll work hands-on with Clojure and build real-world, professional web apps. This fully updated second edition reveals the changes in the rapidly evolving Clojure ecosystem. Get up to speed on the many new libraries, tools, and best practices. Gain expertise in the popular Ring/Compojure stack using the Luminus framework. Learn how Clojure works with databases and speeds development of RESTful services. See why ClojureScript is rapidly becoming a popular front-end platform, and use ClojureScript with the popular Reagent library to build single-page applications.This book is for you, whether you're already familiar with Clojure or if you're completely new to the language.What You Need:The latest JVM, Clojure 1.6+, and the Leiningen build tool, as well as an editor such as Emacs, IntelliJ, Eclipse, Light Table, or VI.
Professional Clojure is the experienced developer's guide to functional programming using the Clojure language. Designed specifically to meet the needs of professional developers, this book briefly introduces functional programming before skipping directly to the heart of using Clojure in a real-world setting. The discussion details the readâevalâprint workflow that enables fast feedback loops, then dives into enterprise-level Clojure development with expert guidance on web services, testing, datomics, performance, and more. Read from beginning to end, this book serves as a clear, direct guide to Clojure programmingâbut the comprehensive coverage and detail makes it extraordinarily useful as a quick reference for mid-project snags. The author team includes four professional Clojure developers, ensuring professional-level instruction from a highly practical perspective.
Clojure is an open-source programming language maintained and supported by Cognitect., and quickly gaining use across industries at companies like Amazon, Walmart, Facebook, Netflix, and more. This guide provides a concise, yet thorough resource for professional developers needing to quickly put Clojure to work.
The Clojure standard library is a treasure trove of functions and macros that have been battle-tested over the years to solve the most challenging programming problems.
Clojure: The Essential Reference is an extensive reference to the standard library but it doesn't read as a dull list of functions. In addition to providing clear explanations for each topic, this guide is full of real-world examples, links, and background information.
Think in the Clojure way! Once you're familiar with Clojure, take the next step with extended lessons on the best practices and most critical decisions you'll need to make while developing. Learn how to model your domain with data, transform it with pure functions, manage state, spread your work across cores, and structure apps with components. Discover how to use Clojure in the real world, and unlock the speed and power of this beautiful language on the Java Virtual Machine.Clojure Applied gives you the practical, realistic advice and depth of field that's been missing from your development practice. You want to develop software in the most effective, efficient way possible. This book gives you the answers you've been looking for in friendly, clear language.Dive into the core concepts of Clojure: immutable collections, concurrency, pure functions, and state management. You'll finally get the complete picture you've been looking for, rather than dozens of puzzle pieces you must assemble yourself. First, explore the core concepts of Clojure development: learn how to model your domain with immutable data; choose the ideal collection; and write simple, pure functions for efficient transformation. Next you'll apply those core concepts to build applications: discover how Clojure manages state and identity; spread your work for concurrent programming; and create and assemble components. Finally, see how to manage external integration and deployment concerns by developing a testing strategy, connecting with other data sources, and getting your libraries and applications out the door.Go beyond the toy box and into Clojure's way of thinking. By the end of this book, you'll have the tools and information to put Clojure's strengths to work.What You Need:To follow along with the examples in the book, you will need Clojure 1.6, Leinegen 2, and Java 6 or higher.
Manage research, learning and skills at IT1me. Create an account using LinkedIn to manage and organize your IT knowledge. IT1me works like a shopping cart for information -- helping you to save, discuss and share.