{"id":13567282,"url":"https://github.com/dannywillems/ocaml-for-web-programming","last_synced_at":"2025-03-21T20:34:32.772Z","repository":{"id":75871835,"uuid":"55408085","full_name":"dannywillems/ocaml-for-web-programming","owner":"dannywillems","description":"OCaml for web programming","archived":false,"fork":false,"pushed_at":"2016-08-28T09:40:37.000Z","size":6,"stargazers_count":52,"open_issues_count":0,"forks_count":1,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-10-13T21:32:19.333Z","etag":null,"topics":["ocaml","web"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dannywillems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-04-04T12:06:44.000Z","updated_at":"2024-05-15T18:02:36.000Z","dependencies_parsed_at":"2023-02-25T01:00:33.889Z","dependency_job_id":null,"html_url":"https://github.com/dannywillems/ocaml-for-web-programming","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannywillems%2Focaml-for-web-programming","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannywillems%2Focaml-for-web-programming/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannywillems%2Focaml-for-web-programming/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannywillems%2Focaml-for-web-programming/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dannywillems","download_url":"https://codeload.github.com/dannywillems/ocaml-for-web-programming/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221819064,"owners_count":16885886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ocaml","web"],"created_at":"2024-08-01T13:02:27.492Z","updated_at":"2024-10-28T10:52:26.092Z","avatar_url":"https://github.com/dannywillems.png","language":null,"funding_links":[],"categories":["Misc"],"sub_categories":[],"readme":"Ocaml for web programming\n=========================\n\nThis repository aims to reference existing web programming tools, frameworks and\nlibraries in OCaml. There are also a list of todo.\n\n* [Ocaml for web programming](#ocaml-for-web-programming)\n* [Bindings](#bindings)\n  * [Javascript libraries/frameworks](#javascript-librariesframeworks)\n  * [Mobile development](#mobile-development)\n* [Running OCaml program in browsers](#running-ocaml-program-in-browsers)\n* [\u003cem\u003ePure\u003c/em\u003e OCaml web frameworks/libraries](#pure-ocaml-web-frameworkslibraries)\n  * [Typed HTML/CSS](#typed-htmlcss)\n  * [Server and client side](#server-and-client-side)\n  * [Web servers](#web-servers)\n  * [Client side](#client-side)\n  * [Mobile development](#mobile-development-1)\n* [To-do](#to-do)\n  * [Typescript/Javascript](#typescriptjavascript)\n  * [HTML/CSS](#htmlcss)\n  * [Hybrid mobile programming](#hybrid-mobile-programming)\n  * [Tools](#tools)\n\n# Bindings\n\n## Javascript libraries/frameworks\n\n* Standard library\n  Binding to the javascript standard library\n  - [ocaml-js-stdlib](https://github.com/dannywillems/ocaml-js-stdlib) with\n    gen_js_api.\n\n* [JQuery](https://jquery.com/)\n  Jquery provides some objects and methods to improve the DOM manipulation and\n  event handling.\n  - Binding in js_of_ocaml: [ocaml-jquery](https://github.com/kitec/ocaml-jquery) (more\n    up to date, forked from https://github.com/gabriel-cardoso/ocaml-jquery)\n  - Binding with gen_js_api in [ocaml-js-stdlib](https://github.com/dannywillems/ocaml-js-stdlib).\n\n* [Nodejs](https://nodejs.org/en)\n  Instead of using javascript only in a web browser, Nodejs allows you to use\n  javascript on your system by providing a javascript interpreter running on\n  top of [Google V8 javascript engine](https://developers.google.com/v8/)\n  Nodejs has lots of module which give you the possibility to run, for\n  example, an http server.\n  - Binding in js_of_ocaml: [ocaml-nodejs](https://github.com/fxfactorial/ocaml-nodejs)\n\n* [D3](https://d3js.org/)\n  D3.js is a JavaScript library for manipulating documents based on data. D3\n  helps you bring data to life using HTML, SVG, and CSS. D3’s emphasis on web\n  standards gives you the full capabilities of modern browsers without tying\n  yourself to a proprietary framework, combining powerful visualization\n  components and a data-driven approach to DOM manipulation.\n  - Binding in js_of_ocaml: [ocaml-d3](https://github.com/seliopou/ocaml-d3) (can be\n    installed with opam install d3)\n\n* [extjs](https://www.sencha.com/products/extjs/#overview)\n  - Binding in js_of_ocaml: [ocaml-extjs](https://github.com/astrada/ocaml-extjs)\n\n* [reactjs](https://facebook.github.io/react/)\n  - Binding in js_of_ocaml: [reactjs_of_ocaml](https://github.com/AngryLawyer/reactjs_of_ocaml)\n\n* [electron](https://github.com/atom/electron)\n  - Binding in js_of_ocaml: [ocaml-electron](https://github.com/fxfactorial/ocaml-electron)\n\n* [Google Maps](https://developers.google.com/maps/documentation/javascript/3.exp/reference?hl=fr)\n  - Binding with gen_js_api: [ocaml-googlemaps](https://github.com/besport/ocaml-googlemaps)\n\n## Mobile development\n\n* [Cordova plugins](https://cordova.apache.org/)\n  Cordova allows you to develop hybrid mobile applications using web technologies. Through plugins, you can access to devices components.\n  - [Bindings to cordova plugins](https://github.com/dannywillems/ocaml-cordova-plugin-list) with js_of_ocaml and gen_js_api.\n\n# Running OCaml program in browsers\n\nOCaml to javascript compilers:\n* [Ocsigen js_of_ocaml](https://ocsigen.org/js_of_ocaml)\n* [Bloomberg Bucklescript](https://github.com/bloomberg/bucklescript)\n\nTools to simplify bindings:\n* [gen_js_api](https://github.com/lexifi/gen_js_api)\n\n# *Pure* OCaml web frameworks/libraries\n\n## Typed HTML/CSS\n\n* [Ocsigen Tyxml](http://ocsigen.org/tyxml/): Library to build statically correct Html and Svg\n\n## Server and client side\n\n* [Ocsigen Eliom](http://ocsigen.org/eliom/):\n  - Server side page generation (and continuation based Web programming)\n  - Language extension for client-server Web application in OCaml\n  - Session manipulation\n  - Reactive Web pages\n  - Mobile applications in OCaml with Apache Cordova\n\n* [Ocsigen Toolkit](http://ocsigen.org/ocsigen-widgets/): Native OCaml widgets for client or client-server Web applications\n\n## Web servers\n\n* [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.\n\n## Client side\n\n## Mobile development\n\n* [Ocsigen Eliom](http://ocsigen.org/eliom/):\n  - Server side page generation (and continuation based Web programming)\n  - Language extension for client-server Web application in OCaml\n  - Session manipulation\n  - Reactive Web pages\n  - Mobile applications in OCaml with Apache Cordova\n\n* [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)\n\n# To-do\n\n## Typescript/Javascript\n\n* [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.\n\n* Bindings to popular javascript frameworks\n  - Angularjs\n  - Backbone.js\n  - Ember.js\n  - JQueryUI\n  - Babylon\n  - Karma\n  - Phantom JS\n\n* 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.\n\n## HTML/CSS\n\n* Think about typed CSS with OCaml.\n\n* Create typed bindings to CSS frameworks such as [bootstrap](http://getbootstrap.com/), [MaterializeCSS](http://materializecss.com/).\n\n* Functions to create style HTML elements such as buttons, containers, rows, etc using popular CSS libraries --\u003e Simplify HTML5 pages builds. We can imagine to have a module for each popular CSS libraries. For example, we can have with bootstrap\n```OCaml\nmodule B = Bootstrap_css\nB.create_container (B.create_row (B.create_col 4 ~lg:3 ~md:6 ~xs:12))\n```\ngiving as output\n```HTML\n\u003cdiv class=\"container\"\u003e\n  \u003cdiv class=\"row\"\u003e\n    \u003cdiv class=\"col-lg-3 col-md-6 col-xs-12\"\u003e\u003c/div\u003e\n    \u003cdiv class=\"col-lg-3 col-md-6 col-xs-12\"\u003e\u003c/div\u003e\n    \u003cdiv class=\"col-lg-3 col-md-6 col-xs-12\"\u003e\u003c/div\u003e\n    \u003cdiv class=\"col-lg-3 col-md-6 col-xs-12\"\u003e\u003c/div\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\nUse Tyxml ?\n\n## Hybrid mobile programming\n\n* [Ionic](https://ionic.io/) allows to develop hybrid mobile applications with a native apparence using web technologies. There are [ionic plugins](https://market.ionic.io/plugins) written in Javascript (different than cordova plugins).\n\n* [NativeScript](https://www.nativescript.org/): build truly mobile applications\n  with web technologies.\n\n## Tools\n\n* Integration with popular text editors/IDE.\n\n* A package manager such as [npm](https://www.npmjs.com/).\n\n* Task runners such as Gulp/Grunt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannywillems%2Focaml-for-web-programming","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdannywillems%2Focaml-for-web-programming","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannywillems%2Focaml-for-web-programming/lists"}