└── README.md /README.md: -------------------------------------------------------------------------------- 1 | Ocaml for web programming 2 | ========================= 3 | 4 | This repository aims to reference existing web programming tools, frameworks and 5 | libraries in OCaml. There are also a list of todo. 6 | 7 | * [Ocaml for web programming](#ocaml-for-web-programming) 8 | * [Bindings](#bindings) 9 | * [Javascript libraries/frameworks](#javascript-librariesframeworks) 10 | * [Mobile development](#mobile-development) 11 | * [Running OCaml program in browsers](#running-ocaml-program-in-browsers) 12 | * [Pure OCaml web frameworks/libraries](#pure-ocaml-web-frameworkslibraries) 13 | * [Typed HTML/CSS](#typed-htmlcss) 14 | * [Server and client side](#server-and-client-side) 15 | * [Web servers](#web-servers) 16 | * [Client side](#client-side) 17 | * [Mobile development](#mobile-development-1) 18 | * [To-do](#to-do) 19 | * [Typescript/Javascript](#typescriptjavascript) 20 | * [HTML/CSS](#htmlcss) 21 | * [Hybrid mobile programming](#hybrid-mobile-programming) 22 | * [Tools](#tools) 23 | 24 | # Bindings 25 | 26 | ## Javascript libraries/frameworks 27 | 28 | * Standard library 29 | Binding to the javascript standard library 30 | - [ocaml-js-stdlib](https://github.com/dannywillems/ocaml-js-stdlib) with 31 | gen_js_api. 32 | 33 | * [JQuery](https://jquery.com/) 34 | Jquery provides some objects and methods to improve the DOM manipulation and 35 | event handling. 36 | - Binding in js_of_ocaml: [ocaml-jquery](https://github.com/kitec/ocaml-jquery) (more 37 | up to date, forked from https://github.com/gabriel-cardoso/ocaml-jquery) 38 | - Binding with gen_js_api in [ocaml-js-stdlib](https://github.com/dannywillems/ocaml-js-stdlib). 39 | 40 | * [Nodejs](https://nodejs.org/en) 41 | Instead of using javascript only in a web browser, Nodejs allows you to use 42 | javascript on your system by providing a javascript interpreter running on 43 | top of [Google V8 javascript engine](https://developers.google.com/v8/) 44 | Nodejs has lots of module which give you the possibility to run, for 45 | example, an http server. 46 | - Binding in js_of_ocaml: [ocaml-nodejs](https://github.com/fxfactorial/ocaml-nodejs) 47 | 48 | * [D3](https://d3js.org/) 49 | D3.js is a JavaScript library for manipulating documents based on data. D3 50 | helps you bring data to life using HTML, SVG, and CSS. D3’s emphasis on web 51 | standards gives you the full capabilities of modern browsers without tying 52 | yourself to a proprietary framework, combining powerful visualization 53 | components and a data-driven approach to DOM manipulation. 54 | - Binding in js_of_ocaml: [ocaml-d3](https://github.com/seliopou/ocaml-d3) (can be 55 | installed with opam install d3) 56 | 57 | * [extjs](https://www.sencha.com/products/extjs/#overview) 58 | - Binding in js_of_ocaml: [ocaml-extjs](https://github.com/astrada/ocaml-extjs) 59 | 60 | * [reactjs](https://facebook.github.io/react/) 61 | - Binding in js_of_ocaml: [reactjs_of_ocaml](https://github.com/AngryLawyer/reactjs_of_ocaml) 62 | 63 | * [electron](https://github.com/atom/electron) 64 | - Binding in js_of_ocaml: [ocaml-electron](https://github.com/fxfactorial/ocaml-electron) 65 | 66 | * [Google Maps](https://developers.google.com/maps/documentation/javascript/3.exp/reference?hl=fr) 67 | - Binding with gen_js_api: [ocaml-googlemaps](https://github.com/besport/ocaml-googlemaps) 68 | 69 | ## Mobile development 70 | 71 | * [Cordova plugins](https://cordova.apache.org/) 72 | Cordova allows you to develop hybrid mobile applications using web technologies. Through plugins, you can access to devices components. 73 | - [Bindings to cordova plugins](https://github.com/dannywillems/ocaml-cordova-plugin-list) with js_of_ocaml and gen_js_api. 74 | 75 | # Running OCaml program in browsers 76 | 77 | OCaml to javascript compilers: 78 | * [Ocsigen js_of_ocaml](https://ocsigen.org/js_of_ocaml) 79 | * [Bloomberg Bucklescript](https://github.com/bloomberg/bucklescript) 80 | 81 | Tools to simplify bindings: 82 | * [gen_js_api](https://github.com/lexifi/gen_js_api) 83 | 84 | # *Pure* OCaml web frameworks/libraries 85 | 86 | ## Typed HTML/CSS 87 | 88 | * [Ocsigen Tyxml](http://ocsigen.org/tyxml/): Library to build statically correct Html and Svg 89 | 90 | ## Server and client side 91 | 92 | * [Ocsigen Eliom](http://ocsigen.org/eliom/): 93 | - Server side page generation (and continuation based Web programming) 94 | - Language extension for client-server Web application in OCaml 95 | - Session manipulation 96 | - Reactive Web pages 97 | - Mobile applications in OCaml with Apache Cordova 98 | 99 | * [Ocsigen Toolkit](http://ocsigen.org/ocsigen-widgets/): Native OCaml widgets for client or client-server Web applications 100 | 101 | ## Web servers 102 | 103 | * [Ocsigen Server](http://ocsigen.org/ocsigenserver/): Modular Web server (using cohttp or its own http library) with https, access control, authentication, user configuration files, reverse proxy, CGI scripts, etc. 104 | 105 | ## Client side 106 | 107 | ## Mobile development 108 | 109 | * [Ocsigen Eliom](http://ocsigen.org/eliom/): 110 | - Server side page generation (and continuation based Web programming) 111 | - Language extension for client-server Web application in OCaml 112 | - Session manipulation 113 | - Reactive Web pages 114 | - Mobile applications in OCaml with Apache Cordova 115 | 116 | * [Ocsigen Eliom base app](http://ocsigen.org/eliom-base-app/): High level library and application template with user management, notifications, mobile app (work in progress) 117 | 118 | # To-do 119 | 120 | ## Typescript/Javascript 121 | 122 | * [Typescript](http://www.typescriptlang.org/) aims to develop a typed javascript. [DefinitelyTyped](https://github.com/DefinitelyTyped/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. 123 | 124 | * Bindings to popular javascript frameworks 125 | - Angularjs 126 | - Backbone.js 127 | - Ember.js 128 | - JQueryUI 129 | - Babylon 130 | - Karma 131 | - Phantom JS 132 | 133 | * Bindings to node packages. Can be interesting to have a website such as the official website for node packages ([here](https://www.npmjs.com/)) with the bindings. 134 | 135 | ## HTML/CSS 136 | 137 | * Think about typed CSS with OCaml. 138 | 139 | * Create typed bindings to CSS frameworks such as [bootstrap](http://getbootstrap.com/), [MaterializeCSS](http://materializecss.com/). 140 | 141 | * 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 142 | ```OCaml 143 | module B = Bootstrap_css 144 | B.create_container (B.create_row (B.create_col 4 ~lg:3 ~md:6 ~xs:12)) 145 | ``` 146 | giving as output 147 | ```HTML 148 |