This repository aims to reference existing web programming tools, frameworks and libraries in OCaml. There are also a list of todo.
- Ocaml for web programming
- Bindings
- Running OCaml program in browsers
- Pure OCaml web frameworks/libraries
- To-do
-
Standard library Binding to the javascript standard library
- ocaml-js-stdlib with gen_js_api.
-
JQuery Jquery provides some objects and methods to improve the DOM manipulation and event handling.
- Binding in js_of_ocaml: ocaml-jquery (more up to date, forked from https://github.com/gabriel-cardoso/ocaml-jquery)
- Binding with gen_js_api in ocaml-js-stdlib.
-
Nodejs Instead of using javascript only in a web browser, Nodejs allows you to use javascript on your system by providing a javascript interpreter running on top of Google V8 javascript engine Nodejs has lots of module which give you the possibility to run, for example, an http server.
- Binding in js_of_ocaml: ocaml-nodejs
-
D3 D3.js is a JavaScript library for manipulating documents based on data. D3 helps you bring data to life using HTML, SVG, and CSS. D3’s emphasis on web standards gives you the full capabilities of modern browsers without tying yourself to a proprietary framework, combining powerful visualization components and a data-driven approach to DOM manipulation.
- Binding in js_of_ocaml: ocaml-d3 (can be installed with opam install d3)
-
- Binding in js_of_ocaml: ocaml-extjs
-
- Binding in js_of_ocaml: reactjs_of_ocaml
-
- Binding in js_of_ocaml: ocaml-electron
-
- Binding with gen_js_api: ocaml-googlemaps
- Cordova plugins
Cordova allows you to develop hybrid mobile applications using web technologies. Through plugins, you can access to devices components.
- Bindings to cordova plugins with js_of_ocaml and gen_js_api.
OCaml to javascript compilers:
Tools to simplify bindings:
- Ocsigen Tyxml: Library to build statically correct Html and Svg
-
- Server side page generation (and continuation based Web programming)
- Language extension for client-server Web application in OCaml
- Session manipulation
- Reactive Web pages
- Mobile applications in OCaml with Apache Cordova
-
Ocsigen Toolkit: Native OCaml widgets for client or client-server Web applications
- Ocsigen Server: Modular Web server (using cohttp or its own http library) with https, access control, authentication, user configuration files, reverse proxy, CGI scripts, etc.
-
- Server side page generation (and continuation based Web programming)
- Language extension for client-server Web application in OCaml
- Session manipulation
- Reactive Web pages
- Mobile applications in OCaml with Apache Cordova
-
Ocsigen Eliom base app: High level library and application template with user management, notifications, mobile app (work in progress)
-
Typescript aims to develop a typed javascript. DefinitelyTyped contains a lot of bindings to popular javascript libraries. It would be useful to have a compiler OCaml to typescript and use this repository as reference.
-
Bindings to popular javascript frameworks
- Angularjs
- Backbone.js
- Ember.js
- JQueryUI
- Babylon
- Karma
- Phantom JS
-
Bindings to node packages. Can be interesting to have a website such as the official website for node packages (here) with the bindings.
-
Think about typed CSS with OCaml.
-
Create typed bindings to CSS frameworks such as bootstrap, MaterializeCSS.
-
Functions to create style HTML elements such as buttons, containers, rows, etc using popular CSS libraries --> Simplify HTML5 pages builds. We can imagine to have a module for each popular CSS libraries. For example, we can have with bootstrap
module B = Bootstrap_css
B.create_container (B.create_row (B.create_col 4 ~lg:3 ~md:6 ~xs:12))
giving as output
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-6 col-xs-12"></div>
<div class="col-lg-3 col-md-6 col-xs-12"></div>
<div class="col-lg-3 col-md-6 col-xs-12"></div>
<div class="col-lg-3 col-md-6 col-xs-12"></div>
</div>
</div>
Use Tyxml ?
-
Ionic allows to develop hybrid mobile applications with a native apparence using web technologies. There are ionic plugins written in Javascript (different than cordova plugins).
-
NativeScript: build truly mobile applications with web technologies.
-
Integration with popular text editors/IDE.
-
A package manager such as npm.
-
Task runners such as Gulp/Grunt