# Excellent.js
<img align="left" width="170" height="170" src="./.github/images/burns.gif" alt="Excellent!">
## Basic DOM Component Framework
[![Build Status](https://travis-ci.org/vitaly-t/excellent.svg?branch=master)](https://travis-ci.org/vitaly-t/excellent)
[![Coverage Status](https://coveralls.io/repos/github/vitaly-t/excellent/badge.svg?branch=master)](https://coveralls.io/github/vitaly-t/excellent?branch=master)
[![Join Chat](https://badges.gitter.im/vitaly-t/excellent.svg)](https://gitter.im/vitaly-t/excellent)
If you like VanillaJS, and working with DOM directly, this tiny (3Kb gzip) library helps
with organizing your code into reusable components. See [WiKi] for details.
<br/>
You get the essential _element-to-controllers_ bindings:
```html
<div e-bind="awesome, twinkling, message"></div>
```
That gives your code isolation and reusability (see [the plunker](http://plnkr.co/edit/60xPj9MiCIbZlfe0Xp2I?p=preview)):
```js
app.addController('message', function(ctrl) {
// this = ctrl
// this.node = your DOM element, to work with directly;
this.node.innerHTML = 'Awesome twinkling message :)';
});
app.addController('awesome', function(ctrl) {
this.node.className = 'green-box';
});
app.addController('twinkling', function(ctrl) {
var s = this.node.style, a = -0.01;
setInterval(function() {
a = (s.opacity < 0 || s.opacity > 1) ? -a : a;
s.opacity = +s.opacity + a;
}, 20);
});
```
Such controllers can easily find each other, either among children, with [EController.find] and [EController.findOne],
or globally, with [ERoot.find] and [ERoot.findOne], and access methods and properties in found controllers directly:
```js
app.addController('myCtrl', function(ctrl) {
// this = ctrl
this.onInit = function() {
// find one child controller, and call its method:
ctrl.findOne('childCtrl').someMethod();
// find some global controllers, and call a method:
app.find('globCtrl').forEach(function(c) {
c.someMethod();
});
};
});
```
Or you can alias + configure controllers at the same time (method [addAlias]), without any search.
**Other features include:**
* Global and local dynamic bindings, with [ERoot.bind] and [EController.bind].
* Controllers can extend / inherit each other's functionality, see [Inheritance].
* Native ES6 classes can be optionally used as controllers, see [Classes].
* [Modules] offer greater reusability and simpler distribution of controllers.
* [Services] share functionality across all controllers.
* [TypeScript] support right out of the box.
You can create whole libraries of reusable components that will work with any UI framework, or on their own.
#### Quick Links: [Examples] | [WiKi] | [API]
[API]:https://vitaly-t.github.io/excellent/
[Examples]:https://github.com/vitaly-t/excellent/wiki/Examples
[WiKi]:https://github.com/vitaly-t/excellent/wiki
[Classes]:https://github.com/vitaly-t/excellent/wiki/Classes
[Modules]:https://github.com/vitaly-t/excellent/wiki/Modules
[Services]:https://github.com/vitaly-t/excellent/wiki/Services
[Inheritance]:https://github.com/vitaly-t/excellent/wiki/Inheritance
[TypeScript]:https://github.com/vitaly-t/excellent/wiki/TypeScript
[EController.find]:https://vitaly-t.github.io/excellent/EController.html#find
[EController.findOne]:https://vitaly-t.github.io/excellent/EController.html#findOne
[ERoot.find]:https://vitaly-t.github.io/excellent/ERoot.html#find
[ERoot.findOne]:https://vitaly-t.github.io/excellent/ERoot.html#findOne
[ERoot.bind]:https://vitaly-t.github.io/excellent/ERoot.html#bind
[EController.bind]:https://vitaly-t.github.io/excellent/EController.html#bind
[addAlias]:https://vitaly-t.github.io/excellent/ERoot.html#addAlias
没有合适的资源?快使用搜索试试~ 我知道了~
excellent-master_javascript_源码
共70个文件
tmpl:16个
js:14个
md:7个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 106 浏览量
2021-10-01
09:29:17
上传
评论
收藏 539KB ZIP 举报
温馨提示
excellent js for javascript developers
资源详情
资源评论
资源推荐
收起资源包目录
excellent-master.zip (70个子文件)
excellent-master
.travis.yml 65B
package.json 1KB
jsdoc
custom
static
fonts
OpenSans-Light-webfont.eot 19KB
OpenSans-LightItalic-webfont.woff 23KB
OpenSans-Regular-webfont.eot 19KB
OpenSans-Light-webfont.svg 115KB
OpenSans-Bold-webfont.woff 22KB
OpenSans-LightItalic-webfont.svg 120KB
OpenSans-LightItalic-webfont.eot 20KB
OpenSans-BoldItalic-webfont.eot 20KB
OpenSans-Bold-webfont.svg 115KB
OpenSans-BoldItalic-webfont.woff 23KB
OpenSans-Italic-webfont.woff 23KB
OpenSans-Regular-webfont.woff 22KB
OpenSans-Regular-webfont.svg 117KB
OpenSans-Light-webfont.woff 22KB
OpenSans-Italic-webfont.svg 120KB
OpenSans-Italic-webfont.eot 20KB
OpenSans-BoldItalic-webfont.svg 118KB
OpenSans-Bold-webfont.eot 19KB
styles
jsdoc-default.css 6KB
prettify-jsdoc.css 1KB
prettify-tomorrow.css 2KB
scripts
linenumber.js 674B
prettify
prettify.js 13KB
lang-css.js 861B
Apache-License-2.0.txt 11KB
tmpl
type.tmpl 220B
tutorial.tmpl 321B
examples.tmpl 297B
details.tmpl 5KB
mainpage.tmpl 260B
layout.tmpl 1KB
returns.tmpl 296B
exceptions.tmpl 703B
params.tmpl 3KB
method.tmpl 3KB
augments.tmpl 229B
properties.tmpl 3KB
source.tmpl 184B
members.tmpl 911B
example.tmpl 62B
container.tmpl 6KB
README.md 785B
publish.js 21KB
README.md 764B
layout.html 792B
style.css 1KB
jsdoc.js 443B
.github
images
burns.gif 22KB
ISSUE_TEMPLATE.md 184B
CONTRIBUTING.md 94B
CHANGELOG.md 321B
CODE_OF_CONDUCT.md 47B
test
attach.test.js 5KB
root.test.js 5KB
.eslintrc.json 785B
controllers.test.js 19KB
search.test.js 4KB
services.test.js 2KB
modules.test.js 4KB
gulpfile.js 1KB
jest.config.js 143B
LICENSE 1KB
package-lock.json 287KB
src
.eslintrc.json 599B
excellent.d.ts 3KB
excellent.js 76KB
.gitignore 98B
README.md 4KB
共 70 条
- 1
鹰忍
- 粉丝: 65
- 资源: 4707
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 论文(最终)_20240430235101.pdf
- 基于python编写的Keras深度学习框架开发,利用卷积神经网络CNN,快速识别图片并进行分类
- 最全空间计量实证方法(空间杜宾模型和检验以及结果解释文档).txt
- 5uonly.apk
- 蓝桥杯Python组的历年真题
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 前端开发技术实验报告:内含4四实验&实验报告
- Highlight Plus v20.0.1
- 林周瑜-论文.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0