Provide Foundational Mixins #27

Closed
kitsonk opened this Issue Apr 15, 2016 · 3 comments

Projects

None yet

2 participants

@kitsonk
Member
kitsonk commented Apr 15, 2016 edited

We should provide some foundational mixins that might be widely used as part of this package.

I have been working on porting some of those into the feature-mixins branch. The mixins I am thinking of:

  • createDestroyable
  • createEvented
  • createStateful (to do this though, it would require we integrate RxJS Observables into dojo/compose)

Are there any other ones we should have?

We might also then want to consider removing/deprecating any foundational Classes from dojo/core.

@kitsonk kitsonk self-assigned this Apr 15, 2016
@kitsonk kitsonk added this to the 2016.04 milestone Apr 15, 2016
@kfranqueiro
Member
kfranqueiro commented Apr 15, 2016 edited

I suppose the point of this is that since we'd use compose for factories/mixins, either these need to go here, or core would need to depend on compose (which would create a circular dependency). I'm a little worried that people wouldn't think to look for such foundational things in compose, since while they use compose, they seem tangential to it.

How do we present this so that it makes sense and users don't miss it (i.e. looking in core instead)?

@kitsonk
Member
kitsonk commented Apr 16, 2016

Well, and I think core depending on compose would essentially mean compose would have to go into core, which would bloat core and we would be well on our path to dojo/dojo again. In fact, I think things like Streams in core shouldn't be in core, but that is another subject for another day.

We are going to have a lot of packages (not as many as lodash). Discoverability and tutorials will be how people don't miss this. I think it will be the rare developer who would use compose without a fair amount of the eco-system, so with the tooling, most people wouldn't even realise that there is a package named compose or that there are foundation factories in the package.

Of course it could be argued that these could just go into their own repo (e.g. dojo/mixins) which would be a clear set of "common" mixins used. I don't know if that makes any more sense, but I think we should tend towards breaking more stuff out and squishing it together with the build tools, but just not to the extreme of lodash.

@kitsonk kitsonk referenced this issue in dojo/meta Apr 19, 2016
Open

Build Proposal/Specification #10

@kitsonk
Member
kitsonk commented Apr 19, 2016

Ok, I have added createStateful to the branch. It does not actually have a run-time dependency on RxJS Observables, it is only a build time dependency.

@kitsonk kitsonk closed this in #30 May 2, 2016
@kitsonk kitsonk added a commit that referenced this issue May 2, 2016
@kitsonk kitsonk Add Foundational Mixins
* Adds `createDestroyable`, `createEvented` and `createStateful` mixins as foundational mixins.

Resolves #27
0e7fb12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment