All Projects → actframework → Actframework

actframework / Actframework

Licence: apache-2.0
An easy to use Java MVC server stack

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Actframework

Aah
A secure, flexible, rapid Go web framework
Stars: ✭ 647 (-6.23%)
Mutual labels:  web-framework, webframework, mvc-framework, hot-reload
Cakephp
CakePHP: The Rapid Development Framework for PHP - Official Repository
Stars: ✭ 8,453 (+1125.07%)
Mutual labels:  web-framework, mvc-framework, mvc
Rapidoid
Rapidoid - Extremely Fast, Simple and Powerful Java Web Framework and HTTP Server!
Stars: ✭ 1,571 (+127.68%)
Mutual labels:  restful, web-framework, webframework
blockbase
Lightweight MVC Framework for Node.js
Stars: ✭ 32 (-95.36%)
Mutual labels:  mvc, mvc-framework
leafMVC
MVC "Framework" created from Leaf PHP Framework
Stars: ✭ 25 (-96.38%)
Mutual labels:  mvc, mvc-framework
Bingo-Framework
MVC framework for PHP
Stars: ✭ 15 (-97.83%)
Mutual labels:  mvc, mvc-framework
relax
Relax is a set of tools for modeling, documenting and testing RESTFul APIs
Stars: ✭ 12 (-98.26%)
Mutual labels:  mvc, restful
Jackblog Api Koa
Jackblog API Server Koa 版, 个人博客系统, 基于RESTful架构, 使用Node.js, Koa, MongoDB, Redis, Token Auth, 七牛云存储等.
Stars: ✭ 312 (-54.78%)
Mutual labels:  restful, mongodb
miniPHP
A small, simple PHP MVC framework skeleton that encapsulates a lot of features surrounded with powerful security layers.
Stars: ✭ 147 (-78.7%)
Mutual labels:  mvc, mvc-framework
Joy
A full stack web framework written in janet
Stars: ✭ 327 (-52.61%)
Mutual labels:  web-framework, webframework
Iris
The fastest HTTP/2 Go Web Framework. AWS Lambda, gRPC, MVC, Unique Router, Websockets, Sessions, Test suite, Dependency Injection and more. A true successor of expressjs and laravel | 谢谢 https://github.com/kataras/iris/issues/1329 |
Stars: ✭ 21,587 (+3028.55%)
Mutual labels:  web-framework, mvc
Blade
🚀 Lightning fast and elegant mvc framework for Java8
Stars: ✭ 5,569 (+707.1%)
Mutual labels:  restful, mvc-framework
W
Framework pédagogique de la WebForce3
Stars: ✭ 10 (-98.55%)
Mutual labels:  mvc, mvc-framework
laminas-mvc
Laminas's event-driven MVC layer, including MVC Applications, Controllers, and Plugins
Stars: ✭ 90 (-86.96%)
Mutual labels:  mvc, mvc-framework
shivneri
Component based MVC web framework based on fort architecture targeting good code structures, modularity & performance.
Stars: ✭ 21 (-96.96%)
Mutual labels:  web-framework, mvc-framework
Hunt Framework
A Web framework for D Programming Language. Full-stack high-performance.
Stars: ✭ 256 (-62.9%)
Mutual labels:  web-framework, mvc
Westore
更好的小程序项目架构
Stars: ✭ 3,897 (+464.78%)
Mutual labels:  mongodb, mvc
Faqguru
🎒 🚀 🎉 A list of interview questions. This repository is everything you need to prepare for your technical interview.
Stars: ✭ 4,653 (+574.35%)
Mutual labels:  mongodb, mvc
aquiver
🚀 The aquifer is a java web framework based on Java8 and netty
Stars: ✭ 38 (-94.49%)
Mutual labels:  mvc, mvc-framework
mojo.js
🦄 The Mojolicious real-time web framework for Node.js
Stars: ✭ 145 (-78.99%)
Mutual labels:  mvc, web-framework

ACT Framework

APL v2 Maven Central Build Status Javadocs Join the chat at https://gitter.im/actframework/actframework Get Support on StackOverflow Feature Requests

Install

Add act-starter-parent into into your pom.xml file

  <parent>
    <groupId>org.actframework</groupId>
    <artifactId>act-starter-parent</artifactId>
    <version>1.9.1.0</version>
  </parent>

Or use maven archetype to start a new project:

mvn archetype:generate -B \
    -DgroupId=com.mycom.helloworld \
    -DartifactId=helloworld \
    -DarchetypeGroupId=org.actframework \
    -DarchetypeArtifactId=archetype-quickstart \
    -DarchetypeVersion=1.9.1.0

tips don't forget replace the groupId, artifactId and appName in the above script, or you can use interactive mode to generate your project:

mvn archetype:generate -DarchetypeGroupId=org.actframework -DarchetypeArtifactId=archetype-quickstart -DarchetypeVersion=1.9.1.0

Note There are more ActFramework application archetypes for use. Please get them here.

Features

  • A full stack MVC framework

    • Actframework is NOT a servlet framework. Act app does not run in a servlet container. Instead it run as an independent Java application and it starts in seconds
  • Unbeatable development experience w/ great performance

    • Never restart your app when you are developing. Act's dev mode provides hot reloading feature makes it the dream of every Java web app developer. Check out this 3 mins video and feel it!
    • According to TechEmpower Framework Benchmark Act beats most full stack Java web framework on the market. In some cases Act can be over 10 times faster than Springboot
  • Fully JSR330 Dependency Injection support

    • ActFramework's DI support is built on top of Genie, a lightweight yet fast JSR330 implementation.
    • Benefit from Act's powerful class scan feature, it does not require the user to create injector from modules (as the usually way you use Guice). Declare your module and your binding is automatically registered
  • Superb SPA/Mobile app support

  • Uncompromising Security

  • Annotation aware but not annotation stack

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

      For example, for the following SpringMVC code:

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

      The corresponding ActFramework app code is:

      @GetAction("/user/{user}/invoices")
      public List listUsersInvoices(int user, Date date) {
        ...
      }
      
  • Multi-environment configuration

    • ActFramework 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:

      resources
        ├── 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, ActFramework 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 ActFramework 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.

  • Simple yet powerful database support

  • Powerful view architecture with multiple render engine support

  • An unbelievable automate testing framework that never presented in any other MVC frameworks

  • Commonly used tools

Sample code

A HelloWorld app

package demo.helloworld;

import act.Act;
import act.Version;
import org.osgl.mvc.annotation.GetAction;

public class HelloWorldApp {

    @GetAction
    public String sayHelloTo(@DefaultValue("World") String who) {
        return "Hello " + who + "!";
    }

    public static void main(String[] args) throws Exception {
        Act.start();
    }

}

See this 7 mins video on how to create HelloWorld in Eclipse from scratch. or for users without youtube access

A full RESTful service

package demo.rest;

import act.controller.Controller;
import act.db.morphia.MorphiaAdaptiveRecord;
import act.db.morphia.MorphiaDao;
import org.mongodb.morphia.annotations.Entity;
import org.osgl.mvc.annotation.*;

import java.util.Map;

import static act.controller.Controller.Util.notFoundIfNull;

@Entity("user")
public class User extends MorphiaAdaptiveRecord<User> {

    @UrlContext("user")
    public static class Service extends MorphiaDao<User> {

        @PostAction
        public User create(User user) {
            return save(user);
        }

        @GetAction
        public Iterable<User> list() {
            return findAll();
        }

        @GetAction("{id}")
        public User show(@DbBind("id") User user) {
            return user;
        }

        @PutAction("{id}")
        public User update(@DbBind("id") @NotNull User user, Map<String, Object> data) {
            user.mergeValues(data);
            return save(user);
        }

        @DeleteAction("{id}")
        public void delete(String id) {
            deleteById(id);
        }
    }

    public static void main(String[] args) throws Exception {
        Act.start();
    }

}

See this 1 hour video on RESTful support or for user without youtube access

See this 7 mins video to understand more about AdaptiveRecord or for user without youtube access

Background

I love PlayFramework v1.x because it is 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 for, and it looks like I am not the only person with the concern as per this open letter to Play Framework Developers.

I have thought of rolling out something that could follow the road paved by Play 1.x, something that is simple, clear, expressive and Java (specifically) developer friendly. About one and half year after that I decide I could start the project seriously, and now another one and half year passed by, I've got this ACT framework in a relatively good shape.

Happy coding!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].