New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generated sample app html question #4673

Closed
mark-hahn opened this Issue Dec 17, 2014 · 17 comments

Comments

Projects
None yet
6 participants
@mark-hahn
Contributor

mark-hahn commented Dec 17, 2014

The generated sample app now generates the html programmatically. This is obviously something no one would consider doing in real life. This has two problems. It doesn't show the idiomatic method and it is no good as a template to start adding to.

What is the idiomatic way? Is there an equivalent way to space-pen? There is a cool npm module call teacup which seems to be the inspiration for space-pen. Has anyone tried that?

@benogle

This comment has been minimized.

Show comment
Hide comment
@benogle

benogle Dec 17, 2014

Contributor

Eventually we would like to have a sanctioned view framework, but we're not there yet.

I did make this space pen version of the sample package templates: https://github.com/atom/space-pen-example-templates

Contributor

benogle commented Dec 17, 2014

Eventually we would like to have a sanctioned view framework, but we're not there yet.

I did make this space pen version of the sample package templates: https://github.com/atom/space-pen-example-templates

@mark-hahn

This comment has been minimized.

Show comment
Hide comment
@mark-hahn

mark-hahn Dec 17, 2014

Contributor

I guess you didn't make this the example because you want to discourage
using space-pen?

I'm happy to use space-pen until the new framework replaces it. Using the
old spec-pen framework is better than some useless code. The current
sample code will discourage newbies.

Another way to look at it is space-pen is embodied in a year of code, why
does it hurt to extend it a bit further?

P.S. I did the precursor to teacup which is a precursor to spacepen four
years ago. I might take a shot at developing your new framework. If it
isn't used that's OK because it would be fun.

Would you welcome something that retains as many characteristics as
possible of space-pen while generating idiomatic custom element code? Is
there anything other than custom elements you would like to see in the
output of the framework?

On Wed, Dec 17, 2014 at 1:57 PM, Ben Ogle notifications@github.com wrote:

Eventually we would like to have a sanctioned view framework, but we're
not there yet.

I did make this space pen version of the sample package templates:
https://github.com/atom/space-pen-example-templates


Reply to this email directly or view it on GitHub
#4673 (comment).

Contributor

mark-hahn commented Dec 17, 2014

I guess you didn't make this the example because you want to discourage
using space-pen?

I'm happy to use space-pen until the new framework replaces it. Using the
old spec-pen framework is better than some useless code. The current
sample code will discourage newbies.

Another way to look at it is space-pen is embodied in a year of code, why
does it hurt to extend it a bit further?

P.S. I did the precursor to teacup which is a precursor to spacepen four
years ago. I might take a shot at developing your new framework. If it
isn't used that's OK because it would be fun.

Would you welcome something that retains as many characteristics as
possible of space-pen while generating idiomatic custom element code? Is
there anything other than custom elements you would like to see in the
output of the framework?

On Wed, Dec 17, 2014 at 1:57 PM, Ben Ogle notifications@github.com wrote:

Eventually we would like to have a sanctioned view framework, but we're
not there yet.

I did make this space pen version of the sample package templates:
https://github.com/atom/space-pen-example-templates


Reply to this email directly or view it on GitHub
#4673 (comment).

@mark-hahn

This comment has been minimized.

Show comment
Hide comment
@mark-hahn

mark-hahn Dec 17, 2014

Contributor

Is there anything other than custom elements you would like to see in the
output of the framework?

Ignore this stupid question. It would need to include most features of web components except for packaging.

Contributor

mark-hahn commented Dec 17, 2014

Is there anything other than custom elements you would like to see in the
output of the framework?

Ignore this stupid question. It would need to include most features of web components except for packaging.

@thedaniel

This comment has been minimized.

Show comment
Hide comment
@thedaniel

thedaniel Dec 17, 2014

Contributor

I guess you didn't make this the example because you want to discourage
using space-pen?

Well, more like we don't want to encourage it as the one true view framework. There are still some space pen views used in atom and you can definitely get a lot of work done with it.

Another way to look at it is space-pen is embodied in a year of code, why
does it hurt to extend it a bit further?

Various reasons, but basically we're just not stoked on jQuery.

I think the core team is still working out what we think would be best - we all have our own ideal framework in mind. My personal preference is something lightweight and polymer-like (cf. @benogle's experiments with elmer) but that's just me.

In any case we're going to have to figure it out sometime because having a view framework will make it easier to write package tutorials. Until then we're comfortable saying "use whatever tool you want to generate your markup!"

Contributor

thedaniel commented Dec 17, 2014

I guess you didn't make this the example because you want to discourage
using space-pen?

Well, more like we don't want to encourage it as the one true view framework. There are still some space pen views used in atom and you can definitely get a lot of work done with it.

Another way to look at it is space-pen is embodied in a year of code, why
does it hurt to extend it a bit further?

Various reasons, but basically we're just not stoked on jQuery.

I think the core team is still working out what we think would be best - we all have our own ideal framework in mind. My personal preference is something lightweight and polymer-like (cf. @benogle's experiments with elmer) but that's just me.

In any case we're going to have to figure it out sometime because having a view framework will make it easier to write package tutorials. Until then we're comfortable saying "use whatever tool you want to generate your markup!"

@benogle

This comment has been minimized.

Show comment
Hide comment
@benogle

benogle Dec 17, 2014

Contributor

I want databinding and the ability to create the markup with real HTML. No globals is an important requirement. We also would prefer to not maintain the view framework much more than the integration into atom.

I am still sold on something like https://github.com/atom/elmer. The biggest issue with it is that it injects so much into the global scope. The polymer junk extends a bunch of built in objects like HTMLTemplate, which does not play nice when there are multiple versions of the framework around.

We have been kicking around the idea of experimenting with using https://github.com/mikeric/rivets, but havent messed with it yet. I know @nathansobo has some ideas in his head.

Contributor

benogle commented Dec 17, 2014

I want databinding and the ability to create the markup with real HTML. No globals is an important requirement. We also would prefer to not maintain the view framework much more than the integration into atom.

I am still sold on something like https://github.com/atom/elmer. The biggest issue with it is that it injects so much into the global scope. The polymer junk extends a bunch of built in objects like HTMLTemplate, which does not play nice when there are multiple versions of the framework around.

We have been kicking around the idea of experimenting with using https://github.com/mikeric/rivets, but havent messed with it yet. I know @nathansobo has some ideas in his head.

@mark-hahn

This comment has been minimized.

Show comment
Hide comment
@mark-hahn

mark-hahn Dec 18, 2014

Contributor

Space-pen-2 would be much simpler than rivets. Rivets puts logic into the
element properties which is totally unnecessary with space-pen's
coffeescript. (I don't know about anyone else but I hate logic in the
html). So the only thing rivets would provide is binding. I think rivets
is out of the picture.

I have a framework in my mind which is actually simpler than space-pen-1
except for the bindings. I will put a proposal up on the forum by
tomorrow. I think I could implement it in a week or two.

On Wed, Dec 17, 2014 at 3:51 PM, Ben Ogle notifications@github.com wrote:

I want databinding and the ability to create the markup with real HTML. No
globals is an important requirement. We also would prefer to not maintain
the view framework much more than the integration into atom.

I am still sold on something like https://github.com/atom/elmer. The
biggest issue with it is that it injects so much into the global scope. The
polymer junk extends a bunch of built in objects like HTMLTemplate, which
does not play nice when there are multiple versions of the framework
around.

We have been kicking around the idea of experimenting with using
https://github.com/mikeric/rivets, but havent messed with it yet. I know
@nathansobo https://github.com/nathansobo has some ideas in his head.


Reply to this email directly or view it on GitHub
#4673 (comment).

Contributor

mark-hahn commented Dec 18, 2014

Space-pen-2 would be much simpler than rivets. Rivets puts logic into the
element properties which is totally unnecessary with space-pen's
coffeescript. (I don't know about anyone else but I hate logic in the
html). So the only thing rivets would provide is binding. I think rivets
is out of the picture.

I have a framework in my mind which is actually simpler than space-pen-1
except for the bindings. I will put a proposal up on the forum by
tomorrow. I think I could implement it in a week or two.

On Wed, Dec 17, 2014 at 3:51 PM, Ben Ogle notifications@github.com wrote:

I want databinding and the ability to create the markup with real HTML. No
globals is an important requirement. We also would prefer to not maintain
the view framework much more than the integration into atom.

I am still sold on something like https://github.com/atom/elmer. The
biggest issue with it is that it injects so much into the global scope. The
polymer junk extends a bunch of built in objects like HTMLTemplate, which
does not play nice when there are multiple versions of the framework
around.

We have been kicking around the idea of experimenting with using
https://github.com/mikeric/rivets, but havent messed with it yet. I know
@nathansobo https://github.com/nathansobo has some ideas in his head.


Reply to this email directly or view it on GitHub
#4673 (comment).

@thedaniel

This comment has been minimized.

Show comment
Hide comment
@thedaniel

thedaniel Dec 18, 2014

Contributor

I have a framework in my mind [...] I will put a proposal up on the forum

Cool, looking forward to it!

Contributor

thedaniel commented Dec 18, 2014

I have a framework in my mind [...] I will put a proposal up on the forum

Cool, looking forward to it!

@mark-hahn

This comment has been minimized.

Show comment
Hide comment
@mark-hahn

mark-hahn Dec 18, 2014

Contributor

Oops. I misunderstood the "... ability to create the markup with real
HTML." requirement.

I don't want to be involved with this requirement. I hate all frameworks
that put extra stuff in the html other than web components. Also that would
not be space-pen. I guess my version will have to be a separate module
installed like you do with the latest space-pen.

On Wed, Dec 17, 2014 at 4:46 PM, Mark Hahn mark@hahnca.com wrote:

Space-pen-2 would be much simpler than rivets. Rivets puts logic into the
element properties which is totally unnecessary with space-pen's
coffeescript. (I don't know about anyone else but I hate logic in the
html). So the only thing rivets would provide is binding. I think rivets
is out of the picture.

I have a framework in my mind which is actually simpler than space-pen-1
except for the bindings. I will put a proposal up on the forum by
tomorrow. I think I could implement it in a week or two.

On Wed, Dec 17, 2014 at 3:51 PM, Ben Ogle notifications@github.com
wrote:

I want databinding and the ability to create the markup with real HTML.
No globals is an important requirement. We also would prefer to not
maintain the view framework much more than the integration into atom.

I am still sold on something like https://github.com/atom/elmer. The
biggest issue with it is that it injects so much into the global scope. The
polymer junk extends a bunch of built in objects like HTMLTemplate,
which does not play nice when there are multiple versions of the framework
around.

We have been kicking around the idea of experimenting with using
https://github.com/mikeric/rivets, but havent messed with it yet. I know
@nathansobo https://github.com/nathansobo has some ideas in his head.


Reply to this email directly or view it on GitHub
#4673 (comment).

Contributor

mark-hahn commented Dec 18, 2014

Oops. I misunderstood the "... ability to create the markup with real
HTML." requirement.

I don't want to be involved with this requirement. I hate all frameworks
that put extra stuff in the html other than web components. Also that would
not be space-pen. I guess my version will have to be a separate module
installed like you do with the latest space-pen.

On Wed, Dec 17, 2014 at 4:46 PM, Mark Hahn mark@hahnca.com wrote:

Space-pen-2 would be much simpler than rivets. Rivets puts logic into the
element properties which is totally unnecessary with space-pen's
coffeescript. (I don't know about anyone else but I hate logic in the
html). So the only thing rivets would provide is binding. I think rivets
is out of the picture.

I have a framework in my mind which is actually simpler than space-pen-1
except for the bindings. I will put a proposal up on the forum by
tomorrow. I think I could implement it in a week or two.

On Wed, Dec 17, 2014 at 3:51 PM, Ben Ogle notifications@github.com
wrote:

I want databinding and the ability to create the markup with real HTML.
No globals is an important requirement. We also would prefer to not
maintain the view framework much more than the integration into atom.

I am still sold on something like https://github.com/atom/elmer. The
biggest issue with it is that it injects so much into the global scope. The
polymer junk extends a bunch of built in objects like HTMLTemplate,
which does not play nice when there are multiple versions of the framework
around.

We have been kicking around the idea of experimenting with using
https://github.com/mikeric/rivets, but havent messed with it yet. I know
@nathansobo https://github.com/nathansobo has some ideas in his head.


Reply to this email directly or view it on GitHub
#4673 (comment).

@mark-hahn

This comment has been minimized.

Show comment
Hide comment
@mark-hahn

mark-hahn Dec 18, 2014

Contributor

I guess my requirement is that 100% of the logic be in coffeescript (or
JS). I don't think that is possible with your requirement.

On Wed, Dec 17, 2014 at 4:51 PM, Mark Hahn mark@hahnca.com wrote:

Oops. I misunderstood the "... ability to create the markup with real
HTML." requirement.

I don't want to be involved with this requirement. I hate all frameworks
that put extra stuff in the html other than web components. Also that would
not be space-pen. I guess my version will have to be a separate module
installed like you do with the latest space-pen.

On Wed, Dec 17, 2014 at 4:46 PM, Mark Hahn mark@hahnca.com wrote:

Space-pen-2 would be much simpler than rivets. Rivets puts logic into the
element properties which is totally unnecessary with space-pen's
coffeescript. (I don't know about anyone else but I hate logic in the
html). So the only thing rivets would provide is binding. I think rivets
is out of the picture.

I have a framework in my mind which is actually simpler than space-pen-1
except for the bindings. I will put a proposal up on the forum by
tomorrow. I think I could implement it in a week or two.

On Wed, Dec 17, 2014 at 3:51 PM, Ben Ogle notifications@github.com
wrote:

I want databinding and the ability to create the markup with real HTML.
No globals is an important requirement. We also would prefer to not
maintain the view framework much more than the integration into atom.

I am still sold on something like https://github.com/atom/elmer. The
biggest issue with it is that it injects so much into the global scope. The
polymer junk extends a bunch of built in objects like HTMLTemplate,
which does not play nice when there are multiple versions of the framework
around.

We have been kicking around the idea of experimenting with using
https://github.com/mikeric/rivets, but havent messed with it yet. I
know @nathansobo https://github.com/nathansobo has some ideas in his
head.


Reply to this email directly or view it on GitHub
#4673 (comment).

Contributor

mark-hahn commented Dec 18, 2014

I guess my requirement is that 100% of the logic be in coffeescript (or
JS). I don't think that is possible with your requirement.

On Wed, Dec 17, 2014 at 4:51 PM, Mark Hahn mark@hahnca.com wrote:

Oops. I misunderstood the "... ability to create the markup with real
HTML." requirement.

I don't want to be involved with this requirement. I hate all frameworks
that put extra stuff in the html other than web components. Also that would
not be space-pen. I guess my version will have to be a separate module
installed like you do with the latest space-pen.

On Wed, Dec 17, 2014 at 4:46 PM, Mark Hahn mark@hahnca.com wrote:

Space-pen-2 would be much simpler than rivets. Rivets puts logic into the
element properties which is totally unnecessary with space-pen's
coffeescript. (I don't know about anyone else but I hate logic in the
html). So the only thing rivets would provide is binding. I think rivets
is out of the picture.

I have a framework in my mind which is actually simpler than space-pen-1
except for the bindings. I will put a proposal up on the forum by
tomorrow. I think I could implement it in a week or two.

On Wed, Dec 17, 2014 at 3:51 PM, Ben Ogle notifications@github.com
wrote:

I want databinding and the ability to create the markup with real HTML.
No globals is an important requirement. We also would prefer to not
maintain the view framework much more than the integration into atom.

I am still sold on something like https://github.com/atom/elmer. The
biggest issue with it is that it injects so much into the global scope. The
polymer junk extends a bunch of built in objects like HTMLTemplate,
which does not play nice when there are multiple versions of the framework
around.

We have been kicking around the idea of experimenting with using
https://github.com/mikeric/rivets, but havent messed with it yet. I
know @nathansobo https://github.com/nathansobo has some ideas in his
head.


Reply to this email directly or view it on GitHub
#4673 (comment).

@benogle

This comment has been minimized.

Show comment
Hide comment
@benogle

benogle Dec 18, 2014

Contributor

I guess my version will have to be a separate module installed like you do with the latest space-pen

They all will be. We want to have something that is the 'recommended way', but it wont be bundled into core or exported from core.

Contributor

benogle commented Dec 18, 2014

I guess my version will have to be a separate module installed like you do with the latest space-pen

They all will be. We want to have something that is the 'recommended way', but it wont be bundled into core or exported from core.

@mark-hahn

This comment has been minimized.

Show comment
Hide comment
@mark-hahn

mark-hahn Dec 18, 2014

Contributor

A very preliminary spec is at https://gist.github.com/mark-hahn/3f9ee0ba4945a285fb38. I will post here when there are major updates to the spec. Please post comments at https://discuss.atom.io/t/new-space-pen-2/13842.

Contributor

mark-hahn commented Dec 18, 2014

A very preliminary spec is at https://gist.github.com/mark-hahn/3f9ee0ba4945a285fb38. I will post here when there are major updates to the spec. Please post comments at https://discuss.atom.io/t/new-space-pen-2/13842.

@mark-hahn

This comment has been minimized.

Show comment
Hide comment
@mark-hahn

mark-hahn Dec 18, 2014

Contributor

The gist https://gist.github.com/mark-hahn/3f9ee0ba4945a285fb38 now has a new version. It includes the binding spec as well as other changes. This space-pen replacement now has the name "space-pencil".

The bindings worked out great. Both declarative forms and programmatic forms are supported at the same time with simple syntax. Here is a teaser. The first line binds the value attribute to an accessor function (programmatic) and the second binds it directly to a model object using a key path (declarative).

@input value:['nameValue'], ...
@input value:['.person.name'], ...
Contributor

mark-hahn commented Dec 18, 2014

The gist https://gist.github.com/mark-hahn/3f9ee0ba4945a285fb38 now has a new version. It includes the binding spec as well as other changes. This space-pen replacement now has the name "space-pencil".

The bindings worked out great. Both declarative forms and programmatic forms are supported at the same time with simple syntax. Here is a teaser. The first line binds the value attribute to an accessor function (programmatic) and the second binds it directly to a model object using a key path (declarative).

@input value:['nameValue'], ...
@input value:['.person.name'], ...
@thedaniel

This comment has been minimized.

Show comment
Hide comment
@thedaniel

thedaniel Dec 18, 2014

Contributor

@mark-hahn You're going to need to pick a new name ;) https://github.com/atom/space-pencil

Contributor

thedaniel commented Dec 18, 2014

@mark-hahn You're going to need to pick a new name ;) https://github.com/atom/space-pencil

@mark-hahn mark-hahn referenced this issue Dec 18, 2014

Closed

project names #2

@lee-dohm

This comment has been minimized.

Show comment
Hide comment
@lee-dohm

lee-dohm Dec 18, 2014

Member

😆 Oops ... I suggested the name based on the urban legend. I guess great minds think alike ... or something 😉

Member

lee-dohm commented Dec 18, 2014

😆 Oops ... I suggested the name based on the urban legend. I guess great minds think alike ... or something 😉

@mark-hahn

This comment has been minimized.

Show comment
Hide comment
@mark-hahn

mark-hahn Dec 18, 2014

Contributor

I did make this space pen version of the sample package templates:

Thanks. I'm using that until a new space-pen is available.

Contributor

mark-hahn commented Dec 18, 2014

I did make this space pen version of the sample package templates:

Thanks. I'm using that until a new space-pen is available.

@mnquintana mnquintana closed this Apr 13, 2015

@basarat

This comment has been minimized.

Show comment
Hide comment
@basarat

basarat May 6, 2015

Contributor

What's the update on this. As far as I can tell space-pen-views is the way to go for new development?

Contributor

basarat commented May 6, 2015

What's the update on this. As far as I can tell space-pen-views is the way to go for new development?

@mnquintana

This comment has been minimized.

Show comment
Hide comment
@mnquintana

mnquintana May 6, 2015

Member

@basarat You can track #5756 for updates on this.

Member

mnquintana commented May 6, 2015

@basarat You can track #5756 for updates on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment