Example programs and applications

We're collecting examples here.

Examples of client-side Ceylon

We have three small demo application which illustrate the use of Ceylon in a web browser:

Furthermore:

  • The Ceylon Services Example demonstrates the use of Ceylon service providers, an abstraction of the Java service loader facility, on the JavaScript platform.

Examples of server-side Ceylon

Ceylon is a fantastic language for writing microservices:

  • Wildfly Swarm and Ceylon demonstrates the use of Ceylon to write a Java EE-based microservice for Swarm, using JPA, CDI, and JAX-RS, and of the ceylon swarm command to package it as a "fat" jar. Alternatively, you can use ceylon war to package it as a web archive and run it on a Java EE application server!
  • Spring Boot and Ceylon demonstrates the use of Ceylon with Spring Boot and Spring Data.
  • The Vert.x examples include several samples showing how to use Ceylon in Vert.x.
  • Spark with Ceylon demonstrates how to use the Spark web framework in Ceylon.
  • The gyokuro demos show off the gyokuro web framework, which is written in Ceylon.

Documentation for Ceylon and Vert.x can be found at the Vert.x site.

Examples of full-stack applications

  • The Ceylon Web IDE is a great example of how to build a modern web application using Ceylon, making use of Ceylon's HTTP and JSON APIs, and interoperation with native Java libraries. The example even supports deployment to the OpenShift cloud platform.
  • The Ceylon DDDSample demonstrates the use of Ceylon to write a complete Java EE application, making use of JPA, CDI, EJB, JAX-RS, JMS, JSF, and Facelets.

Simple examples

Learn how to use Ceylon with these Java frameworks:

OSGi examples

The Ceylon OSGi examples demonstrate how to use Ceylon modules as OSGi bundles, and how to:

  • run the Ceylon HTTP server inside an OSGi container,
  • call standard OSGi services,
  • integrate with Pax Web in order to produce a web application packaged as a single Ceylon module, or
  • write an Eclipse plugin.

Examples of libraries

The Ceylon SDK includes plenty of good examples of Ceylon code, including:

Example ceylon plugins

A plugin for the ceylon command is a great way to improve your productivity.

Examples of real life warts-'n-all production code

The Ceylon IDE Common and Ceylon IDE for IntelliJ projects sure aren't beautiful polished example code, but they do show how cleanly Ceylon interoperates with hairy, real-world, legacy Java APIs.

The Ceylon plugin for VS Code exhibits a whole completely different approach to implementing tooling in Ceylon.

The Ceylon Dart project shows that it's possible to write a whole backend for the Ceylon compiler in Ceylon.