brokenseal / eunomia Goto Github PK
View Code? Open in Web Editor NEWData Context Interaction library aiming Javascript
Data Context Interaction library aiming Javascript
It's nice that the node version includes the source map. It would be nice to have that for the minified browser version (just as a separate file).
Hello! Nice project, great to see some DCI initiatives. A few comments about the example:
In the context code, actors.choosesFood
should be actors.customer.choosesFood
, right? And I don't see a menu
Role, so actors.menu
seems incorrect, but then there's a menu argument in roles.customer.choosesFood
, which suggests that the menu isn't a Role at all in the Context (otherwise it doesn't need to be passed around as an argument).
I also think there's a semantic issue with actors
, why not call them argument what they are inside the Context, roles
, or even context
(depends on the passed object of course)? Actors aren't a part of the DCI terminology, and a Role in DCI is just an identifier, so the Eunomia definition doesn't match the DCI definition exactly, which could be confusing.
By creating a separate role
object as in the example, the code seems to suggest that Roles can be reused between Contexts, which they shouldn't, but a simple note of that should be enough. (I prefer to put them in the same object directly, look at https://github.com/ciscoheat/haxedci-example for an example)
Lastly, I don't see any interactions between Roles. The example is simplified of course, but to a beginner it looks like the interactions should be orchestrated by the Context. Rather the RoleMethods should call each other, to create a distributed algorithm instead of a monolithic, all-knowing Context. The Context just kicks off an interaction (from takeOrder
and serveFood
), not much more.
Except for that the structure looks good, and I assume that the Roles won't have a wrapper to create identity issues, so I'll be following this with interest!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.