Shareable APIs and more

2016/08/25   Alexander Thiemann  

I’m happy to announce the next Spock release! This release comes with several cool new features: “Shareable” API definitions wildcard route pattern Custom error handlers Custom HTTP verbs New CSRF protection New session storage system Removal of untyped routing Split of packages Multiple bug fixes A big thank you goes to all awesome contributors (in chronological order): lloucas-imvu, timjb, dancingrobot84 and cdepillabout! “Shareable” API definitions When we started using GHCJS for a project’s frontend where...

Read More...

Taking Authentication to the next Level

2015/08/23   Alexander Thiemann  

I’ve just released a new version of Spock: 0.9.0.0. Along with some small improvements a big feature has dropped: Contexts. Let’s take a look at them and how they can help out in an authentication scenario. What are ‘Contexts’? A context is a value that lives during a request. When a request arrives at your application, the context will be initialized with (). Hence the type of the basic route wiring monad SpockT m a...

Read More...

Type-safe routing in Spock

2015/04/19   Tim Baumann  

Since version 0.7 Spock features a new routing system that enables more type-safe code while still being relatively simple and lightweight. For backwards compatibility, Spock still supports old-style routing. Users can choose to use it by importing Web.Spock.Simple or to use the new one by going with Web.Spock.Safe. In this post, I will show how to declare routes using the new routing system and discuss its advantages. For comparison, here’s an example site implemented with...

Read More...

Welcome to the Spock Homepage

2015/04/02   Alexander Thiemann  

Today I am launching the website for the Haskell web framework Spock. Currently, there is a short homepage to market the framework, a beginners tutorial and some helpful links. Over time I plan to add more tutorials and will write about releases and new features. Guest posts are welcome, too. If you have anything you’d like to share about Spock (that can be technical or just an experience report), feel free to contact me at...

Read More...