nent-dxp
v0.6.1-beta.2
Published
Add DXP-NENT element hinting, snippets, and autocomplete for HTML files. Learn more about building web applications directly with HTML here: https://nent.dev
Downloads
28
Maintainers
Readme
NENT: Web Application Elements
What is NENT?
NENT is a library of functional elements (web components) that extend HTML with web application-specific features.
'Nent' comes from the word component and is my tech-brain's uncreative attempt at branding.
Motivation
The goal of this project is to empower the next generation of web developers to create web experiences with less development and deployment friction, all within the semantics of HTML. (Truth: I just needed to make high-performing, lightweight, web applications quickly -- without a complex build or framework - declarative applications are a happy side-effect).
Declared Functionality
Each element encapsulates a feature or function. Functions like URL-routing, dynamic content, data-merged templates, and reusable partials can be individually used without pulling in an entire framework or library.
Simple web experiences can be completely declared using HTML.
Declarative-Applications:
- Are easier to understand and reason about
- Easier to maintain, with reduced side-effects
- Deterministic and testable with static-analysis
- More approachable to a wider range of skill levels
System Groups
The elements are named and grouped by their sub-system. In some cases, shared services are enabled with a system-level element.
Sub-systems add functionality to other systems. For instance, view routes can use data expressions in their content when the data system is included.
Views: <n-views-*>
Independent routing and navigation system.
- Single Page Application Routing
- Fast navigation between views
- Page History
- Route Transitions
- Nested Layouts
- Nav Links with Active Route detection
- Nav Lists:
Nav-Bars, Child Menus, and Breadcrumbs - Guided Navigation
Content: <n-content-*>
Independent elements for features around content HTML.
- Content Templates
- Deferred Content
- Content Data Injection
- Markdown Rendering
- Remote HTML / Partials
App: <n-app-*>
Independent elements related to the file as an application.
- App Console Logging
- App Theme Detection & Control
- UI Component Kit Integrations (Ionic, shoelace, Material, etc)
- PWA Support (coming)
- Expose Event/Actions to the DOM
Actions: <n-action-*>
Data structure elements to declare functions and their activations.
- Declared Actions
- Reactive Activators
- Add Custom Async Functions
Data: <n-data-*>
Optional enhancements elements to add data-functionality and data-providers.
- Expression Evaluation
- Token Resolution
- Conditional Rule Evaluation
Elements: <n-elements>
An optional element that creates an action listener to handle requests for light DOM updates
Audio: <n-audio-*>
Optional audio elements to display a player and create an action listener for audio commands. The player orchestrates audio playback in an opinionated format, with best practices.
- Voice-over Audio
- Event Sounds
- Background Music
Analytics: <n-analytics>
An optional element that creates an action listener that delegates analytics-specific events and route-changes to a script-configurable element for integration.
- Page Views
- View Times
- Custom Events
Video: <n-video-*>
Optional wrapper element to normalize video events between various video players to enable media-timed events for synchronized actions. Useful for automatically navigating when a video ends or updating the content based on the video time.
Installation
This is a pre-release project and is subject to breaking changes and incomplete features. Thank you for trying it out!
Add a script-reference to the page head:
CDN:
<head>
<script
type="module"
src="https://cdn.jsdelivr.net/npm/@nent/core/dist/esm/nent.jss"
></script>
</head>
NPM:
<head>
...
<script
type="module"
src="~/node_modules/@nent/core/dist/esm/nent.esm.js"
></script>
....
</head>
npm i @nent/core
# or
yarn add @nent/core
Learn More
The best way to see what these elements in action, is to take a look at the documentation demo. The installable app is built using these elements in a single HTML file (with child-routes and partials lazy-loaded, as-needed).
Contact
If you like the idea, join us! Or give it a star.
If you have requests, ideas or feedback, join the discussion on Gitter:
Reach out to me personally:
Contributions
Built on the shoulders of giants!
Thank you to the Ionic team and their fabulous Stencil.js SDK for the best way to build lightning-fast, native elements.
Also, thank you to the creators and contributors to all open-source efforts, but especially to the libraries we love and use in our plugin components:
- expr-eval: declarative expression parser used in n-data
- jsonata: declarative data query/filter/transformation used in n-content-repeat
- howler: easy-to-use audio playback tools used in n-audio
- remarkable: ridiculously fast markdown processing. used in n-content-markdown