Question

I recently started looking into the idea of using a web application framework that provides a more unified way of handling client-side and server-side programming, and I discovered a project called Ocsigen. Ocsigen seems very similar to what I'm looking for, but there are a few things about it that I find confusing, such as its use of a functional programming language rather than an imperative one. Just out of curiosity, are there any other frameworks similar to Ocsigen? (Perhaps one that uses a more traditional, imperative programming language.)

Was it helpful?

Solution

... a web application framework that provides a more unified way of handling client-side and server-side programming

At the extreme, what you are looking for are 'tierless web frameworks' or 'multitier web frameworks' or 'isomorphic web frameworks' (i.e. frameworks that completely blur the line between server-side code and client-side code).

Completely tierless web frameworks that handle both the server side and the client side (i.e. you never have to write a single line of JavaScript for the entire web app):

If you prefer JavaScript, see: Tierless web framework with Javascript?

In addition, you may be interested in these (most of them are research projects with little uptake):

Alternative abstractions

As you may have noticed, tierless frameworks like Ocsigen are not popular, and not well supported. Depending on your use cases, you might want to look into better-supported abstractions instead:

Component-based web frameworks

Component-based frameworks are usually contrasted with conventional action (request) based frameworks. With these component based frameworks, pages are built out of standalone components (e.g. date picker component, video player component, login form component, etc.), and these components can encapsulate Javascript. That way, when actually using the components, you don't have to think about Javascript.

In component based frameworks, the lines between client and server are not necessarily blurred, but I mention them here because they may be good choice if you are looking to abstract away the Javascript.

Component based frameworks for Java have been around for nearly two decades, and have seen a reasonable amount of uptake. Among them are:

Client-side frameworks

Listed below are non-JavaScript frameworks/tools for the client-side only. These open the door for writing the entire web app using one language only (although the integration between server and client side will not be as good as when using completely tierless frameworks):

  • GWT (Java) - Google uses this.
  • Miso (Haskell)
  • ReasonML (OCaml with Reason syntax)
  • Plus anything that compiles a non-JavaScript language into JavaScript.

OTHER TIPS

You should look at opa, it is also a functionnal language but it uses a more traditional syntax.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top