Server-Driven Web Apps with htmx

by R. Mark Volkmann

Programming

Book Details

Book Title

Server-Driven Web Apps with htmx

Author

R. Mark Volkmann

Publisher

Pragmatic Bookshelf City: Dallas, Texas

Publication Date

2024

ISBN

9798888650769

Number of Pages

182

Language

English

Format

PDF

File Size

1.39MB

Subject

Server-Driven Architecture

Table of Contents

  • Cover
  • Table of Contents
  • Foreword
  • Acknowledgments
  • Preface
  • Required Knowledge
  • 1. Jumping In
  • Choosing a Tech Stack
  • Using htmx Attributes
  • Creating Your First Project
  • Creating a CRUD Application
  • Your Turn
  • Wrapping Up
  • 2. Exploring Server Options
  • Making the Grade
  • Popular Choices
  • Our Choice
  • JavaScript Tooling
  • Your Turn
  • Wrapping Up
  • 3. Developing Endpoints
  • HTTP Requests
  • HTTP Responses
  • Endpoint Targets
  • Widening the Scope
  • Performing Out-of-Band Swaps
  • Triggering Events
  • Putting It Into Practice
  • Your Turn
  • Wrapping Up
  • 4. Recipes for Common Scenarios
  • Boosting
  • Lazy Loading
  • Input Validation with API Calls
  • Deleting an Element
  • CSS Transitions
  • Resetting a Form
  • Active Search
  • Optimistic Updates
  • Pagination
  • Infinite Scroll
  • Toggling Selection
  • Polling
  • Custom Dialogs
  • Adding Headers to All Requests
  • Click to Edit
  • HTML and JSON Endpoints
  • Automating Reload
  • Your Turn
  • Wrapping Up
  • 5. Implementing Interactivity
  • Alpine
  • _hyperscript
  • Your Turn
  • Wrapping Up
  • 6. Utilizing the htmx JS API
  • DOM Methods
  • Styling Methods
  • Event Methods
  • Other Methods
  • htmx.config Object
  • htmx.ajax Method
  • htmx.process Method
  • Your Turn
  • Wrapping Up
  • 7. Adding Security
  • Scrutinize Resources
  • Escape User-Supplied Content
  • Sanitize User-Supplied Content
  • Make Cookies Secure
  • Make CDN Downloads Safer
  • Specify a Content Security Policy
  • Cross-Site Scripting Attacks (XSS)
  • Your Turn
  • Wrapping Up
  • 8. Beyond Request/Response
  • WebSockets
  • Server-Sent Events (SSE)
  • Your Turn
  • Wrapping Up