Usage

Consistency and iteration

Some things are common in admins: rendering lists, editing records, or searching a collection. It's often faster to reimplement them each time they come up. But this can lead to problems when working as part of a large team with many admins.

  1. Each time you start using a new codebase, you must relearn how the code is organized. Various methods of sorting and filtering tables and rendering JavaScript templates is mixed in with what can be complex domain-specific JavaScript.
  2. Component complexity outgrows first-draft architecture. Rendering a sortable table of items may be simple at first, but more complex interaction might be required later. As new features come up, like adding search or updating records on the backend, iteration can lead to duplicating work.

Adcom's plugins are designed to let you handle simple things in the same way every time. For example, List.js lets you render a first draft of a collection in seconds, but provides hooks for adding interaction later without changing architecture. Complex pieces like server-side search or plugin-powered filtering can be swapped in without changing how you initialize or render content.

Grounding interaction in HTML

Adcom's iteractions are modeled after Bootstrap's, in that they're designed to integrate directly into your rendered HTML with data-attributes without having to write JavaScript yourself. This helps keep your page's DOM as the starting point for understanding how your site works.