This repository has been archived by the owner. It is now read-only.

Provide Foundational Mixins #27

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

Comments

Projects
None yet
2 participants
@kitsonk
Member

kitsonk commented Apr 15, 2016

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

This comment has been minimized.

Show comment
Hide comment
@kfranqueiro

kfranqueiro Apr 15, 2016

Member

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)?

Member

kfranqueiro commented Apr 15, 2016

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

This comment has been minimized.

Show comment
Hide comment
@kitsonk

kitsonk Apr 16, 2016

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@kitsonk

kitsonk Apr 19, 2016

Member

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.

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 added a commit that referenced this issue May 2, 2016

Add Foundational Mixins
* Adds `createDestroyable`, `createEvented` and `createStateful` mixins as foundational mixins.

Resolves #27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.