Skip to content
This repository was archived by the owner on Oct 29, 2019. It is now read-only.
This repository was archived by the owner on Oct 29, 2019. It is now read-only.

Proposal: Mixin Assignments #8

@grebaldi

Description

@grebaldi

I thought about this for quite a while now and I think it does make sense. Think of the following scenario:

I have a form, like:

<form data-app="MyFormComponent"></form>

MyFormComponent might combine quite a lot of functionality, like some visual effects, validation and printing of validation messages.

Since at least two of these functionalities do not depend on each other, you would have better semantics and decoupling by writing something like this:

<form data-app="FancyEyeCandyComponent ValidatorComponent"></form>

If you really have disjunct functionality (like eye-candy <-> validation) it would just be great to have the option to apply all at once, whithout the need to hard-wire them into each other on JS side.

One could go pretty mad about this one and write something like this:

<form data-app="FancyEyeCandyComponent ValidatorComponent SendStuffToServerComponent">
</form>

Which would be easily interchangeable to:

<form data-app="FancyEyeCandyComponent ValidatorComponent JustLogStuffComponent">
</form>

If these apply in order, you would get interchangeable and functionality-disjunct components, with the positive effect of describing behavior on the fly.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions