Re: [elm-discuss] Re: Post mortem for my first attempt at using Elm in a real app.

2016-09-22 Thread Lars Jacobsson
Thanks for a very informative answer! I think this is a very important part 
of making an elm application work when it grows. I'm pretty sure that we 
should be very careful before breaking stuff "prematurely". I started 
writing an app breaking it up like i used to break up my react/redux -apps, 
i.e something like app.elm -> itemlist.elm -> item.elm. It's a nightmare 
where you end up having to handle multiple levels of sub-messages and 
stuff. Breaking stuff up organically and trying to keep the types and 
update together as long as possible is the key and makes a BIG difference 
in how much fun the app is to maintain. I also believe we should not have 
multiple "pages" in the same elm app. If you have two "views" (like eg. 
"itemlist" and "itemdetail") - thats two separate elm apps!

On Tuesday, September 20, 2016 at 5:03:23 PM UTC+2, Peter Damoc wrote:
>
> On Tue, Sep 20, 2016 at 5:18 PM, Lars Jacobsson  > wrote:
>
>> Peter - just out of curiosity: How did you split those 8000 LOC up? Did 
>> you go for a structured component/react type splitup, or did you split 
>> "organically" when the need occurred?
>>
>  
> It was more of an organic kind of split, mostly around functionality. 
>
> With the exception of some static pages that were handled directly by the 
> MainApp.elm, all the other pages had their own separate file. 
> Most of them were following TEA but some ended up not needing their own 
> model and update because they could delegate their actions to the top 
> level. 
> Functionality around routing was in its own file, same for the server 
> access API. 
> Business Objects Types were in their own file that was imported all over 
> the place 
> Serialization (encoders and decoders) was in its own file. 
> There was a Components.elm that was mainly various aggregates of elm-html 
> (simple functions). 
> There were also a few components (Dropbox, Carousel) that lived in their 
> own .elm files. 
> Some complex forms got also extracted at one point into their own files. 
> There were also some CSS only files. 
> One of them, SharedCSS.elm taught me a very important lesson:
> Don't put code that changes frequently in a file that is imported by a lot 
> of other files. 
> changes to this file led to the longest compilation times. :) 
>
>  
>
>
>
> -- 
> 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.


Re: [elm-discuss] Re: Post mortem for my first attempt at using Elm in a real app.

2016-09-20 Thread joseph ni
> - *Elm is an amazing language.* I've had countless moments of sheer 
pleasure programming in Elm for this app. 

Actually, this is *my* take away from the very nicely written, down to 
earth post-mortem. I've been hammering away at web-frameworks for 4 yrs 
(angular, blaze, react) and windows webforms before that. In all those 
frameworks, I have found things that don't fit, workarounds that are hacky, 
abstractions which leak, complex tooling etc etc... in not one of them have 
I said wow... it's been smooth sailing all the way through. Elm is the same 
in that sense. It's story is not complete.

However, in none of those frameworks/languages have I had the consistency 
of highs and pleasure working in a immutable, pure functional environment 
that allows me to express what I want concisely with the confidence that it 
will work as intended. 

Granted I'm not using Elm for a web app, rather a game in Elm, ~6k LoC 
hardly any regression bugs, everything in Elm, it's getting complex, but 
I'm madly refactoring as I go, fearlessly because the compiler's got my 
back. The workflow is great as I'm able to solve problems and move on. I'm 
optimistic about where we're heading :) Don't stop!
 

On Wednesday, 21 September 2016 07:37:30 UTC+10, Brian Marick wrote:
>
>
> On Sep 20, 2016, at 3:46 PM, Peter Damoc  
> wrote:
>
> As Richard pointed out, Elm is a great choice when the team is already 
> comfortable with web-dev. 
> I am a beginner in this field. 
>
>
> I’m a front-end beginner too. I wonder how many of us there are, and how 
> we might help one another.
>

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


Re: [elm-discuss] Re: Post mortem for my first attempt at using Elm in a real app.

2016-09-20 Thread Brian Marick

> On Sep 20, 2016, at 3:46 PM, Peter Damoc  wrote:
> 
> As Richard pointed out, Elm is a great choice when the team is already 
> comfortable with web-dev. 
> I am a beginner in this field. 

I’m a front-end beginner too. I wonder how many of us there are, and how we 
might help one another.

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


[elm-discuss] Re: Post mortem for my first attempt at using Elm in a real app.

2016-09-20 Thread 'Rupert Smith' via Elm Discuss
On Monday, September 19, 2016 at 2:08:43 PM UTC+1, Peter Damoc wrote:
>
> I keep postponing this for a few weeks but today my partner decided to 
> stop the collaboration and I'll take advantage of this moment to write this 
> post mortem.
>

Di your 'collaboration' end because Elm turned out to be the wrong tool for 
the job? Or did it end for other unrelated reasons?

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


Re: [elm-discuss] Re: Post mortem for my first attempt at using Elm in a real app.

2016-09-20 Thread Peter Damoc
On Tue, Sep 20, 2016 at 5:18 PM, Lars Jacobsson 
wrote:

> Peter - just out of curiosity: How did you split those 8000 LOC up? Did
> you go for a structured component/react type splitup, or did you split
> "organically" when the need occurred?
>

It was more of an organic kind of split, mostly around functionality.

With the exception of some static pages that were handled directly by the
MainApp.elm, all the other pages had their own separate file.
Most of them were following TEA but some ended up not needing their own
model and update because they could delegate their actions to the top
level.
Functionality around routing was in its own file, same for the server
access API.
Business Objects Types were in their own file that was imported all over
the place
Serialization (encoders and decoders) was in its own file.
There was a Components.elm that was mainly various aggregates of elm-html
(simple functions).
There were also a few components (Dropbox, Carousel) that lived in their
own .elm files.
Some complex forms got also extracted at one point into their own files.
There were also some CSS only files.
One of them, SharedCSS.elm taught me a very important lesson:
Don't put code that changes frequently in a file that is imported by a lot
of other files.
changes to this file led to the longest compilation times. :)





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


[elm-discuss] Re: Post mortem for my first attempt at using Elm in a real app.

2016-09-20 Thread OvermindDL1
SCSS helps 'some' of the CSS woes at least.  I keep my CSS outside of elm 
and in SCSS and it works decently(ish).


On Tuesday, September 20, 2016 at 7:20:32 AM UTC-6, Rupert Smith wrote:
>
> On Monday, September 19, 2016 at 6:18:33 PM UTC+1, Rex van der Spuy wrote:
>>
>> CSS is hell-on-wheels: the most time I've spent debugging my Elm apps 
>> have not been with my Elm code, but with the CSS.
>>
>> Hey, Elm Community, we've solved JavaScript now we need a real solution 
>> to CSS! :)
>>
>
> I have decided to just stick with keeping the CSS out of Elm. Partly 
> because I need to share the CSS with other projects that are not using Elm. 
> Partly because I already have a good understanding of how to make use of 
> SCSS and Compass. Partly because it seems quicker and easier to develop the 
> CSS and test it with some static HTML served up by node express. Partly 
> because learning to use elm-css is just one thing too many for me to figure 
> out now.
>
> So it feels to me that Elm is neither helping or hindering my styling 
> efforts - yes, CSS can be very time consuming. 
>

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


[elm-discuss] Re: Post mortem for my first attempt at using Elm in a real app.

2016-09-20 Thread Lars Jacobsson
Peter - just out of curiosity: How did you split those 8000 LOC up? Did you 
go for a structured component/react type splitup, or did you split 
"organically" when the need occurred?

>
>
> Another large amount of time was spent trying to integrate a carousel. I 
> ended up reimplementing a bare bone version in pure Elm. 
>
> By the end, the code grew to about 8000 LOC of Elm. 
>
>

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


[elm-discuss] Re: Post mortem for my first attempt at using Elm in a real app.

2016-09-20 Thread Lars Jacobsson
Peter - just out of curiosity: How did you split those 8000 LOC up? Did you 
go for a structured component/react type splitup, or did you split 
"organically" when the need occurred?


On Monday, September 19, 2016 at 3:08:43 PM UTC+2, Peter Damoc wrote:
>
> I keep postponing this for a few weeks but today my partner decided to 
> stop the collaboration and I'll take advantage of this moment to write this 
> post mortem. 
>
> *Context*
>
> I was approached by a friend few months ago about a B2B project that was 
> supposed to help small businesses issue beautiful invoices. It was suppose 
> to be a free product that would synergize with some other products that his 
> business was already delivering. I was supposed to implement it and he 
> would do all the marketing and promotion.
>
> Having total freedom, I decided to use Elm to implement the platform in 
> cooperation with another part-time programmer that would do a JSON backend 
> in PHP. 
>
> The product required that the interface would be modern, responsive, 
> dynamic and look great. 
>
> *Beginning Phase*
>
> The first phase of the development was dominated by personal attempts at 
> reimplementing reactive design elements such as drawers that show on big 
> screens and hide on small devices. After a few buggy attempts I ended up 
> trowing everything away and switching to elm-mdl. 
>
> A considerable amount of time was also invested at this point to set up 
> some kind of automatic build environment. I ended up with a solution based 
> on gulp. 
>
> *Middle Phase *
>
> Once the build environment was set up, things started to move a little 
> faster. I then ended up needing CSS and after playing a little bit with 
> elm-css and hitting several missing properties I decided to implement my 
> own library, taking inspiration from all 3 libraries that were dealing with 
> style (rtfeldman/elm-css, elm-style and massung/elm-css). In hindsight this 
> might have been a rather bad idea for productivity reasons but I have 
> learned a lot. 
>
> *Ending Phase *
>
> After I passed the 5000 LOC mark, things really started to crumble around 
> me. My mind could no longer deal with the complexity I have created. 
> Most of the brain cyles in this phase have been wasted trying to use the 
> little JS I know to try and somehow add to my Elm UI some widgets that I 
> needed. I have failed.
>
> I have spent an inordinate amount of time trying to add some Dropdowns to 
> some forms I had, ending up reimplementing part of them in Elm and using 
> some CSS form the Semantic UI project. 
>
> Another large amount of time was spent trying to integrate a carousel. I 
> ended up reimplementing a bare bone version in pure Elm. 
>
> By the end, the code grew to about 8000 LOC of Elm. 
>
> *Conclusions *
>
> - *Elm is an amazing language.* I've had countless moments of sheer 
> pleasure programing in Elm for this app. 
> - *Elm lacks the full story. *My main hope was that I could implement the 
> app even if I had very little CSS or JS knowledge. I could not do this. Elm 
> does not have yet something that would allow someone to stop touching CSS. 
> -* I would not recommend webdev beginners to take the approach I took.* 
> It is better for now to stay the tried and proven path and just use Elm to 
> implement smaller components in another web framework. 
> - *The tooling around producing a deliverable elm webapp are simply not 
> ready yet.* 
>
>
> Thank you for taking the time to read this. 
> If any of you has curiosities around this experience, feel free to ask me 
> anything. :) 
>
>
>
>
>
> -- 
> 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.


[elm-discuss] Re: Post mortem for my first attempt at using Elm in a real app.

2016-09-20 Thread 'Rupert Smith' via Elm Discuss
On Monday, September 19, 2016 at 6:18:33 PM UTC+1, Rex van der Spuy wrote:
>
> CSS is hell-on-wheels: the most time I've spent debugging my Elm apps have 
> not been with my Elm code, but with the CSS.
>
> Hey, Elm Community, we've solved JavaScript now we need a real solution to 
> CSS! :)
>

I have decided to just stick with keeping the CSS out of Elm. Partly 
because I need to share the CSS with other projects that are not using Elm. 
Partly because I already have a good understanding of how to make use of 
SCSS and Compass. Partly because it seems quicker and easier to develop the 
CSS and test it with some static HTML served up by node express. Partly 
because learning to use elm-css is just one thing too many for me to figure 
out now.

So it feels to me that Elm is neither helping or hindering my styling 
efforts - yes, CSS can be very time consuming. 

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


[elm-discuss] Re: Post mortem for my first attempt at using Elm in a real app.

2016-09-19 Thread Richard Feldman
Thank you for posting this Peter! It's always informative to hear different 
perspectives. Sorry to hear yours wasn't positive.
 

> -* I would not recommend webdev beginners to take the approach I took.* 
>

This is my big takeaway here.

At work we've had a great experience following the the philosophy Noah 
advocates here, of "when feeling blocked, reach for a workaround," but 
that's predicated on knowing how to do the workarounds. Based on your 
experience, I can see how a web development beginner would not have that 
toolbox already at hand.

I think it's fair to say that Elm is a great choice for projects where 
teams are already comfortable doing Web development, but I can see how it 
wouldn't be the best choice a beginner building one of their first 
production Web applications. I expect that will change over time, but we 
are not there yet. :)

>

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


[elm-discuss] Re: Post mortem for my first attempt at using Elm in a real app.

2016-09-19 Thread Dave Rapin
Thanks for this great writeup! It really helps to read about other's 
experiences in an authentic and non-promotional way like this when making 
stack decision.

On Monday, September 19, 2016 at 9:08:43 AM UTC-4, Peter Damoc wrote:
>
> I keep postponing this for a few weeks but today my partner decided to 
> stop the collaboration and I'll take advantage of this moment to write this 
> post mortem. 
>
> *Context*
>
> I was approached by a friend few months ago about a B2B project that was 
> supposed to help small businesses issue beautiful invoices. It was suppose 
> to be a free product that would synergize with some other products that his 
> business was already delivering. I was supposed to implement it and he 
> would do all the marketing and promotion.
>
> Having total freedom, I decided to use Elm to implement the platform in 
> cooperation with another part-time programmer that would do a JSON backend 
> in PHP. 
>
> The product required that the interface would be modern, responsive, 
> dynamic and look great. 
>
> *Beginning Phase*
>
> The first phase of the development was dominated by personal attempts at 
> reimplementing reactive design elements such as drawers that show on big 
> screens and hide on small devices. After a few buggy attempts I ended up 
> trowing everything away and switching to elm-mdl. 
>
> A considerable amount of time was also invested at this point to set up 
> some kind of automatic build environment. I ended up with a solution based 
> on gulp. 
>
> *Middle Phase *
>
> Once the build environment was set up, things started to move a little 
> faster. I then ended up needing CSS and after playing a little bit with 
> elm-css and hitting several missing properties I decided to implement my 
> own library, taking inspiration from all 3 libraries that were dealing with 
> style (rtfeldman/elm-css, elm-style and massung/elm-css). In hindsight this 
> might have been a rather bad idea for productivity reasons but I have 
> learned a lot. 
>
> *Ending Phase *
>
> After I passed the 5000 LOC mark, things really started to crumble around 
> me. My mind could no longer deal with the complexity I have created. 
> Most of the brain cyles in this phase have been wasted trying to use the 
> little JS I know to try and somehow add to my Elm UI some widgets that I 
> needed. I have failed.
>
> I have spent an inordinate amount of time trying to add some Dropdowns to 
> some forms I had, ending up reimplementing part of them in Elm and using 
> some CSS form the Semantic UI project. 
>
> Another large amount of time was spent trying to integrate a carousel. I 
> ended up reimplementing a bare bone version in pure Elm. 
>
> By the end, the code grew to about 8000 LOC of Elm. 
>
> *Conclusions *
>
> - *Elm is an amazing language.* I've had countless moments of sheer 
> pleasure programing in Elm for this app. 
> - *Elm lacks the full story. *My main hope was that I could implement the 
> app even if I had very little CSS or JS knowledge. I could not do this. Elm 
> does not have yet something that would allow someone to stop touching CSS. 
> -* I would not recommend webdev beginners to take the approach I took.* 
> It is better for now to stay the tried and proven path and just use Elm to 
> implement smaller components in another web framework. 
> - *The tooling around producing a deliverable elm webapp are simply not 
> ready yet.* 
>
>
> Thank you for taking the time to read this. 
> If any of you has curiosities around this experience, feel free to ask me 
> anything. :) 
>
>
>
>
>
> -- 
> 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.