Servant (web framework)
{{Short description|Haskell web framework}}
{{Infobox software
| name = Servant
| screenshot =
| author = Alp Mestanogullari, Sönke Hahn, Julian Arni
| caption =
| released = {{Start date and age|2014}}
| latest release version = {{wikidata|property|edit|reference|P348}}
| latest release date = {{Start date and age|2022|10|28}}
| latest preview version = 0.16
| latest preview date = {{Start date and age|2018}}
| operating system = Cross-platform
| platform =
| language = English
| programming language = Haskell
| genre = Web framework
| license = BSD 3-clause{{cite web |title=Servant license |url=https://github.com/haskell-servant/servant/blob/master/servant/LICENSE |website=GitHub |access-date=10 February 2023}}
| website = {{URL|www.servant.dev}}
}}
Servant is a web framework based on the functional programming language Haskell, with an emphasis on data type safety.{{cite book
|last1=Bragilevsky
|first1=Vitaly
|date=May 2021
|title=Haskell in Depth
|publisher=Manning
|isbn=978-1617295409
|last1=Putrady
|first1=Ecky
|date=12 November 2018
|title=Practical Web Development with Haskell: Master the Essential Skills to Build Fast and Scalable Web Applications
|publisher=Apress
|isbn=978-1484237380
|last1=Mazumder
|first1=Mark
|last2=Braje
|first2=Timothy
|date=4 November 2016
|title=2016 IEEE Cybersecurity Development (SecDev)
|chapter=Safe Client/Server Web Development with Haskell
|chapter-url=https://ieeexplore.ieee.org/document/7839809
|page=150
|doi=10.1109/SecDev.2016.040
|isbn=978-1-5090-5589-0
|s2cid=1953852
}}{{cite web |last1=Mazumder |first1=Mark |last2=Braje |first2=Timothy |date=4 November 2016 |title=Safe Client/Server Web Development with Haskell |url=https://haskell-web-intro.github.io/secdev/ |website=GitHub |publisher=Massachusetts Institute of Technology: Lincoln Laboratory |access-date=7 November 2024}} Original slide presentation. It is free and open-source software released under a BSD 3-clause license.
Overview
Servant provides a type-level domain-specific language (DSL) to describe World Wide Web application programming interfaces (Web APIs); various interpretations of such descriptions are possible: as a server, which dispatches requests to handlers; as documentation and schema specifications for the API; and as client libraries in various languages.{{cite book
|last1=Mestanogullari
|first1=Alp
|last2=Hahn
|first2=Sönke
|last3=Arni
|first3=Julian
|last4=Löh
|first4=Andreas
|date=2015
|title=Proceedings of the 11th ACM SIGPLAN Workshop on Generic Programming
|chapter=Type-level web APIs with Servant: An exercise in domain-specific generic programming
|doi=10.1145/2808098.2808099
|pages=1–12
|isbn=9781450338103
|s2cid=14512955
}}
The type-level approach by Servant solves the expression problem by allowing the extensibility along the dimensions of both data and behavior. New combinators or terms in the DSL can be modularly introduced, as can new interpretations of them, as entirely separate packages. {{As of|2023}}, well over 100 packages related to Servant have been published in the Haskell package repository.{{cite web |url=https://hackage.haskell.org/packages/search?terms=servant |title=Browse and search packages |website=Haskell.org: Hackage}}
Use
It is used in production by companies such as GitHub,{{cite journal
|last1=Thomson
|first1=Patrick
|last2=Rix
|first2=Rob
|last3=Wu
|first3=Nicolas
|last4=Schrijvers
|first4=Tom
|date=31 August 2022
|title=Fusing industry and academia at GitHub (experience report)
|journal=Proceedings of the ACM on Programming Languages
|volume=6
|pages=496–511
|doi=10.1145/3547639
|s2cid=249889460
|arxiv=2206.09206
}} NoRedInk,{{cite web |title=Type-Safe MySQL Queries via Postgres |url=https://blog.noredink.com/post/188829831203/type-safe-mysql-queries-via-postgres |website=NoRedInk Blog |date=5 November 2019 |access-date=16 February 2023}} Klarna,{{cite web |last1=Mulder |first1=Felix |title=Haskell in Production: Services at Klarna written in Haskell |url=https://felixmulder.com/talks/2020/01/21/Haskell-at-Klarna.html#/our-haskell-stack |access-date=16 February 2023}} Input Output Global Inc. (in the Cardano project),{{cite web |title=Cardano Wallet Design |url=https://input-output-hk.github.io/cardano-wallet/design/Specifying-exceptions-with-Servant-and-Swagger#background |access-date=16 February 2023}} and Wire.{{cite web |title=Servant |url=https://docs.wire.com/developer/developer/servant.html |website=Wire Documentation |access-date=16 February 2023}}
See also
References
{{Reflist}}
External links
- {{Official website|www.servant.dev}}
- {{GitHub|haskell-servant}}
{{Web frameworks}}
{{Haskell programming}}
Category:Free software programmed in Haskell
Category:Software using the BSD license
{{Web-software-stub}}
{{Free-software-stub}}