3 Architectural Modes for ln-table
Ashlar provides three distinct architectural paradigms for data grids, allowing you to choose the exact trade-off between SEO/initial paint, client memory, and network throughput:
-
1. SSR Pre-Rendered Table
HTML
View SSR Demo →<tr>DOM elements emitted by backend (PHP/Node). Instant initial paint & SEO. Zero client template compile. In-memory DOM sorting & filtering. -
2. Remote API & Virtual Window (Active)
Paginates infinite backend data on-demand via
Active Demoln-api-connector. Ideal for huge databases (100k+ records) with server-side SQL/querying. -
3. Injected JSON Seed
Backend injects 1,000+ JSON records directly into
View Injected Seed Demo →<script type="application/json">. Ingested intoln-data-storein 0ms. Rendered via Cheetah/Glide virtual DOM row recycling pool (~35 recycled rows).
Overview & Architecture
This page demonstrates a pure Client-Side Data Architecture coordinating
ln-table and ln-api-connector via ln-data-coordinator, with no
client-side store. There are no pre-rendered SSR rows in <tbody> — rows are fetched
remotely from the backend (api.php) on demand and rendered dynamically using
<template data-ln-template="hybrid-docs-row">.
Data Flow & Lifecycle
- Mount & Request Initial. On initialization,
ln-tableenters sliding-window mode and emitsln-table:request-datafor page 0. - Transport.
ln-data-coordinatorforwards the request toln-api-connector, which fetches the page (offset/limit) fromapi.phpand returns it to the table's window cache. There is no client-side store and no IndexedDB. - Template Rendering.
ln-tableingests the records and stamps them out viahybrid-docs-rowtemplate into<tbody>. - Virtual Windowing. As the user scrolls,
ln-tablerequests page-aligned slices and keeps at most 1,000 rows resident, while only the viewport rows are in the DOM. A new search, sort or filter restarts the window at page 0.
What each control is wired to
The toolbar search and department/status popovers dispatch to ln-data-coordinator
(hybrid-docs). Each sortable header carries an ln-sort control whose
ln-sort:change event is intercepted. The ln-data-coordinator coordinates fetching
new pages from the backend (api.php) via the ln-api-connector and delivering them
to the table's window.
Integration Log Terminal
Interactive Table Demo
|
Title
|
Department
|
Status
|
Priority
|
Owner
|
Size
|
Updated
|
||
|---|---|---|---|---|---|---|---|---|
No documents found
No results found
Try refining your search terms.