Comments (5)
CC @uberVU/mozaic-core-commiters
from mozaic.
I've changed my mind and will move APIs for global channel management in channels_utils.coffee. No need to create yet a new file just for this.
from mozaic.
I agree that a widget shouldn't have knowledge of its ancestors, this breaks encapsulations. Parents know of children, children don't know of parents. One single global namespace for eternal channels would be better
I would make a different approach (haven't checked the code to see if it's possible). Passing global/ channels also implies extra lines of code in parent widgets. It'd integrate this in the widget starter somehow or even in the widget itself. A widget has a list of subscribed_channels. It goes through each of them and looks for the corresponding channel in its params.channels, if not found, looks in the global.channels, if not even there, throw error for channel mismatch.
from mozaic.
@skidding - you mean you can create an eternal channel from anywhere and access it from anywhere? If yes, I think you can do that with the current implementation - only that by default some eternal channels are created from our custom ApplicationController.
I don't like "defaulting" to the global channels because the only decent chance to match channels is by name. And it forces us to write widgets who know about the global state, instead of deriving meaningful internal names for their own channels.
Appart from this, please check the PR and lmk what you think!
from mozaic.
hub pull-request
!
from mozaic.
Related Issues (20)
- Publish sync_mozaic script HOT 2
- write a doc on how the list widget works
- logo for Mozaic.js HOT 8
- document how controller and routing work HOT 1
- In datasource, in general, we are completely ignoring server POST answers HOT 2
- Implement precaching mechanism for scrollable channels HOT 1
- Mozaic Hack Ideas HOT 4
- add overview docs on how mozaic-based apps work
- add docs on how forms work
- Make branding css including customizable
- Integrate mocking with factories Mozaic repo
- Error on SVG elements in widget_starter
- Devise way for widgets to subscribe to "global" channels that are created by the application controller HOT 1
- Find out who triggered an aggregated channel callback HOT 4
- Manage channel subscriptions inside DataSource HOT 3
- Debug Mode For a Widget HOT 1
- Create documentation for creating a new url route/controller HOT 1
- Host github-pages-based docs
- test
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mozaic.