f/delorean là một trong những repo mã nguồn mở mà TopGit theo dõi, hiện có 749 sao, viết chủ yếu bằng JavaScript. An Agnostic, Complete Flux Architecture Framework
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Unidirectional data flow, it makes your app logic simpler than MVC,
Automatically listens to data changes and keeps your data updated,
Makes data more consistent across your whole application,
It's framework agnostic, completely. There's no view framework dependency.
Very small, just 5K gzipped.
Built-in React.js integration, easy to use with Flight.js and Ractive.js and probably all others.
Improve your UI/data consistency using rollbacks.
Tutorial
You can learn Flux and DeLorean.js in minutes. Read the tutorial
Using with Frameworks
Try React.js example on JSFiddle
Try Flight.js example on JSFiddle
Try Ractive.js example on JSFiddle
Install
You can install DeLorean with Bower:
bower install delorean
You can also install by NPM to use with Browserify(recommended)
npm install delorean
Usage
Hipster way:
var Flux = require('delorean').Flux;
// ...
Old-skool way:
<script src="//rawgit.com/f/delorean/master/dist/delorean.min.js"></script>
<script>
var Flux = DeLorean.Flux;
// ...
</script>
Overview
var Flux = DeLorean.Flux;
/*
* Stores are simple data buckets which manages data.
*/
var Store = Flux.createStore({
data: null,
setData: function (data) {
this.data = data;
this.emit('change');
},
actions: {
'incoming-data': 'setData'
}
});
var store = Store;
/*
* Dispatcher are simple action dispatchers for stores.
* Stores handle the related action.
*/
var Dispatcher = Flux.createDispatcher({
setData: function (data) {
this.dispatch('incoming-data', data);
},
getStores: function () {
return {increment: store};
}
});
/*
* Action Creators are simple controllers. They are simple functions.
* They talk to dispatchers. They are not required.
*/
var Actions = {
setData: function (data) {
Dispatcher.setData(data);
}
};
// The data cycle.
store.onChange(function () {
// End of data cycle.
document.getElementById('result').innerText = store.data;
});
document.getElementById('dataChanger').onclick = function () {
// Start data cycle:
Actions.setData(Math.random());
};
Run this example on JSFiddle
Docs
You can read the tutorial to get started
DeLorean.js with your favorite framework.
Basic Concepts
Store: A postbox
Dispatcher: The postman, drops mail in the postboxes
View (or Component): Box owner, checks the box for mail
Action Creator: The post office, manages postmen
Or you can visit documents page.
Running the TodoMVC example
There is a simple TodoMVC example working with DeLorean.js
cd examples/todomvc
grunt
open index.html
Authors
Fatih Kadir Akin @f
Burak Can @burakcan
Darcy Adams @darcyadams
Contributors
Tom Moor @tommoor
Tim Branyen @tbranyen
Quang Van @quangv
James H. Edwards @incrediblesound
Fehmi Can Sağlam @fehmicansaglam
Serge van den Oever @svdoever
Markus Ast @rkusa
Peter Rumenov Denev @peterdenev
Contribution
git clone [email protected]:deloreanjs/delorean.git
cd delorean
git checkout -b your-feature-branch
After you make some changes and add your test cases to the test/spec/*Spec.js
files. please run:
grunt
grunt test
When it's all OK, open a pull request.
License
MIT License
Name
The flux capacitor was the core component of Doctor Emmett Brown's DeLorean time machine
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/f/delorean là nguồn chính thức.
f/delorean có bao nhiêu sao?
f/delorean có 749 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/f/delorean. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
f/delorean có những chủ đề gì?
GitHub topics của f/delorean: "agnostic", "flux", "flux-architecture". TopGit xếp repo vào nhóm mã nguồn mở.
f/delorean còn đang phát triển không?
Commit gần nhất trên f/delorean là 6.1 năm trước (theo timestamp GitHub). Repo có 38 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
f/delorean viết bằng ngôn ngữ gì?
f/delorean chủ yếu viết bằng JavaScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc delorean có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về delorean.