Introduction to Moonshine


Moonshine is a Java application framework. It integrates many technologies and libraries needed for modern application development. Whether you are developing console program, web application or enterprise-ready backend service, modular architecture of Moonshine allows you to build a solution that matches the complexity of your problem.


Moonshine is based around the notion of a Service. Service is a distinct component implementing a certain functionality. Services can then be instantiated and configured at runtime using a flexible configuration file. Moonshine provides a lot of ready to use services and also forces you to modularize your application in the same way.

Moonshine, out of the box, provides services to start and configure transactions, database access with migrations, persistence using Hibernate and Spring Data, two HTTP engines: Jetty and Tomcat, servlets, websockets and REST services. Additionally Moonshine contains services which allow to profile your application and collect metrics which can be retrieved directly using JMX or through the provided REST wrapper or web console.


Moonshine is built from the ground up with the focus on testability and test-driven development. Support for JUnit allows your tests to be executed inside a Moonshine container. Network services were carefully written to always start on a random port, so you can safely execute your tests in parallel. There is also support for mocking and testing web applications.

Next: Moonshine Container Basics.