Clojure Web Development Essentials

Develop your own web application with the effective use of the Clojure programming language

Clojure Web Development Essentials

This ebook is included in a Mapt subscription
Ryan Baldwin

Develop your own web application with the effective use of the Clojure programming language
$0.00
$18.90
$44.99
$29.99p/m after trial
RRP $26.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781784392222
Paperback232 pages

Book Description

Functional programming enables developers to create and deploy applications quickly and easily. Using the Clojure programming language and the Leiningen build tool, this book teaches you how to leverage various Clojure libraries into the building blocks of a web-based application.

We'll start by generating a new, fully runnable, baseline web application using the Leiningen Luminus template. From there we'll examine the different pieces that compose our application, and learn the basics of the underlying Ring framework. Subsequent chapters will focus on each technology and leverage those technologies to build additional functionality into our application. You'll learn how to validate user submitted data, authentication, account creation, how to interact with a database, and more. Finally, we'll create an environment configuration and deploy our app.

By the end of this book you'll have created a full fledged application from start to finish, and you'll have the requisite skills to develop an efficient and robust web application.

Table of Contents

Chapter 1: Getting Started with Luminus
Leiningen
Dependencies of the app
Luminus file structure
Summary
Chapter 2: Ring and the Ring Server
Understanding Ring in Clojure
What is the Ring Server?
Configuring and running the Ring Server
Summary
Chapter 3: Logging
What is Timbre?
Configuring a Timbre appender
Logging with Timbre
Adding an appender
Summary
Chapter 4: URL Routing and Template Rendering
What is Compojure?
Creating a Compojure route
What is Selmer?
Creating your first page
Editing the home page
Serving the signup form
Creating the signup page
Summary
Chapter 5: Handling Form Input
Handling the form POST
Validating the form POST
Summary
Chapter 6: Testing in Clojure
The necessity of testing
Anatomy of a test
Writing and running our first test
Writing a high-level integration test
Summary
Chapter 7: Getting Started with the Database
Creating the database schema
Maintaining the database schema
Adding data to the database
Summary
Chapter 8: Reading Data from the Database
Creating the catalog
Fetching albums from the database
Creating the recently added route
Rendering the results
An exercise!
Summary
Chapter 9: Database Transactions
Introduction to Database Transactions
The ACID properties
Importance of database transactions
Implementing a transaction
Extending the application requirements in brief
Summary
Chapter 10: Sessions and Cookies
Sessions
Setting up sessions
Interacting with the session
Restricted routes
Cookies
Extending the application: brief requirements
Summary
Chapter 11: Environment Configuration and Deployment
Environ
Setting and resolving environment configurations
Adjusting the database connection
Deploying the hipstr application
Summary

What You Will Learn

  • Generate a fully runnable web application using the Luminus Leiningen application template
  • Explore the basics of the underlying Ring framework and the Ring Server
  • Configure URL Routing, Logging, and some testing basics
  • Create new web pages using the Selmer template rendering library
  • Validate user-submitted form data
  • Store and retrieve data to and from a database
  • Configure, package, and deploy the finished application

Authors

Table of Contents

Chapter 1: Getting Started with Luminus
Leiningen
Dependencies of the app
Luminus file structure
Summary
Chapter 2: Ring and the Ring Server
Understanding Ring in Clojure
What is the Ring Server?
Configuring and running the Ring Server
Summary
Chapter 3: Logging
What is Timbre?
Configuring a Timbre appender
Logging with Timbre
Adding an appender
Summary
Chapter 4: URL Routing and Template Rendering
What is Compojure?
Creating a Compojure route
What is Selmer?
Creating your first page
Editing the home page
Serving the signup form
Creating the signup page
Summary
Chapter 5: Handling Form Input
Handling the form POST
Validating the form POST
Summary
Chapter 6: Testing in Clojure
The necessity of testing
Anatomy of a test
Writing and running our first test
Writing a high-level integration test
Summary
Chapter 7: Getting Started with the Database
Creating the database schema
Maintaining the database schema
Adding data to the database
Summary
Chapter 8: Reading Data from the Database
Creating the catalog
Fetching albums from the database
Creating the recently added route
Rendering the results
An exercise!
Summary
Chapter 9: Database Transactions
Introduction to Database Transactions
The ACID properties
Importance of database transactions
Implementing a transaction
Extending the application requirements in brief
Summary
Chapter 10: Sessions and Cookies
Sessions
Setting up sessions
Interacting with the session
Restricted routes
Cookies
Extending the application: brief requirements
Summary
Chapter 11: Environment Configuration and Deployment
Environ
Setting and resolving environment configurations
Adjusting the database connection
Deploying the hipstr application
Summary

Book Details

ISBN 139781784392222
Paperback232 pages
Read More

Read More Reviews