Building Table Views with Phoenix LiveView

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Data is at the core of every business, but it is useless if nobody can access and analyze it. Learn how to generate business value by making your data accessible with advanced table UIs. This definitive guide teaches you how to bring your data to the fingertips of nontechnical users with advanced features like pagination, sorting, filtering, and infinity scrolling. Build reactive and reuseable table components by leveraging Phoenix LiveView, schemaless changesets, and Ecto query composition. Table UIs are the bread and butter for every web developer, so it is time to learn how to build them right. As a web developer, you have to build tables. Lots and lots of tables. With table UIs making up such a significant part of your daily work, you need to know how to build the right table for the task, with all the needed features. Building a simple table is easy, but tables only become really useful with advanced features like pagination, sorting, and filtering. That’s where building a table can quickly become complicated. This book shows you how to implement advanced table features in a clean and reusable way. You’ll build fast and interactive table UIs by leveraging Phoenix LiveView. Make vast amounts of data manageable with common but complex features like pagination, sorting, filtering, and inifinity scrolling. Use SOLID coding principles to make your queries reusable with query composition. Compartmentalize your UI with LiveComponents and learn how to handle user input securely with schemaless changesets. Share your view onto the data painlessly by storing your search parameters in the URL. Data is one of the most valuable assets of your business, but you cannot unlock its potential if you don’t know how to make it accessible. This book shows you how to deliver that data to your users’ fingertips quickly. What You Need You’ll need Elixir 1.12 or later, Erlang/OTP 24 or later, Phoenix 1.6 or later, and PostgreSQL installed on your machine.

Author(s): Peter Ullrich
Edition: 1
Publisher: Pragmatic Bookshelf
Year: 2023

Language: English
Commentary: Publisher's PDF
Pages: 65
City: Raleigh, NC
Tags: Elixir; User Interface; Ecto; Phoenix

Cover
Table of Contents
Acknowledgments
Introduction
1. Building a Simple Table UI
Creating the Schema and Context
Creating the LiveView
Wrapping Up
2. Sorting the Table
Sorting the Data in the Database
Setting up LiveView
Sorting with LiveComponent
Parsing and Assigning the Sorting Parameters
Putting the SortingForm to Use
Wrapping up
3. Filtering the Table
Filtering in the Database
Creating the Filter LiveComponent
Adding the Filter to the LiveView
Wrapping Up
4. Paginating the Table
Paginating in the Database
Creating the Pagination LiveComponent
Adding Pagination to the LiveView
Wrapping Up
5. Paginating the Table Using Infinity Scrolling
Setting up the Context
Creating the LiveView
Adding the LiveView Client Hook
Wrapping Up