Ceylon hitting 1.0 caught my attention lately. The most interesting feature is that it can be compiled for both the JVM and Javascript engines (node.js, browsers) so it makes code sharing possible from the beginning between the server backend and web application running in the browser.
I've started looking up the documentation for details how to create a WAR deployable application with Ceylon where i have some REST endpoints serving stuff to the browser side. I was not expecting Spring WebMVC support although this would be my final goal. For my surprise i didn't find anything useful in this topic. Is there any recommendations how to use Ceylon when i try to target a Servlet engine like Jetty or Tomcat the way i've described?
Right now i'm doing the following in a Java application:
A similar thing would be great where the client code is transposed from Ceylon code aswell. As i see Ceylon uses it's very own project layout and build system although i would be more happy to use Maven or Gradle to not steer away too much from existing projects.
Now that the language and its compilers have hit 1.0, we're able to shift some of our attention to development of things like web frameworks. Right now, Ceylon doesn't have a finished web framework.
What it does have is:
ceylon.net
. This makes it really easy to create a little web server, especially in conjunction with ceylon.html
for rendering HTML pages.I understand that this is not a full solution to your question of how can you run Ceylon on a traditional servlet engine. The truth is that you actually can take a compiled Ceylon module archive, embed it in a .war
and use it inside Tomcat or Jetty or JBoss or whatever. A .car
is, after all, just a .jar
with some extra metadata. The problem with that is that you will lose the advantages of Ceylon's module runtime that you usually have when you use ceylon run
. You'll need to:
.war
, and If you can live with that, then, go for it. It will work. But from my point of view the vision we have is to get away from the legacy servlet engines and run something like Undertow (ceylon.net
) or vert.x on top of the module runtime. Remember that this "module runtime" we're talking about is anyway just JBoss Modules, the tiny core of JBoss itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With