Skip to content

Differentiated syntax #2

@m1sta

Description

@m1sta

Love what you've done so far.

Given the number of similar projects out there are the moment though, it would be interesting if you could consider taking this down a different path from a syntax perspective.

I've be playing with the idea of data binding library that looks like this...

        var bandItem = bindi.find(".bandItem").mapTo(bands);
        var bandItemsEmpty = bindi.find(".noBands").mapTo(bands, ifEmpty);
        var memberItem = bindi.find(".memberItem").mapTo(bandItem.members);
        var memberItemsEmpty = bindi.find(".noMembers").mapTo(bandItem.members, ifEmpty);

Making it easy to learn and easy to read are the key goals for me (I think this is the major shortcoming of the popular frameworks like angular). The approach I'm going for keeps all the model definition and binding logic together and creates a situation where the removal of the binding script leaves the UI looking like a healthy template. This last factor is useful in recognition of the workflow usually taken on web projects - mockup the UI, then bind some data to it.

This is as far as I've got so far... https://gist.github.com/m1sta/5843286

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions