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

delogic

v0.0.1

Published

一种 UI & 逻辑分离的编程设计思路。

Downloads

6

Readme

delogic

一种 UI & 逻辑分离的编程设计思路。

  • UI 层仅依赖 Service,基本上为纯 UI 组件
  • Service 代码只依赖 DAO 的 interface,不依赖具体 DAO 实现,TodoService

image

Quick Start

$ git clone [email protected]:pipe/delogic.git
$ cd delogic
$ lerna bootstrap
$ cd packages/todo-page && npm run dev

Online Demo

todolist

Principle

  • UI
    • 【允许】和 DOM、Service 交互
    • 【禁止】直接和 DAO 做数据交互
    • 【允许】自身组件的临时存储和状态,但不应过于复杂
  • Service
    • 【禁止】和 DOM 交互,任何 document.querySelector 都不允许
    • 【禁止】任何(除 DAO 外的)IO 交互,包括网络 IO(fetch)、本地 IO(localStorage)
    • 【允许】和 DAO 交互,所有 IO 都通过 DAO 接口
  • DAO Interface
    • 【仅】做数据模型定义,即模型字段的定义
  • DAO Implement
    • 【禁止】和 DOM 交互