|
Your first applications with Happstack.StateNow we're getting into the very basics of how to make an application with Happstack.State. Take a look at the application defined in FirstMacid.hs, read the comments, and copy it somewhere you feel comfortable running it. 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? 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. Now here's a second example to look at, one that demonstrates using a non-trivial Dependencies list in order to improve modularity: ComponentExample.hs. Again, you'll want to read the inline comments as they contain the bulk of the instruction of this chapter. To summarize the major points of this chapter:
Next we'll talk about creating distributed applications using Happstack.State. |