# About Web Development

**URL:** <https://discuss.ocaml.org/t/about-web-development/154>\
**Category:** Ecosystem\
**Tags:** bucklescript, web, jsoo, ocsigen, cohttp\
**Created:** [May 15, 2017, 10:39pm UTC](https://discuss.ocaml.org/t/about-web-development/154 "2017-05-15T22:39:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![glennsl](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/glennsl/32/142_2.png) [@glennsl](https://discuss.ocaml.org/u/glennsl)\
**Post date:** [May 15, 2017, 10:39pm UTC](https://discuss.ocaml.org/t/about-web-development/154/1 "2017-05-15T22:39:42Z")

</div>

This category is for discussing web development in OCaml, with some of the major pieces of this puzzle being:

#### Frameworks

[opium](https://github.com/rgrinberg/opium) is a Sinatra-like framework built on [cohttp](https://github.com/mirage/ocaml-cohttp/).

[Eliom](http://ocsigen.org/eliom/) is a more full-featured framework for server or client-server **Web and mobile** app development, from the [Ocsigen](http://ocsigen.org) project. It turns OCaml (or Reason) into a **multitier language** , which simplifies a lot the communication between client and server. It makes it possible to write both the Web and mobile apps (Android, iOS …) with the exact same code. It contains an advanced session mechanism and provides functional reactive interface programming using [React](http://erratique.ch/software/react).

[ocaml-webmachine](https://github.com/inhabitedtype/ocaml-webmachine) is a port of [webmachine](https://github.com/webmachine/webmachine) built on top of [cohttp](https://github.com/mirage/ocaml-cohttp/), and particularly well-suited for writing RESTful APIs.

#### JavaScript transpilers

[js\_of\_ocaml](http://ocsigen.org/js_of_ocaml/) compiles OCaml bytecode to JavaScript, focusing on interoperability with opam and the OCaml ecosystem.

[BuckleScript](http://bloomberg.github.io/bucklescript/) compiles a more high-level intermediate representation of OCaml into decently readable JavaScript and focuses more on interoperability with JavaScript and the npm ecosystem.

#### js\_of\_ocaml ecosystem

[incr\_dom](https://github.com/janestreet/incr_dom) is an MVC-like front-end framework based on [virtual-dom](https://github.com/Matt-Esch/virtual-dom) and using js\_of\_ocaml.

[ocaml-vdom](https://github.com/LexiFi/ocaml-vdom) is an implementation of the Elm Architecture for js\_of\_ocaml.

[gen\_js\_api](https://github.com/LexiFi/gen_js_api) Easy OCaml bindings for Javascript libraries.

#### BuckleScript ecosystem

[reason-react](https://github.com/reasonml/reason-react) is high-level BuckleScript bindings to React (Reason is, as the name suggests, recommended but not actually required.)

[bucklescript-tea](https://github.com/OvermindDL1/bucklescript-tea) is an implementation of the Elm Architecture for BuckleScript.

#### Ocsigen ecosystem

[Ocsigen Toolkit](http://ocsigen.org/ocsigen-toolkit/) a client-server toolkit taking advantage of Eliom’s multitier language.

[Ocsigen Start](http://ocsigen.org/ocsigen-start/) a template for easily build your first multi-platform (Web and mobile) app.

[Ocsigen Tyxml](http://ocsigen.org/tyxml/) a library for building statically correct HTML5 and SVG documents.

[Ocsigen Server](http://ocsigen.org/ocsigenserver/) a full featured and extensible Web server, with CGI, authentication, access control, reverse proxy, user pages, etc. Now based on cohttp.

#### Template languages

[ocaml-mustache](https://github.com/rgrinberg/ocaml-mustache) is an implementation of the [mustache](http://mustache.github.io/) logic-less template language.

[Snabela](http://blog.appliedcompscilab.com/snabela-release/index.html) is a logic-less template language that is heavily inspired by [mustache](http://mustache.github.io/), but makes a few improvements on it.

#### Companions

[Reason](http://facebook.github.io/reason/) is a Facebook-backed project that aims to provide OCaml with friendlier syntax, tools and workflow. It takes a lot of inspiration from JavaScript and its ecosystem, and has formed a strong and growing community around itself in combination with BuckleScript and reason-react.

---

<div class="post-metadata">

**Author:** ![avsm](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/avsm/32/6_2.png) [@avsm](https://discuss.ocaml.org/u/avsm)\
**Post date:** [May 16, 2017, 1:13am UTC](https://discuss.ocaml.org/t/about-web-development/154/2 "2017-05-16T01:13:43Z")

</div>

A headsup for Cohttp users: there is a significant packaging rearrangement incoming in order to simplify its many backends. Details on @rgrinberg’s blog at: [http://rgrinberg.com/posts/cohttp-breakage-ahead/](http://rgrinberg.com/posts/cohttp-breakage-ahead/)

---

<div class="post-metadata">

**Author:** ![Yaron\_Minsky](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/yaron_minsky/32/11_2.png) [@Yaron\_Minsky](https://discuss.ocaml.org/u/Yaron_Minsky)\
**Post date:** [May 16, 2017, 1:46am UTC](https://discuss.ocaml.org/t/about-web-development/154/3 "2017-05-16T01:46:05Z")

</div>

You might want to add incr\_dom to your list of frameworks:

> **[janestreet/incr\_dom](https://github.com/janestreet/incr_dom)**
>
> A library for building dynamic webapps, using Js\_of\_ocaml. - janestreet/incr\_dom

---

<div class="post-metadata">

**Author:** ![avsm](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/avsm/32/6_2.png) [@avsm](https://discuss.ocaml.org/u/avsm)\
**Post date:** [May 16, 2017, 1:58am UTC](https://discuss.ocaml.org/t/about-web-development/154/4 "2017-05-16T01:58:33Z")

</div>



---

<div class="post-metadata">

**Author:** ![Yaron\_Minsky](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/yaron_minsky/32/11_2.png) [@Yaron\_Minsky](https://discuss.ocaml.org/u/Yaron_Minsky)\
**Post date:** [May 16, 2017, 2:01am UTC](https://discuss.ocaml.org/t/about-web-development/154/5 "2017-05-16T02:01:39Z")

</div>

And LexiFi’s ocaml-vdom, which is an Elm-style architecture implemented in OCaml, is also a reasonable thing to mention.

> **[LexiFi/ocaml-vdom](https://github.com/LexiFi/ocaml-vdom)**
>
> Elm architecture and (V)DOM for OCaml. Contribute to LexiFi/ocaml-vdom development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![glennsl](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/glennsl/32/142_2.png) [@glennsl](https://discuss.ocaml.org/u/glennsl)\
**Post date:** [May 16, 2017, 2:17am UTC](https://discuss.ocaml.org/t/about-web-development/154/6 "2017-05-16T02:17:14Z")

</div>

Done. Also added a few BuckleScript frameworks as counterweight 🙂

---

<div class="post-metadata">

**Author:** ![avsm](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/avsm/32/6_2.png) [@avsm](https://discuss.ocaml.org/u/avsm)\
**Post date:** [May 16, 2017, 2:51am UTC](https://discuss.ocaml.org/t/about-web-development/154/7 "2017-05-16T02:51:12Z")

</div>

Also template languages :

- Snabella was added opam a few days ago: [http://blog.appliedcompscilab.com/snabela-release/index.html](http://blog.appliedcompscilab.com/snabela-release/index.html)
- Mustache logicless templates [https://github.com/rgrinberg/ocaml-mustache](https://github.com/rgrinberg/ocaml-mustache)

The upstream link for cohttp in your post should probably be corrected to [https://github.com](https://github.com)./mirage/ocaml-cohttp and not my personal fork.

Thanks for collating this list!

---

<div class="post-metadata">

**Author:** ![glennsl](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/glennsl/32/142_2.png) [@glennsl](https://discuss.ocaml.org/u/glennsl)\
**Post date:** [May 16, 2017, 9:47am UTC](https://discuss.ocaml.org/t/about-web-development/154/8 "2017-05-16T09:47:55Z")

</div>

Oops, apparently I just blindly copied the cohttp link from opium, which I guess is also wrong. Submitted a PR there as well.

Added the template languages.

---

<div class="post-metadata">

**Author:** ![avsm](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/avsm/32/6_2.png) [@avsm](https://discuss.ocaml.org/u/avsm)\
**Post date:** [January 2, 2018, 8:04pm UTC](https://discuss.ocaml.org/t/about-web-development/154/9 "2018-01-02T20:04:16Z")

</div>

> [@glennsl](#):
>
> This category is for discussing web development in OCaml, with some of the major pieces of this puzzle being:

the Web category has been [replaced by a tag](https://discuss.ocaml.org/t/rearranging-project-categories-into-sub-categories/1319/6) instead and this post is linked to from the [central FAQ](https://discuss.ocaml.org/t/wip-frequently-asked-questions/1247).

Would you like to edit the original post here to direct users to the [`web` tag](https://discuss.ocaml.org/tags/web)? Alternatively, we can also turn this topic into a wiki page that makes it editable by other users to make it easier to maintain the list of resources above.
