Install MailHog with MAMP Pro, using HomeBrew.
First let's make sure HB is updated. Open up terminal for the following steps.
$ brew update
You'll need to include two pollyfils before you include a code with your custom elements:
• webcomponents/webcomponentsjs/custom-elements-es5-adapter.js - this is for new browsers in order to understand ES5 syntax
• webcomponents/custom-elements/custom-elements.min.js - this is for old browsers without
You can add them to your
index.html file in the following way:
A state machine is defined as follows:
Input- a set of inputs
Output- a set of outputs
State- a set of states
S0 ∈ S- an initial state
T : Input * State -> Output * State- a transition function
If you model your services (aggregates, projections, process managers, sagas, whatever) as state machines, one issue to address is management of
State. There must be a mechanism to provide
State to the state machine, and to persist resulting
State for subsequent retrieval. One way to address this is by storing
State is a key-value store. Another way is to use a SQL database. Yet another way is event sourcing. The benefit of even sourcing is that you never need to store
State itself. Instead, you rely on the
Output of a service to reconstitute state. In order to do that, the state machine transition function needs to be factored into two functions as follows:
In this article, I'd like to explain why I think The Elm Architecture is fine for small components, but quite harmful for websites based on pages.
First, let's clarify what I mean by "The Elm Architecture".
The Elm Architecture's webpage describes it pretty well.