Very interesting. I didn't realize this was a common use case in the 
Cycle.JS community. I was only aware of this issue
https://github.com/cyclejs/cyclejs/issues/321
resulting in this proof of concept
http://www.webpackbin.com/Nkd5aKiIf
but you're correct that Elm attaching event handlers in the view produces 
this limitation, not found in Cycle.JS, cause the don't, as noted by Andre 
Staltz in this exchange
https://www.reddit.com/r/javascript/comments/3zr6i0/conversation_whats_the_core_differences_between/

I really love Hyperscript Helpers for Cycle.JS and Elm's Html package, but 
perhaps this is due to my background. To each their own. 


On Friday, January 20, 2017 at 10:37:10 AM UTC-8, Peter Damoc wrote:
>
> Hi Ilja, 
>
> It is very common to reach for previous knowledge, previous ways of 
> approaching code structure. 
>
> My advice is to spend more time with Elm and just do things its way. 
>
> If after one more week with Elm you still feel the same way, write actua 
> code in the two ways: the official way and the way you would ideally want 
> to write it and present it here side by side. 
> In the Elm community there is a strong emphasis on using practical 
> examples in order to discuss various issues. 
>
> Show us some code and we'll better understand your needs. 
>
>
>
> On Fri, Jan 20, 2017 at 1:38 PM, Илья Толлю <im.t...@gmail.com 
> <javascript:>> wrote:
>
>> Hello, everybody!
>>
>> I'm new to Elm and I like its architecture very much. Except one nuance 
>> annoys me.
>> If you take e.g. CycleJS there we observe view's events by selectors 
>> external to view. I.e. view is not responsible for routing its events. That 
>> responsibility is given to another part of code, which creates Observables. 
>> So, we can use Jade/Pug or another templating technology and cleanly 
>> separate view declaration and events listening declaration. 
>> Considering that Elm is functional language, there can be some pattern 
>> that aims to achieve the same result, so I could write View and Observables 
>> in different sections.
>>
>> It would be great to know your opinion and experience.
>>
>> Best regards! 
>> Ilja Tollu
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Elm Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to elm-discuss...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> There is NO FATE, we are the creators.
> blog: http://damoc.ro/
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to