[Haskell-beginners] Recommended DB layer?

Erik de Castro Lopo mle+hs at mega-nerd.com
Sun Jun 16 22:40:52 CEST 2013


harry wrote:

> I've seen yesod-persistent described as "worst practices", e.g.
> http://www.reddit.com/r/haskell/comments/1dk73s/web_frameworks_benchmark_4_includes_wai/c9rt80t.
> Is this just a one-off poster, or do others agree with it? What are
> considered best practices?

I am a very experienced programmer (20+ years of coding, doing Haskell
since 2008) but had not done much with database before starting a
project with Yesod and Persistent. Obvioulsy I don't really know
what "best practices" are.

However, I have found Persistent along with Esqueleto a most pleasant
experience. My app is only targeting Postgresql. I did some reading
on database design, specifically about the importance of normailizing
the data. I then designed the the schema and started writing inserts
(using Persistent) and queries and updates (using Esqueleto). I am
100% certain that the type safety these languages of these interfaces
has prevented numerous bugs.

The only pain point has been breaking updates in the API causing me
to have to fix my code.

HTH,
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/



More information about the Beginners mailing list