New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple book/authors example? #3
Comments
Also, maybe an example without lenses? As they seem to be pretty optional, as indicated by happstack tutorial: http://happstack.com/docs/crashcourse/AcidState.html |
This is more of an acid-state thing than a snaplet thing, so I probably won't add that kind of an example here. This project is just a snaplet that makes it more convenient to use acid-state in a Snap application. The point of my examples and documentation is to demonstrate the use of the snaplet, not the underlying library. Lenses might be optional with acid-state but they are not optional for snaplets, so I'm not inclined to dumb the example down to sidestep a concept that you need to understand anyway to use this package. |
Well... not really. For example, I know how to write an acid-state code in happstack, according to this tutorial: But how do I integreate that into snap (using snaplet-acid-state)? Maybe you can show that example from happstack - the one that represents a "Blog" with "posts" (or explain how to integrate the example with Snap)? |
The counter example is almost exactly the same as Happstack's. By comparing those you can see which things are different between Happstack and Snap and which are common to acid-state. From there, the same transformation applies to the more complicated blog app. |
Any chance of there appearing a simple example of acid-state with books and authors? It's pretty hard to figure out for me how to extend the current example to something like this.
E.g. simple site that lists all the books in the "database", with many-to-one authors per book.
The text was updated successfully, but these errors were encountered: