For my demexp server, I'm considering the development of a web interface, accessible from a simple web browser. I have standard requirements (html forms) as well as "advanced" ones (would like to support AJAX-like things, navigation in tree data structures, etc.). Which development frameworks are available to do such things in OCaml? I'm looking for frameworks under a license compatible with GNU GPL.
Right now, I know about: - WDialog - XCaml
For low level stuff (basic CGI interface), there is also OCamlNet.
I've made some experiments with WDialog but I'm not entirely convinced by its approach of separating interface description from event handling code. Moreover it lacks some features that would be useful for us : i18n support (even if, thanks to Gerd, a preliminary code is available in CVS tree), advanced widgets (tree structures), AJAX support, etc.
What other people are using to do web stuff? Is everybody using PHP? ;-)
Any recommandation on building such complex web interface with available OCaml software?
Best regards, david
PS : My current demexp server is an autonomous Unix daemon, written in OCaml, accessible through ONC RPC calls over a TCP socket. Until know, I have made a simple CGI that access the demexp server. But I'm considering merging the server part with the web part. Has somebody some knowledge on the design of web architecture and recommendation or pointer to relevant litterature?
-- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.com
2006/6/25, Till Varoquaux <till.varoqu...@gmail.com>:
> There is an ongoing project (which I'm part of) to make a web > framework for cduce. You can check it out here: > http://reglisse.ens.fr/ecduce/ > We (me for the ecduce part, the cduce team for cduce) would be more > than happy to help you out.
Thank you for the pointer, even if, right now, I have some issue to understand how an XML toolkit could help me design a dynamic web site.
BTW, the ECDuce pages lack a little description on the aim of the project.
> P.S. IMHO, although Cduce is a little rough around the edges, going > back to php afterwards is about as painfull as moving back from Caml > to C...
I'm already using CDuce to read/write XML files in my server. So I'm suppose to already know it. ;-)
> P.P.S as for the ajax and toolkit abstraction you might want to have a > look at openlaszlo http://www.openlaszlo.org/. An integration with an > xml oriented should be quite easy to do...
Well... I've looked at OpenLazlo and I'm quite skeptical on such a framework. Non-withstanding that OpenLazlo is aimed at Flash environment and that DHTML support is apparently still under development, I'm not really fond of technology targetting only Javascript-only web browser. I would like to develop my web site for both new and old browsers. Moreover, OpenLazlo servers are in Java, and using XML has a programming language seems a bit silly to me.
Regarding my own (quite foggy) requirements, I would like to develop a web site using a efficient language that I like (OCaml), but without re-inventing the wheel, thus my search for an OCaml friendly web framework. Until now, I've found technologies for developing such a framework, but no real read-to-use framework (except maybe WDialog which lacks support beyond basic HTML) like those[1] that can be found for other languages (Java, PHP and Python).
Behold, here comes a rutheless attempt of self promotion.... You could consider programming in cduce. It integrates really nicely with caml and has an amazing typing system (using xml elements as first class values). There is an ongoing project (which I'm part of) to make a web framework for cduce. You can check it out here: http://reglisse.ens.fr/ecduce/ We (me for the ecduce part, the cduce team for cduce) would be more than happy to help you out.
Till P.S. IMHO, although Cduce is a little rough around the edges, going back to php afterwards is about as painfull as moving back from Caml to C... P.P.S as for the ajax and toolkit abstraction you might want to have a look at openlaszlo http://www.openlaszlo.org/. An integration with an xml oriented should be quite easy to do...
David MENTRE wrote: > For my demexp server, I'm considering the development of a web > interface, accessible from a simple web browser. I have standard > requirements (html forms) as well as "advanced" ones (would like to > support AJAX-like things, navigation in tree data structures, etc.). > Which development frameworks are available to do such things in OCaml? > I'm looking for frameworks under a license compatible with GNU GPL.
> Right now, I know about: > - WDialog > - XCaml
There is also Ocsigen ( http://www.ocsigen.org/ ) which is a nice extension of OCaml (i.e. modules + camlp4) to develop websites in a functional style.
Another attempt of self promotion: Ex Nunc (http://ex-nunc.sourceforge.net) is an application framework written in pure OCaml that provides strongly-typed page parameters, automatic session and form validation. Although a live demo is available here:
the framework is still young and not usable for commercial purposes and the templates page compiler is still under construction. In any case our plan is to complete the core project features and to arrive to a usable release of Ex Nunc in November 2006. Our first goal is to obtain a "better PHP", usable in everyday jobs; in the future interesting features like strongly typed embedded SQL and a better application server engine (based on the equeue library) are planned.
Since an official announcement is probably a bit premature in this moment, if you have any question about Ex Nunc or, better, if you want to join the development team or to subscribe the "free human beings from PHP slavery" club, contact me.
Best regards,
Paolo Donadeo
-- Paolo Donadeo, Senior Software Engineer Studio Associato 4Sigma Email: p.dona...@gmail.com ~ ~ :wq
> Ex Nunc > (http://ex-nunc.sourceforge.net) is an application framework written > in pure OCaml that provides strongly-typed page parameters, automatic > session and form validation. Although a live demo is available here:
Quite interesting.
> the framework is still young and not usable for commercial purposes > and the templates page compiler is still under construction.
I always fear "templates page compiler", because most of the time people tend to re-invent their own language rather than using existing one, like OCaml. Is OCaml used as template language for Ex-nunc?
Could you show us the source code of the demo page?
> in the future > interesting features like strongly typed embedded SQL and a better
Do you plan to use existing code on SQL frameworks?
> application server engine (based on the equeue library) are planned. > moment, if you have any question about Ex Nunc or, better, if you want > to join the development team or to subscribe the "free human beings > from PHP slavery" club, contact me.
I don't want to join the development team but I'm certainly interested to see if Ex-nunc fits my needs.
> There is also Ocsigen ( http://www.ocsigen.org/ ) which is a nice > extension of OCaml (i.e. modules + camlp4) to develop websites in a > functional style.
I have been asked for more information about Ocsigen. Ocsigen is a research project aiming at finding a more robust way to program Web sites, using functional programming (continuations) and strong typing. It is not a new language but a set of modules for Objective Caml and a web server.
Main features: - Valid xhtml generation through static typing - Typing of Web interaction (links, forms...) - Automatic session handling - Javascript generation (AJAX) (work in progress) - typed database interaction (work in progress)
It allows to program web sites in a very concise and modular way, and makes the maintenance of large web sites much easier compared to usual Web programming tools.
Ocsigen was born in 2004 (even though the idea is older) and is now usable (see for example www.ocsigen.org). The syntax is not completely fixed yet (as we are experimenting with a lot of new ideas) but the development is very active and we hope to publish version 1 before the end of the year.
Vincent Balat
PS: For other research projects in the same style, see for example WebSiCoLa, Links, Hop, or Wash/CGI
Thank you for the pointer. It seems close to WDialog with the additional benefit that (i) embedded language is OCaml and (ii) the format of .xnunc files (templates?) are XHTML + <xnc> tags.
This raises additional questions: - is i18n handled, on a per page or per context basis (one user uses French pages while another one English ones)? - is generated CGI compiled to native code?