On Tue, Jan 24, 2017 at 5:25 PM, 'Rupert Smith' via Elm Discuss < [email protected]> wrote:
> I took some advice early on that a good way to structure components in a > nested TEA is to split each into 3 files; Types.elm, State.elm, and > View.elm. > I never do this. I keep things in the same file. One file per component. I never got above 1kLOC in any of the files. > I am just wondering if anyone has some thoughts on how to apply Parnas' > principles of modular design to optimize the design of Elm modules with > respect to said principles (https://en.wikipedia.org/wiki/David_Parnas)? I'm biased towards the ideas from "The Five Planes of UX Design": http://www.belatrixsf.com/index.php/the-five-planes-of-ux-design Basically I have an API file that would fit the "Scope" plane (implementation of desired functionality from the point of view of the Business Objects and their transformation with the help of the server) This file is used by the various Pages. The MainApp file plays the role of the Router (manages which page is visible and holds the state of the entire app) and I view it as the "Structure" plane. Each Page is the "Skeleton" plane. Pages import various helper components that together with the styles form the "Surface" plane. -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
