Le 20/07/2017 à 12:15, Peter Damoc a écrit :
> 
> 
> On Thu, Jul 20, 2017 at 12:49 PM, Christophe de Vienne
> <christo...@cdevienne.info <mailto:christo...@cdevienne.info>> wrote:
> 
> 
>     Well, it is more an intuition after more than 20 years of coding that an
>     elaborated opinion.
> 
>     But the first thing that comes to my mind is the resulting complexity,
>     and often confusion. I find that having a clean separation between data
>     & logic makes things a lot cleaner, easier to understand and maintain.
> 
>     I do realize I would need to elaborate a little more to be convincing on
>     this, but so far it is all I got :-)
> 
> 
> Out of curiosity, are you keeping your Model, update and view in
> separate modules?  

At first no, then depending on how much of the module I want to reuse, I
separate them.

In the end, I have reusable models as submodules of a "Data" module, a
few model+update modules (mainly for the session data, which has no
global view), and the rest are single modules with model+update+view
(for pages mainly, and a few subcomponents).

It is in great part inspired by the SPA example from Richard Feldman:
https://github.com/rtfeldman/elm-spa-example

-- 
Christophe de Vienne

-- 
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