Skip to content
This repository was archived by the owner on Apr 9, 2024. It is now read-only.

如何理解 Chunk 的设计和实现思路? #51

@nuysoft

Description

@nuysoft

Chunk 继承了 KISSY.RichBase、KISSY.Base、KISSY.Attribute、KISSY.Event 的功能,组合了 Dataset、Tmpler,还是 Brick、Pagelet 的父类。

感觉 Chunk 类似于 Model + View 的混合体,因为功能点上几乎等价。但是 chunk、bricks、pagelete 并不以 MVW(Model-View-Whatever)的结构分层,而是以模板、数据、事件&行为划分,Chunk 中包含了模板、数据,事件则在 Brick、Pagelete 中支持。刚阅读 chunk.js 时,觉得这种设计思路跳出了吵闹的 MVW 模式,隔了个周末再读,又感觉似乎是 MVW 的概念简化版,详细阐述下?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions