Greetings, Everyone. I had been puzzling over something for a while and my search eventually led me here.
What I was hoping to see demonstrated in Elm -- and have not found in my searches -- is how one would accommodate a plugin architecture that allows modules to be installed, activated, and deactivated in the same way that browser extensions are. That is, once you load the module/extension it is present and can be activated or deactivated. I have good ideas for how to do these things in languages I am more familiar with like JavaScript and Clojure, but I wonder how the same might be accomplished in an ML language like Elm. I am sure I could make something work, but I believe an experienced Elm programmer would end up with a more elegant solution. I am wondering if there are idioms the community uses for this kind of thing. So I will make an example of the kind of thing I am after. Given the existing Elm todo app <https://github.com/evancz/elm-todomvc>, how would one modify it to allow plugins such as the following where different concerns can be added in per the user: 1) due-dates: installing and activating this plugin causes a due date field to be added to the Todo model. The interface still provides only the text input field for providing the next "What needs to be done?" entry. In the list portion of the view a due date column appears. When the user types in an @ followed by a date (e.g. @2016-11-01) the value is parsed out of the text and included in the due date field in the list below. 2) tags: installing and activating this plugin causes a tags field to be added to the Todo model. The interface still provides only the text input field for providing the next "What needs to be done?" entry. In the list portion of the view a tags column appears. When the user types in a # followed by a contiguous word or group of words (e.g. #finance #2016-taxes) the values are parsed out of the text and included in the tags field in the list below. When a plugin is deactivated the columns are simply dropped from the model. I am not worried about persistence. If you have any repos that address this, please point the way. Thanks for any insight. This post originally originated here: https://groups.google.com/forum/#!topic/elm-dev/wymnXbZy5wA -- 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.