Silk ideas in Web

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Silk ideas in Web

Herby Vojčík
Hello!

I am thinking of incorporating a few ideas that are part of Silk's
philosophy into Web library. In particular, in Silk you can put a
collection in an element:

   elem << {'Hello'. ', '. 'world', '!'}

and all of them are added one-by-one. You can also put an association

   elem << ('id'->'foo')

and an attribute is set (even if there is an API attrAt:put: for that,
but maybe putting a declarative object is preferred for readability).

This could work identically in Web:

   aTag with: {'Hello'. ', '. 'world', '!'}

   aTag with: 'id'->'foo'.

Do you think it is a good addition? Or, on the other hand, does someone
use with: with a collection and specifically uses the current
implementation where it is shown in its asString form?

Herby

P.S.: I think of adding ([:thisArg :otherArgs | ... ] eventBinding:
aStringOrCollectionOfThem) object for declaratively adding event
bindings to an element, these can be added to with: as well once they
are ready.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Silk ideas in Web

horrido
I think it would be a good addition. However, the user will need to understand that these are Amber-specific extensions beyond what's in Seaside. Is there a potential for confusion?


On Wednesday, 17 June 2015 07:09:17 UTC-4, Herby wrote:
Hello!

I am thinking of incorporating a few ideas that are part of Silk's
philosophy into Web library. In particular, in Silk you can put a
collection in an element:

   elem << {'Hello'. ', '. 'world', '!'}

and all of them are added one-by-one. You can also put an association

   elem << ('id'->'foo')

and an attribute is set (even if there is an API attrAt:put: for that,
but maybe putting a declarative object is preferred for readability).

This could work identically in Web:

   aTag with: {'Hello'. ', '. 'world', '!'}

   aTag with: 'id'->'foo'.

Do you think it is a good addition? Or, on the other hand, does someone
use with: with a collection and specifically uses the current
implementation where it is shown in its asString form?

Herby

P.S.: I think of adding ([:thisArg :otherArgs | ... ] eventBinding:
aStringOrCollectionOfThem) object for declaratively adding event
bindings to an element, these can be added to with: as well once they
are ready.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Silk ideas in Web

jtuchel
I don't think this would hurt from that perspective, because we are not talking about a Seaside port, but a framework that is inspired by Seaside,

I like the suggestion for the brevity of messages, but also wonder whether these expressions are easy to understand when reading code...

 Otoh, nobody is forced to use them


Joachim

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Silk ideas in Web

Herby Vojčík
Released as 0.2.0.

Joachim Tuchel wrote:
> I don't think this would hurt from that perspective, because we are not talking about a Seaside port, but a framework that is inspired by Seaside,
>
> I like the suggestion for the brevity of messages, but also wonder whether these expressions are easy to understand when reading code...
>
>   Otoh, nobody is forced to use them
>
>
> Joachim
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.