Buy Professional Clojure Book by Nick Bailey - Bookswagon
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Home > Computing and Information Technology > Computer programming / software engineering > Programming and scripting languages: general > Professional Clojure
Professional Clojure

Professional Clojure


     0     
5
4
3
2
1



Out of Stock


Notify me when this book is in stock
X
About the Book

Clear, practical Clojure for the professional programmer

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.

  • Parse the difference between functional and object-oriented programming
  • Understand Clojure performance and capabilities
  • Develop reactive web pages using ClojureScript
  • Adopt an REPL-driven development workflow

Clojure is a modern dialect of Lisp, designed for concurrency and Java compatibility. It can be used with the Java virtual machine, Microsoft's Common Language Runtime, and JavaScript engines, providing a level of both versatility and functionality that is appealing to more and more enterprise-level developers. As requirements grow increasingly complex, stepping away from imperative programming can dramatically streamline the development workflow. Professional Clojure provides the expert instruction that gets professionals up to speed and back to work quickly.



Table of Contents:

INTRODUCTION xv

CHAPTER 1: HAVE A BEGINNER’S MIND 1

Functional Thinking 2

Value Oriented 2

Thinking Recursively 5

Higher Order Functions 8

Embracing Laziness 11

When You Really Do Need to Mutate 12

Nil Punning 15

The Functional Web 16

Doing Object-Oriented Better 16

Polymorphic Dispatch with defmulti 18

Defining Types with deftype and defrecord 20

Protocols 21

Reify 22

Persistent Data Structures 23

Shaping the Language 27

Summary 29

CHAPTER 2: RAPID FEEDBACK CYCLES WITH CLOJURE 31

REPL-Driven Development 32

Basic REPL Usage with Leiningen 32

Remote REPLs with nREPL 34

REPL Usage with a Real Application 35

Connecting Your Editor to a REPL 39

Reloading Code 40

Reloading Code from the REPL 40

Automatically Reloading Code 43

Writing Reloadable Code 49

Summary 51

CHAPTER 3: WEB SERVICES 53

Project Overview 53

Namespace Layout 54

Elements of a Web Service 55

Libraries, Not Frameworks 55

HTTP 55

Routing 64

JSON Endpoints 70

Example Service 74

Create the Project 75

Additional Namespaces 75

Default Middleware 77

The Storage Protocol 78

Handlers 83

Middleware 88

Routes 89

Deployment 94

Using Leiningen 94

Compiling an Uberjar or Uberwar 95

Hosting 96

Summary 97

CHAPTER 4: TESTING 99

Testing Basics with clojure.test 100

with-test 101

deftest 101

are 102

Using Fixtures 103

Testing Strategies 104

Tests Against DB 104

Testing Ring Handlers 106

Mocking/Stubbing Using with-redefs 108

Redefining Dynamic Vars 110

Record/Replay with VCR 111

Measuring Code Quality 112

Code Coverage with Cloverage 112

Static Analysis with kibit and bikeshed 114

Keeping Dependencies Under Control 116

Testing Framework Alternatives 119

Expectations 119

Speclj 119

Cucumber 120

Kerodon 126

Summary 127

CHAPTER 5: REACTIVE WEB PAGES IN CLOJURESCRIPT 129

ClojureScript Is a Big Deal 129

A First Brush with ClojureScript 131

Starting a New ClojureScript Project 132

Getting Fast Feedback with Figwheel 132

Creating Components 134

Modeling the Data 135

Responding to Events and Handling State Change 136

Understanding Errors and Warnings 137

Namespace Layout 141

Styling 141

Form Inputs and Form Handling 142

Navigation and Routes 145

HTTP Calls: Talking to a Server 147

Drag and Drop 149

Publishing 150

Reagent in Depth 151

Form 1: A Function That Returns a Vector 151

Form 2: A Function That Returns a Component 152

Form 3: A Function That Returns a Class 153

Sequences and Keys 154

Custom Markup 155

Reactions 156

A Note on Style 158

Testing Components with Devcards 159

Interop with JavaScript 162

One Language, One Idiom, Many Platforms 164

Things to Know About the Closure Compiler and Library 164

Modeling State with DataScript 165

Go Routines in Your Browser with core.async 166

Summary 167

CHAPTER 6: THE DATOMIC DATABASE 169

Datomic Basics 170

Why Datomic? 170

The Datomic Data Model 172

Querying 175

Transactions 181

Indexes Really Tie Your Data Together 183

Datomic’s Unique Architecture 187

Modeling Application Data 188

Example Schema for Task Tracker App 188

Entity ids and Partitions 196

Datomic’s Clojure API 197

Basic Setup 197

Experimenting in the REPL 200

Building Applications with Datomic 206

User Functions 206

Account Functions 209

Task Functions 210

Deployment 213

The Limitations 214

Summary 215

CHAPTER 7: PERFORMANCE 217

What Is Performance? 219

Choosing the Right Data Structure Is a Prerequisite for Performance 219

Benchmarking 221

Timing Slow Things 221

Use Criterium for Timing Fast Things 223

Use Test Selectors for Performance Tests 225

Parallelism 225

Memoization 226

Inlining 227

Persistent Data Structures 228

Safe Mutation with Transients 228

Profi ling 229

Avoiding Reflection with Type Hinting 230

Java Flags 232

Math 232

Summary 232

INDEX 235



About the Author :

About the authors

Jeremy Anderson is a Developer at Code Adept, and a Clojure contributor.

Michael Gaare is the platform technical lead at Nextangles, a financial technology startup.

Justin Holguín is a software engineer at Puppet Labs, where he specializes in Clojure backend services.

Nick Bailey is a Clojure enthusiast and the maintainer of the Clojure java.jmx library. He is a software architect at DataStax.

Timothy Pratley is a Clojure contributor at Outpace Systems, Inc.

Visit us at wrox.com where you have access to free code samples, Programmer to Programmer forums, and discussions on the latest happenings in the industry from around the world.



Review :

"A book that makes you think, from the first chapter's dive into thoughtful code-led examples, and covers web services, testing and performance. Brings you closer to functional thinking." (MagPi, October 2016)


Best Sellers


Product Details
  • ISBN-13: 9781119267294
  • Publisher: John Wiley & Sons Inc
  • Publisher Imprint: Standards Information Network
  • Language: English
  • ISBN-10: 1119267293
  • Publisher Date: 25 May 2016
  • Binding: Digital (delivered electronically)
  • No of Pages: 264


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Professional Clojure
John Wiley & Sons Inc -
Professional Clojure
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Professional Clojure

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!