home libri books ebook dvd e film top ten sconti 0 Carrello


Torna Indietro

anderson jeremy; gaare michael; holguín justin; bailey nick; pratley timothy - professional clojure

Professional Clojure

; ; ; ;


Disponibilità: solo 2 copie disponibili, compra subito!

Se ordini entro 21 ore e 58 minuti, consegna garantita in 48 ore lavorative
scegliendo le spedizioni Express


PREZZO
€ 45,50
NICEPRICE
€ 38,68
SCONTO
15%


Facebook Twitter Aggiungi commento


Dettagli

Genere:Libro
Lingua: Inglese
Editore: Wrox
Pubblicazione: 07/2016





Note Editore

Professional guide to functional programming with Clojure

A modern dialect of Lisp, designed for concurrency and Java compatibility, Clojure offers the solutions many developers are seeking. Clojure's versatility and functionality are drawing more and more attention among enterprise–level developers, especially those looking to streamline their workflow with a step away from imperative programming. This book offers complete reference for the professional, with clear instruction and practical perspective on using Clojure in a real–world setting. Functional programming fundamentals are followed by Clojure–specific guidance, with insight from expert Clojure contributors. As the demand for experienced Clojure developers continues to grow, this guide provides the essential reference professionals need to get up to speed quickly.

Professional Clojure:

  • Explores the gap between functional and object–oriented programming, and how Clojure provides a solution for that space
  • Describes the read–eval–print loop workflow used in declarative programming for fast feedback loops
  • Demonstrates the use of ClojureScript in the design and development of reactive web pages
  • Explains Clojure's features, performance, capabilities, and the versatile compatibility that makes it an essential language
  • Covers web services, testing, the datomic database, and much more for a complete professional reference and tutorial
  • Provides practical insight on real–world applications from expert programmers and Clojure contributors

Wrox Professional guides are planned and written by working programmers to meet the real–world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job.





Sommario

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





Autore

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.





Consigliati dai Librai

CREARE UNA WEB APPLICATION CON JAVA IN 24H
Java For Dummies
Java Programming for Android Developers For Dummies
Professional Scala
CONCETTI DI INFORMATICA E FONDAMENTI DI JAVA




Altre Informazioni

ISBN: 9781119267270
Collana: WROX PROGRAMMER TO PROGRAMMER
Dimensioni: 234 x 12.79 x 188 mm Ø 456 gr
Formato: Brossura
Pagine Arabe: 264






Utilizziamo i cookie di profilazione, anche di terze parti, per migliorare la navigazione, per fornire servizi e proporti pubblicità in linea con le tue preferenze. Se vuoi saperne di più o negare il consenso a tutti o ad alcuni cookie clicca qui. Chiudendo questo banner o proseguendo nella navigazione acconsenti all’uso dei cookie.

X