Publisher: O'Reilly Media Released: March 2012 Pages: 632
Clojure is a practical, general-purpose language that offers expressivity rivaling other dynamic languages like Ruby and Python, while seamlessly taking advantage of Java libraries, services, and all of the resources of the JVM ecosystem. This book helps you learn the fundamentals of Clojure with examples relating it to the languages you know already, in the domains and topics you work with every day. See how this JVM language can help eliminate unnecessary complexity from your programming practice and open up new options for solving the most challenging problems. Clojure Programming demonstrates the language’s flexibility by showing how it can be used for common tasks like web programming and working with databases, up through more demanding applications that require safe, effective concurrency and parallelism, data analysis, and more. This in-depth look helps tie together the full Clojure development experience, from how to organize your project and an introduction to Clojure build tooling, to a tutorial on how to make the most of Clojure’s REPL during development, and how to deploy your finished application in a cloud environment. - Learn how to use Clojure while leveraging your investment in the Java platform
- Understand the advantages of Clojure as an efficient Lisp for the JVM
- See how Clojure is used today in several practical domains
- Discover how Clojure eliminates the need for many verbose and complicated design patterns
- Deploy large or small web applications to the cloud with Clojure
|
-
Chapter 1 Down the Rabbit Hole -
Why Clojure? -
Obtaining Clojure -
The Clojure REPL -
No, Parentheses Actually Won’t Make You Go Blind -
Expressions, Operators, Syntax, and Precedence -
Homoiconicity -
The Reader -
Namespaces -
Symbol Evaluation -
Special Forms -
Putting It All Together -
This Is Just the Beginning -
Functional Programming and Concurrency -
Chapter 2 Functional Programming - What Does Functional Programming Mean?
- On the Importance of Values
- First-Class and Higher-Order Functions
- Composition of Function(ality)
- Pure Functions
- Functional Programming in the Real World
-
Chapter 3 Collections and Data Structures - Abstractions over Implementations
- Concise Collection Access
- Data Structure Types
- Immutability and Persistence
- Metadata
- Putting Clojure’s Collections to Work
- In Summary
-
Chapter 4 Concurrency and Parallelism - Shifting Computation Through Time and Space
- Parallelism on the Cheap
- State and Identity
- Clojure Reference Types
- Classifying Concurrent Operations
- Atoms
- Notifications and Constraints
- Refs
- Vars
- Agents
- Using Java’s Concurrency Primitives
- Final Thoughts
-
Building Abstractions -
Chapter 5 Macros - What Is a Macro?
- Writing Your First Macro
- Debugging Macros
- Syntax
- When to Use Macros
- Hygiene
- Common Macro Idioms and Patterns
- The Implicit Arguments: &env and &form
- In Detail: -> and ->>
- Final Thoughts
-
Chapter 6 Datatypes and Protocols - Protocols
- Extending to Existing Types
- Defining Your Own Types
- Implementing Protocols
- Protocol Introspection
- Protocol Dispatch Edge Cases
- Participating in Clojure’s Collection Abstractions
- Final Thoughts
-
Chapter 7 Multimethods - Multimethods Basics
- Toward Hierarchies
- Hierarchies
- Making It Really Multiple!
- A Few More Things
- Final Thoughts
-
Tools, Platform, and Projects -
Chapter 8 Organizing and Building Clojure Projects - Project Geography
- Build
- Final Thoughts
-
Chapter 9 Java and JVM Interoperability - The JVM Is Clojure’s Foundation
- Using Java Classes, Methods, and Fields
- Handy Interop Utilities
- Exceptions and Error Handling
- Type Hinting for Performance
- Arrays
- Defining Classes and Implementing Interfaces
- Using Clojure from Java
- Collaborating Partners
-
Chapter 10 REPL-Oriented Programming - Interactive Development
- Tooling
- Debugging, Monitoring, and Patching Production in the REPL
- Limitations to Redefining Constructs
- In Summary
-
Practicums -
Chapter 11 Numerics and Mathematics - Clojure Numerics
- Clojure Mathematics
- Equality and Equivalence
- Optimizing Numeric Performance
- Visualizing the Mandelbrot Set in Clojure
-
Chapter 12 Design Patterns - Dependency Injection
- Strategy Pattern
- Chain of Responsibility
- Aspect-Oriented Programming
- Final Thoughts
-
Chapter 13 Testing - Immutable Values and Pure Functions
- clojure.test
- Growing an HTML DSL
- Relying upon Assertions
-
Chapter 14 Using Relational Databases - clojure.java.jdbc
- Korma
- Hibernate
- Final Thoughts
-
Chapter 15 Using Nonrelational Databases - Getting Set Up with CouchDB and Clutch
- Basic CRUD Operations
- Views
- _changes: Abusing CouchDB as a Message Queue
- À la Carte Message Queues
- Final Thoughts
-
Chapter 16 Clojure and the Web - The “Clojure Stack”
- The Foundation: Ring
- Routing Requests with Compojure
- Templating
- Final Thoughts
-
Chapter 17 Deploying Clojure Web Applications - Java and Clojure Web Architecture
- Running Web Apps Locally
- Web Application Deployment
- Going Beyond Simple Web Application Deployment
-
Miscellanea -
Chapter 18 Choosing Clojure Type Definition Forms Wisely -
Chapter 19 Introducing Clojure into Your Workplace - Just the Facts…
- Emphasize Productivity
- Emphasize Community
- Be Prudent
-
Chapter 20 What’s Next? - (dissoc Clojure 'JVM)
- 4Clojure
- Overtone
- core.logic
- Pallet
- Avout
- Clojure on Heroku
-
Colophon |
- Title:
- Clojure Programming
- By:
- Chas Emerick, Brian Carper, Christophe Grand
- Publisher:
- O'Reilly Media
- Formats:
-
- Print
- Ebook
- Safari Books Online
- Print:
- April 2012
- Ebook:
- March 2012
- Pages:
- 632
- Print ISBN:
- 978-1-4493-9470-7
- | ISBN 10:
- 1-4493-9470-1
- Ebook ISBN:
- 978-1-4493-9474-5
- | ISBN 10:
- 1-4493-9474-4
|
-
Chas Emerick Chas Emerick is the founder of Snowtide Informatics, a small software company in Western Massachusetts. Since 2008, he has helped to develop the core Clojure language and many Clojure open source projects. Chas writes about Clojure, software development practices, entrepreneurship, and other passions at cemerick.com. View Chas Emerick's full profile page. -
Brian Carper Brian Carper is a professional programmer in the field of psychological research. He uses Clojure for data analysis and web development. He's the author of a Clojure-to-CSS compiler and relational database library, and writes about Clojure and other topics at http://briancarper.net. View Brian Carper's full profile page. -
Christophe Grand Christophe Grand is an independent consultant, based near Lyon, France. He tutors, trains and codes primarily in Clojure. A participant in developing the core Clojure language, he also authored the Enlive and Moustache libaries and is a contributor to Counterclockwise, the Clojure IDE for Eclipse. Christophe writes on Clojure at clj-me.cgrand.net. View Christophe Grand's full profile page. |
Colophon The animal on the cover of Clojure Programming is a painted snipe. The painted snipes (family Rostratulidae) comprise three species: the Greater Painted Snipe, the Australian Painted Snipe, and the South American Painted Snipe. These shorebirds are distinct from the true snipes, and, as their name implies, also much more colorful. They may be more closely related to jacanas or sandpipers. Painted snipe live in marshes, swamps, and other wetlands, and they eat a varied diet of seeds, rice, millet, insects, snails, and crustaceans. They are solitary and “skulking,” except during breeding season, so they are difficult to spot. The Greater Painted Snipe (Rostratula benghalensis) lives in Africa, India, and Southeast Asia. The Australian Painted Snipe (R. australis), long considered a subspecies, is found only in Australia and is classified as endangered. These two species of painted snipe exhibit an unusual sexual dimorphism, with the females larger and more brightly colored than the males. They are polyandrous, with the female courting several males, and the males take responsibility for incubating the eggs and raising the chicks. The South American Painted Snipe (Nycticryptes semicollaris) is found in the southern parts of that continent. It can be distinguished from the other painted snipes by its webbed toes. The South American Painted Snipe mates monogamously and doesn’t display the same degree of sexual dimorphism as the Greater and Australian species. It is hunted for food in Chile and Argentina. The cover image is from Riverside Natural History. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont’s TheSansMonoCondensed. |
|
Description
|
Table of Contents
|
Product Details
|
About the Author
|
Colophon
|
 |
|
 |
|
|
|
Recommended for You
|
Recently Viewed
|
 |
|
By Michael Schmalz
January 2012
Ebook: $9.99
Print & Ebook: $21.99
Print: $19.99
By Jamie Munro
September 2011
Ebook: $16.99
Print & Ebook: $21.99
Print: $19.99
By Sun Ruoyu
July 2011
Ebook: $12.99
Print & Ebook: $21.99
Print: $19.99
|
Customer Reviews
4/24/2012 (2 of 2 customers found this review helpful) 5.0Very good signal/noise ratio By novemberain from Moscow, Russia About Me Developer, Educator - Accurate
- Concise
- Covers the ecosystem
- Easy to understand
- Helpful examples
- Well-written
- Expert
- Intermediate
- Novice
- Student
|
|
|