elm-spa-example icon indicating copy to clipboard operation
elm-spa-example copied to clipboard

How does your project structure differ now with the 0.19 release?

Open nullbio opened this issue 7 years ago • 6 comments

Hi @rtfeldman, just wondering if you're planning on updating your article to elaborate on your new project structure for the 0.19 release? https://dev.to/rtfeldman/tour-of-an-open-source-elm-spa -- Noticed that your new commits have a significantly different project structure. Thanks.

nullbio avatar Aug 27 '18 06:08 nullbio

I'm most curious about the use of the Api modules and Api.application

abradley2 avatar Sep 12 '18 13:09 abradley2

He did admit that when upgrading to 0.19 he "completely rearchitected everything" :-)

@rtfeldman I'd love to know the reasons for these changes, maybe we all can learn from them.

Kurren123 avatar Oct 12 '18 11:10 Kurren123

The most interesting thing for me is the change from Task to Cmd in each page 🙂

jinjor avatar Nov 22 '18 19:11 jinjor

My understanding of the switch from Task to Cmd for each page is that previously, the transition to the page would not take place until all the data had loaded for it (the Task was responsible for creating the page model). Now the transition takes place immediately, and the page model keeps track of the loading state of its individual parts (usually called Status). See this part of the Home page model for example.

The benefit is that if there are multiple parts to a page, the user can see the loaded bits immediately. For example they can start reading an article without having to wait for the comments to load. Previously, they would be stuck on the original page waiting for the transition to take place.

tekul avatar Apr 14 '19 14:04 tekul

The benefit is that if there are multiple parts to a page, the user can see the loaded bits immediately. For example they can start reading an article without having to wait for the comments to load. Previously, they would be stuck on the original page waiting for the transition to take place.

@tekul but this is not what it seems here, right? https://elm-spa-example.netlify.com/

frederikhors avatar Apr 28 '19 02:04 frederikhors

@frederikhors Not sure what you mean by "not what it seems here". That's the new version - it loads the page immediately then loads the content (the feed and tags).

tekul avatar Apr 28 '19 14:04 tekul