Skip to content

dannywillems/ocaml-for-web-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 

Repository files navigation

Ocaml for web programming

This repository aims to reference existing web programming tools, frameworks and libraries in OCaml. There are also a list of todo.

Bindings

Javascript libraries/frameworks

  • Standard library Binding to the javascript standard library

  • JQuery Jquery provides some objects and methods to improve the DOM manipulation and event handling.

  • 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.

  • 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)
  • extjs

  • reactjs

  • electron

  • Google Maps

Mobile development

  • Cordova plugins Cordova allows you to develop hybrid mobile applications using web technologies. Through plugins, you can access to devices components.

Running OCaml program in browsers

OCaml to javascript compilers:

Tools to simplify bindings:

Pure OCaml web frameworks/libraries

Typed HTML/CSS

  • Ocsigen Tyxml: Library to build statically correct Html and Svg

Server and client side

  • Ocsigen Eliom:

    • 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

Web servers

  • 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.

Client side

Mobile development

  • Ocsigen Eliom:

    • 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)

To-do

Typescript/Javascript

  • 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.

HTML/CSS

  • 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 ?

Hybrid mobile programming

  • 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.

Tools

  • Integration with popular text editors/IDE.

  • A package manager such as npm.

  • Task runners such as Gulp/Grunt

About

OCaml for web programming

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published