giraffeanimalafricadevtool100737245orig

Giraffe brings F# functional programming to ASP.Net Core

Giraffe, a micro web framework based on the F# language, is bringing functional-style programming to the development of web services on ASP.Net Core. Although F# is already supported in ASP.Net Core, Giraffe puts greater emphasis on the functional programming style by leveraging features such as higher-order functions. 

Likened to the Suave web server but specifically designed to work with Microsoft’s ASP.Net Core web framework, Giraffe is described as a native functional framework for building rich web applications that draws on advanced F# features. F# is an open source functional-first language that Microsoft created to address complex computing problems while producing simple, maintainable code.

Microsoft recently blogged about how to use Giraffe to build a web service with F# and the .Net Core 2.0 development platform. Because Giraffe is built on top of ASP.Net, developers using Giraffe can benefit from Microsoft’s ecosystem while writing applications in a functional way, Giraffe developer Dustin Moris Gorski said. Giraffe currently is in a beta stage of release, with an initial “release to manufacturing” version anticipated in the near future. An improved routing model for Giraffe is being worked on by a contributor to the project but that is not expected to be a breaking change.

“One point which I would really like to stress is that Giraffe is really not meant to be a competing product to other web technologies and particularly not to ASP.Net Core,” Gorski said. “It’s quite the opposite. The single most important goal of Giraffe is to keep its tight integration with ASP.Net Core and heavily rely on it to give developers a broad spectrum of well-tested, well-working and very intuitive features.” The framework can be seen as the functional counterpart of the ASP.Net Core MVC framework, Giraffe documentation states.

While F# already was supported in ASP.Net Core MVC, Giraffe offers a different technical philosophy that leverages F# features such as F# types, higher order functions, and partial application of arguments, said Phillip Carter, who works on F# and .Net at Microsoft. Giraffe, he said, enables development of web API routes in a functional style.

Available under an Apache 2.0 license, Giraffe can be plugged into the ASP.Net Core pipeline via middleware. Formerly called ASP.Net Core Lambda, Giraffe was renamed to better distinguish it from Amazon’s AWS Lambda server-less compute service.

IDG Insider

PREVIOUS ARTICLE

« Fnatic Gear Clutch G1 mouse review: Made by and for the e-sports crowd

NEXT ARTICLE

SOS review: Professional-grade, super-secure online backup »
author_image
IDG News Service

The IDG News Service is the world's leading daily source of global IT news, commentary and editorial resources. The News Service distributes content to IDG's more than 300 IT publications in more than 60 countries.

  • Mail

Recommended for You

International Women's Day: We've come a long way, but there's still an awfully long way to go

Charlotte Trueman takes a diverse look at today’s tech landscape.

Trump's trade war and the FANG bubble: Good news for Latin America?

Lewis Page gets down to business across global tech

20 Red-Hot, Pre-IPO companies to watch in 2019 B2B tech - Part 1

Martin Veitch's inside track on today’s tech trends

Poll

Do you think your smartphone is making you a workaholic?