packages feed

happs-tutorial-0.8: templates/yourfirstmacid.st

<h3>Your first applications with Happstack.State</h3>
<p>Now we're getting into the very basics of how to make an application with Happstack.State.</p>
<p>Take a look at the application defined in <a href="/src/FirstMacid.hs">FirstMacid.hs</a>, read
the comments, and copy it somewhere you feel comfortable running it.</p>
<p>Play with it at the command prompt for a bit.  Choose various values to add to the state.
Close the program, and then reload it.  Check the state and everything should be saved right where
you left it.  Cool, eh?</p>
<p>One thing I want to point out is that this example makes no use of Happstack.Server whatsoever.
They are completely independent of each other.</p>
<p>Now we have a second example to look at before we're done with this intro to Happstack.State: 
<a href="/src/ComponentExample.hs">ComponentExample.hs</a>.  Again, you'll want to read the
inline comments as they contain the bulk of the instruction of this chapter.</p>
<p>Next we'll talk about creating 
<a href="/tutorial/multimaster">distributed</a> applications using Happstack.State.