hplus
v1.0.3
Published
--hplus js is a lightweight, simple, and easy-to-use next-generation front-end framework. Its purpose is to enhance the interactivity between HTML itself and data,thoroughly realizing the coding analysis of JavaScript and HTML, while still being able to a
Downloads
4
Readme
--hplus js is a lightweight, simple, and easy-to-use next-generation front-end framework. Its purpose is to enhance the interactivity between HTML itself and data,thoroughly realizing the coding analysis of JavaScript and HTML, while still being able to achieve data display and collection
html natural defect
Since the invention of HTML, it has always been used for hypertext presentation, suffering from a lack of scalability and interactivity. Although W3C has been constantly improving HTML, this defect has never been completely resolved.
e.g. We want to assign a data attribute to the select element, and when we assign values such as "english", "spanish", "french", "german" to the data attribute, it can automatically generate four elements like English
<select id="languages" name="languages" data>
<option value="english">English</option>
<option value="spanish">Spanish</option>
<option value="french">French</option>
<option value="german">German</option>
</select>
The two core issues addressed by modern JavaScript frameworks are:
How to render data-related HTML to the user interface (UI)?
How to get user input data form UI to model?
Angular React Vue defect
The dominance of JavaScript in controlling everything has led to the increasing complexity of frameworks, yet they are often perceived as being limited to single-page applications only.
The practice of mixing JavaScript and HTML together is not conducive to the separation of the UI layer and logic, and it is even less conducive to the development of HTML
Nowadays, we strongly recommend that W3C improve HTML, but before W3C makes any changes, we propose a solution
e.g ol has a custom attribute h-data="menu",h-data is a marker that indicates the child elements of this element need to be rendered based on data
<div>
<ol h-data="menu">
<li template class="template"><a href="{{b}}" text="{{a}}"></a></li>
</ol>
</div>