npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ofa.js

v4.4.14

Published

pure web front-end componentized framework that does not require the use of nodejs

Downloads

77

Readme

ofa.js

GitHub license GitHub license

Official Documentation / 官方文档 / 官方文檔 / Sitio oficial de documentación / 公式ドキュメントサイト / 공식 문서 사이트

What is ofa.js?

ofa.js is a library for building web interfaces and applications. You can start developing with it by including a script tag in your HTML, making it one of the best alternatives to jQuery.

ofa.js can be used as a library like jQuery and can also be employed for developing large web applications similar to React, Vue, and Angular. Its introduction eliminates the need for tools like npm, Node.js, and webpack that are unrelated to interface development, making web interface development easier and more efficient.

How to Use

To start using ofa.js, simply add a reference to ofa.js in your HTML file.

<script src="https://cdn.jsdelivr.net/gh/kirakiray/[email protected]/dist/ofa.min.js"></script>

User Experience

You can try out specific user experiences here.

The core idea of ofa.js is to simplify the encapsulation of web components. Traditional web component encapsulation requires a substantial amount of knowledge, which has led to slower development in the web components field. The Web Components v1 standard, for example, has been supported since 2018 but is still not widely adopted.

With ofa.js, however, you can quickly create a component by just creating an HTML file. Others can reference this component with a simple tag without the need for a pre-bundling process, significantly reducing the learning curve and allowing you to focus on application requirements.

<!-- my-component.html -->
<!-- Encapsulated component code written in an HTML file -->
<template component>
    ...
</template>
<!-- Using the encapsulated component -->
<script src="https://cdn.jsdelivr.net/gh/kirakiray/[email protected]/dist/ofa.min.js"></script>
<l-m src="./my-component.html"></l-m>
<my-component>
    ...
</my-component>

In addition, ofa.js also introduces template syntactic sugar similar to Angular and Vue, making it more efficient to work on web components.

Why Develop ofa.js?

The development of ofa.js aims to eliminate unnecessary interference in frontend development by npm, Node.js, and webpack. These tools have increased the entry barrier for using frontend frameworks and components, making frontend development more complex. When developing complex frontend applications, a significant amount of time and effort is spent on learning and resolving issues related to Node.js and webpack.

The author has worked with Vue and React for many years and initially thought that they were not convenient due to a lack of familiarity. However, with years of experience, the author gradually realized that they were genuinely inconvenient.

For example, for back-end developers who just want to create a clean and beautiful form page, they have to master some front-end basics (e.g., npm/nodejs/webpack/create-app-cli) before they can start building components using frameworks like React, Angular, or Vue. At this point, they may get frustrated and ask, "I just want a pretty page, why do I have to learn all this new stuff?" Or run into errors while fiddling with npm/nodejs/webpack and fall back to the jQuery forms they've used before. And now, there's ofa.js available, which is a great alternative to jQuery for such simple page needs.

The author believes that the original intention of Angular.js (v1) and jQuery was correct because they lowered the entry barrier. However, with the rise of Node.js and the introduction of pre-compilation, frontend development deviated. The author believes that frontend development should maintain JavaScript's instant execution feature instead of over-relying on pre-compilation. The author also appreciates Node.js's contributions to the community, as it has propelled the rapid development of JavaScript.

ofa.js is also a natural microfrontend framework, as you will discover when you use it.

License

ofa.js is licensed under the MIT License.