Enterprise grade. Half the code.

Finally a Java MVC framework that's fun to use, but isn't a toy.

Find Out More

Latest News

fetching news ...

Introducing Act.Framework

A Full Stack MVC Framework.

Applications start in seconds. No servlets or containers.

Developer Joy and Enterprise Features.

Clean and expressive.
Hot reload everywhere.
Faster than Spring boot.

Superbly RESTful. Powerful Rendering.

Natively RESTful or render.
Use Rythm, Velocity, FreeMarker, Thymeleaf, Mustache or Beetl.

Uncompromising Security.

Security aware means built-in enterprise-grade protection by default.

More Act.Framework Features

An Act.Framework application has the main method and start in seconds.

Act is not a servlet framework and Act application does not run in a Servlet container

Act.Framework supports hot-reload applications and it takes less than a second to reload your normal sized app (in our 10K LOC app, takes around 500ms to reload app). Hot reload happens when your Java source code, template code or configuration files has been changed

While providing great developer experience, performance is still a very important aspect of Act.Framework. According to this benchmark project, Act.Framework is 20 times faster than Spring boot in simple cases.

Fully JSR 330 support and even more:

  • Inject parameter for methods including action handler, mail sender, job method etc
  • Inject collections
  • Customizable injection tag, e.g. @LoginUser

Supports the trends of separate front end architecture via:

  • RESTful support
  • Built-in CORS support
  • Session/Header mapping

Act.Framework is a security aware framework, it builds uncompromised security support into your application

  • Session cookie is secure and http only, payload is signed and encrypted (optionally)
  • Enable CSRF prevention with just one configuration item
  • XSS prevention: Rythm engine escape variable output by default
  • Implementing your authentication/authorisation/accounting framework using AAA plugin

Annotation is one of the tool Act.Framework used to increase expressiveness. However we do not appreciate crazy annotation stacked code. Instead we make the code express intention in a natural way, and save the use of annotations whenever possible.

For example, for the following SpringMVC code:

@RequestMapping(value="/user/{userId}/invoices", method = RequestMethod.GET)
public List<Invoice> listUsersInvoices(
@PathVariable("userId") int user,
@RequestParam(value = "date", required = false) Date dateOrNull) {

The corresponding Act.Framework app code is:

public List<Invoice> listUsersInvoices(int user, Date date) {

Act.Framework supports the concept of profile which allows you to organize your configurations in different environment (defined by profile) easily. Take a look at the following configurations from one of our real project:

├── conf
│   ├── common
│   │   ├── app.properties
│   │   ├── db.properties
│   │   ├── mail.properties
│   │   ├── payment.properties
│   │   └── social.properties
│   ├── local-no-ui
│   │   ├── app.properties
│   │   ├── db.properties
│   │   └── port.properties
│   ├── local-sit
│   │   └── app.properties
│   ├── local-ui
│   │   ├── app.properties
│   │   └── db.properties
│   ├── sit
│   │   ├── app.properties
│   │   └── db.properties
│   └── uat

Suppose on your UAT server, you start the application with JVM option -Dprofile=uat, Act.Framework will load the configuration in the following sequence:

  1. Read all .properties files in the /resources/conf/common dir
  2. Read all .properties files in the /resources/conf/uat dir

This way Act.Framework use the configuration items defined in uat profile to overwrite the same items defined in common profile. The common items that are not overwritten still effective.

Act.Framework provides a decent set of database access APIs via act.db.Dao and relevant interfaces.

  • act-ebean plugin implemented the Act.Framework database layer based on the fast and simple ebean ORM library, which works with most SQL database solutions on the market
  • act-morphia plugin implemented the Act.Framework database layer based on the official Morphia document mapper for MongoDB

It is not unusual for today's application to play with multiple and even heterogeneous database storage. Act.Framework has already built-in the support for that. For example:

# the database configuration
# db1 configurations
// -- the model that require transaction go SQL
@Entity(name = "va")
public class VirtualAccount{
private Long id;
@Index(unique = true)
public String ownerId;
// balance in cents
public int balance;
// -- the model does not require transaction go MongoDB
public static class Transaction extends MorphiaModel {
* Stores from account owner ID
public String creditAcc;
* Stores to account owner ID
public String debitAcc;
* Stores the transaction amount
public int amount;

The above code shows how to configure two databases with one for SQL database and the other one for MongoDB. Once you have two database configured, it is super easy to map your model class to database via the @DB annotation.

For more traditional application design that requires server-side page rendering, Act.Framework by default uses the Rythm Template Engine. And it supports using your favorite template engine including:

Act.Framework support using multiple template engines in the same projects.

Act.Framework provides rich feature set that covers most of your web application development needs:

Get Started. Fast.

Act.Framework sample projects are driven by Maven. You can choose from the following sample project skeletons to start your own Act.Framework application.

Once you've downloaded a sample skeleton, import it into your IDE, let Maven resolve dependencies, and just rename your package and entry class.

Then you're good to rock and roll!

  • Demonstrate how easy it is to implement captcha in ActFramework
  • A simple chat room application shows how to use websocket in ActFramework
  • Demonstrate how to do configuration in ActFramework
  • Demonstrate how to implement CSRF protection in ActFramework
  • Demonstrate how to send email in ActFramework
  • Demonstrate how to use event in ActFramework
  • Demonstrate how to generate csv/excel report in ActFramework
  • A helloworld application
  • Demonstrate how to do i18n and localization in ActFramework
  • Demonstrate how to do dependency injection in ActFramework
  • Demonstrate how to schedule jobs in ActFramework plus using websocket to monitor Job status
  • Demonstrate how to do async job in CLI command in ActFramework
  • Demonstrate how to load static resources (JSON/Yaml/properties) into application
  • A simple RESTful CRUD service
  • Demonstrate automate test
  • A simple TODO application using beetlsql in ActFramework
  • A simple TODO application using ebean in ActFramework
  • A simple TODO application using eclipselink in ActFramework
  • A simple TODO application using hibernate in ActFramework
  • A simple TODO application using morphia/mongodb in ActFramework
  • Demonstrate how to do transactions in actframework with ebean
  • Demonstrate how to do transactions in actframework with eclipselink
  • Demonstrate how to do transactions in actframework with hibernate

Tutorials and Videos

Creating a helloworld ActFramework app with Eclipse from scratch
Create a TODO application (Morphia/Mongo version)
Working with configuration
Adding qrcode and barcode generation to Helloworld project
Three routing mechanims in act and how to use them
Introducing to CLI service and creating application commander
Creating RESTful service with Actframework
The powerful adaptive record in Actframework

Why Act.Framework?

Back at the end of 2009, I had just finished a project in CakePHP as an individual consultant. I felt pretty frustrated with PHP and decided to get back to the Java world. I was not happy with Struts/w Spring and was hunting for other Java MVC frameworks. PlayFramework came into my sight and I fell in love with it.

I loved PlayFramework v1.x because it was simple, clear and expressive. It brought us a completely different experience in web development with Java. However I don't totally agree with where Play 2.X is heading, and it looks like I am not the only person with the concern as per this open letter to Play Framework Developers.

I had thought of rolling out something that could follow the road paved by Play 1.x; something that is simple, clear, expressive and developer friendly. About one and half years after that article was written, I decided I could start the project seriously. As a result, here is ACT.framework - a framework that I can call "the Final Fantasy of Java web development"

In short, we need a modern, sleek Java MVC framework which we don't get from Spring MVC, Sprint Boot, PlayFramework, SparkFramework or any others on the market.


   Thinking Studio is the company that backed Act.Framework. Thanks for allowing me to work on this project and allow me to pilot Act.Framework on our projects since the end of 2015.

   JetBrains grants me the open source license to use the great product IntelliJ IDEA. Every line of code of Act.Framework is written with IntellJ IDEA, and really love it!