惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 三生石上(FineUI控件)
Hugging Face - Blog
Hugging Face - Blog
M
MIT News - Artificial intelligence
T
Tailwind CSS Blog
Webroot Blog
Webroot Blog
S
Secure Thoughts
N
News and Events Feed by Topic
月光博客
月光博客
TaoSecurity Blog
TaoSecurity Blog
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
N
News | PayPal Newsroom
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
小众软件
小众软件
Recent Commits to openclaw:main
Recent Commits to openclaw:main
P
Privacy & Cybersecurity Law Blog
GbyAI
GbyAI
K
Kaspersky official blog
WordPress大学
WordPress大学
P
Proofpoint News Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
博客园 - 叶小钗
W
WeLiveSecurity
Jina AI
Jina AI
The Cloudflare Blog
Project Zero
Project Zero
Simon Willison's Weblog
Simon Willison's Weblog
V
Vulnerabilities – Threatpost
L
LangChain Blog
Forbes - Security
Forbes - Security
PCI Perspectives
PCI Perspectives
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
Recorded Future
Recorded Future
博客园 - 【当耐特】
H
Heimdal Security Blog
A
About on SuperTechFans
Cisco Talos Blog
Cisco Talos Blog
T
Threat Research - Cisco Blogs
云风的 BLOG
云风的 BLOG
Spread Privacy
Spread Privacy
L
LINUX DO - 最新话题
L
Lohrmann on Cybersecurity
Last Week in AI
Last Week in AI
Google DeepMind News
Google DeepMind News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
I
Intezer
Martin Fowler
Martin Fowler
S
Securelist
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint

博客园 - Roy Zhang

让文档和Demo生成更加简单和强大 - SmartDoc 0.1.1 说明 SmartDoc(YUIDoc) 注释编写 JS文档和Demo自动化生成工具 - SmartDoc发布 smartjs - DataManager 场景示例分析 - 数据懒加载 smartjs - DataManager API smartjs 0.3 DataManager 发布&介绍 SmartJS 系列规划分享和背景介绍 smartjs 0.2 OOP讲解 - factory smartjs 0.2 OOP讲解 - Klass 类继承 smartjs 0.2发布 - 新增oop模块&AOP增强 smartJS 0.1 API 讲解 - FlowController smartJS 0.1 API 讲解 - Trigger smartJS 0.1 API 讲解 - PromiseEvent SmartUI2.0后续声明 JQuery SmartUI 2.0 方案启动 JQuery Smart UI 开发规范&API文档发布 JQuery Smart UI与Moss结合演示 JQuery Smart UI 快捷开发实例应用(二)— 开发模式【从项目开发流程说起】 告别aspx,高性能快捷开发 — JQuery Smart UI 快捷开发实例应用(一)入门【后篇】
SmartJS 第一期(0.1)发布 - AOP三剑客
Roy Zhang · 2014-06-07 · via 博客园 - Roy Zhang

隔了好久才终于又发布了一点东西,SmartJS是最近才开始搞的一个开源js库,目的是做一些比较有特点的事情(smartjs暂时也是依赖于jquery)。

SmartJS的内容规划比较多,也无法在短时间全部完成,目前就以小版本一个个功能累加。

第一期0.1版发布的内容主要是实现前端面向切面编程(AOP)的一些支持。

  1. PromiseEvent

  基于事件和promise的回调管理,类似于jquery的callbacks,但具有结果传递,优先级,事件参数,promise控制等功能

  2. Trigger

  触发器,在对象上应用触发器(aop)功能,目标对象会具有方法注入功能(基于promiseEvent),注入的类型有before,after和round环绕三种;

  3. FlowController

  流程/生命周期控制器,控制流程的执行和流转,基于Trigger

  4. 常用方法;

  //合并默认数据方法,将obj中空的内容从defObj中复制;与jquery的$.extend不通,只会加入不存在的数据
  st.mergeObj(deep, obj, defObj, exclude)

  //在目标对象方法中注入方法,返回结果
  st.injectFn(target, name, fn, before,stopOnFalse)

  //合并方法,返回结果
  st.mergeFn(fn, mergeFn,stopOnFalse)

 另外声明一下,十分抱歉,以前承诺的smartUI2.0一直没有完成,想法一直在变,而且这两年发现自己能支配的时间也越来越少。不过smartjs后续规划中也会有ui方面的内容,也相当于将smartUI并于Smartjs中。

后期预告:smartjs 0.2版中,会加入oop支持的一些内容。

最后附上地址smart地址,里面有比较丰富的测试用例,api的话后续会更新博客逐一说明。