agentm / project-m36

Project: M36 Relational Algebra Engine
The Unlicense
895 stars 48 forks source link

Blog web example #162

Closed agentm closed 6 years ago

agentm commented 6 years ago

The blog example has been augmented with a scotty-based web interface as a demonstration of how Haskell data types can be easily marshalled between the database and back.

In this case, we have two data types: Blog and Comment where blogs are in a one-to-many relationship with comments.

Are there things here I could simplify to make it more accessible to newcomers?

agentm commented 6 years ago

I would like to write a blog post about how easily Project:M36 can slide into an existing Haskell project. Is there anything I am missing?

3noch commented 6 years ago

I'd recommend lucid over blaze-html. It doesn't require all those module qualifications.

3noch commented 6 years ago

Nice work!

agentm commented 6 years ago

I switch away from qualified imports for the HTML generation. Does that address the immediate issue?

agentm commented 6 years ago

Are there any other database interactions I could streamline. Beyond Tupleable, I suspect there are more ORM-style convenience methods we could add, but perhaps they're not essential yet.

Does this example offer a good overview of the APIs involved?