An Intuitive, Lightweight, High Performance Full Stack Java Web Framework.

Overview

Maven Central Travis Build Status

mangoo I/O

mangoo I/O is a Modern, Intuitive, Lightweight, High Performance Full Stack Java Web Framework.

It is a classic MVC-Framework. The foundation of mangoo I/O is the high performant Undertow web server from JBoss. On top of that, standard, production ready Java libraries are used - no reinventing of the wheel, no magic whatsoever. Constantly checked against SonarQube with a rule set of more than 1200 checks. Additionally each build is checked against Loader.io to ensure, that code changes do not decrease the framework performance.

mangoo I/O focuses on having a developer friendly, fluent and easy to understand web framework with a small learning curve for the Java ecosystem.

Key features

Here are some key features of mangoo I/O in a nutshell:

  • Intuitive convention-over-configuration
  • Highly scalable using a share-nothing stateless architecture
  • Hot-Compiling development mode for high productivity
  • Straightforward persistence integration
  • Easy to use template engine
  • Super minimal use of Annotations
  • Dependency Injection
  • Deploy as FatJAR or ThinJAR
  • Simplified Caching
  • Build-in asynchronous email handling
  • Support for Web Sockets and Server-Sent Events
  • Simple and self-explaining form handling and validation
  • Plain scheduling for recurring tasks
  • Build-in authentication and authorization
  • Programmatically routing configuration
  • Easy handling of JSON in- and output
  • Simple global or per request filters
  • Strong cryptography and enforced security
  • Build-in EventBus for asynchronous tasks
  • Administrative interface
  • Supports CORS
  • Build-in asset minification
  • Flexible testing tools
  • Simple Deployment and CI-Integration
  • i18N Internationalization
  • And many more...

Libraries

Here are some used libraries and their purpose in mangoo I/O.

By the numbers

  • 1.233 Sonar rules
  • 8.959 Lines of code
  • 2.843 Commits
  • 549 Unit tests
  • 5+ years development maturity
  • 294 cups of coffee (estimated)

Resources

Homepage
https://github.com/svenkubiak/mangooio

Documentation
https://github.com/svenkubiak/mangooio/wiki

Changelog
https://github.com/svenkubiak/mangooio/wiki/Changelog

Support
https://github.com/svenkubiak/mangooio/issues

or

https://stackoverflow.com - use the tag "mangooio"

Apidocs
http://svenkubiak.github.io/mangooio/

Twitter
https://twitter.com/mangoo_io

Contact
Security, Support, etc.: [email protected]

Comments
  • Request parameters not successfully passing to controller method

    Request parameters not successfully passing to controller method

    Extract from routes:

    - GET:    /{lang}/              ->    ApplicationController.index
    

    Extract from controller:

    public Response index(String lang, Request request) {
    
            Response response = Response.withOk();
    
            //lang == null
    
            return response;
        }
    

    If anyone knows about this one, input would be appreciated. If not I'll investigate it myself.

    no bug 
    opened by ghost 17
  • NPE when css files are modified

    NPE when css files are modified

    I am running locally using mangooio:run and when I make changes to css file minification task throws a null pointer exception and I have to start the server again.

    I edit the files using sublime text and keep eclipse in the background and refresh in eclipse to build the project.

    confirmed bug 
    opened by ezcamlive 15
  • How to run the application without maven?

    How to run the application without maven?

    How to run the application without maven? I have run the main class directly in eclipse but how do I package the jar for deployment and run without maven?

    question no bug 
    opened by ezcamlive 14
  • Missing form-data when multiple inputs of same name

    Missing form-data when multiple inputs of same name

    I'm using Taggle.js in order to enable users on a site to add tags to some content in a moderately visual way. It automatically creates inputs which all share the same name.

    Currently Mangoo.io is just providing me with one of the items - and they aren't seen when for example looping through the form params

    I can of course work around this temporarily, but it would be nice if it would return a list or something like this

    enhancement 
    opened by wildunne 11
  • Question on request handler chain

    Question on request handler chain

    Situation The way requests and responses are handles was recently refactored into a chain of multiple handlers. Namely; DispatcherHandler > LocaleHandler > InboundCookiesHandler > FormHandler > RequestHandler > OutboundCookiesHandler > ResponseHandler.

    Question I'm not sure if this is possible already, but it would be nice if there was a way to override certain handlers (or hook your own handler into the chain).

    This would be useful in case;

    • you wish to change existing behaviour.
    • you wish to add additional behaviour which generally apply to all requests or responses.

    Overriding I believe there is currently not a way to override a handler from within your project. An example would be to override inbound/outbound cookie handler because you like to use different kind of encryption or whatsoever. A possible way to configure the override from the project side would be to use bindings in the Module file. Furthermore, some methods would have to be made protected for allowing overriding. bind(OutboundCookiesHandler.class).to(MyOutboundCookiesHandler.class);

    enhancement 
    opened by MarkVink 11
  • Statically access Config does not decrypt values

    Statically access Config does not decrypt values

    While I was playing with "encrypted values", I tried to encrypt application.admin.username. Here is a relevant part of a config:

    dev:
        application:
            admin:
                enable: true
                username: cryptex[XnrslCZdmq9BW27skRxH5g==] #ilya - encrypted with a key from pwd.txt: sderokfoksm458349034rkwelkw34njk
                password: "$2a$06$OCwDt.egSbum93F9DGgOo.5Fqgl3Je.IrV1HeELOMTtGZ87YDJ2Xm" #12345 - JBcrypt
            masterkey: /Users/ilya/Work/Projects/todobackend-mangooio/pwd.txt # contains key: sderokfoksm458349034rkwelkw34njk
    

    Here I used encrypted username: cryptex[...]. After I had done that, I couldn`t login into administration page anymore. Admin page displayed nothing. The page was reloaded and login dialog appeared again. Logs were empty.

    confirmed bug 
    opened by ismagilov 10
  • template not reloading

    template not reloading

    I am running the app in dev mode and I see it on the console that it is infact dev mode.

    However the changes to my freemarker templates are not reloaded when I change them.

    no bug 
    opened by ezcamlive 10
  • How to add a directory for static files just like assets and fall back to that directory if a route is not available?

    How to add a directory for static files just like assets and fall back to that directory if a route is not available?

    Example: I have a directory dist under files and would like to serve files such as /index.html from there unless there is already a route mapped. -PATH /dist /

    question 
    opened by ezcamlive 8
  • Possible Json Serializer Multi Threading Issue

    Possible Json Serializer Multi Threading Issue

    I have been noticing for some time that sometimes, (1 in 50 requests) there is json response data corruption. I could never manage to figure out why so, it happens both in production and development mode.

    i suspect that Json Serailizer is not thread safe?

    Just managed to take screen shot when this happened

    image

    image

    you could see that 2 different requests ended up getting a same invalid json response

    [{"id":4,"slNo":1,"inventory":{"id":1,"entityStatus":"ACTIVE"},"qty":3.0,"taxGroup":{"id":1,"entityStatus":"ACTIVE"},"basicPrice":300.0}],"id":4,"createdAt":1492618774660,"modifiedAt":1492618774660,"createdBy":{"name":"Gowthaman Basuvaraj",{"name":"Gowthaman Basuvaraj","email":"[email protected]","id":1,"phone":"9844816712","tenantAdmin":"entityStatus":"ACTIVE"},true,"superAdmin":"entityStatus":"ACT,VEEAT","enabled":true,"tenant":"companies":[{"id":1,1],"name":""offices","APPRO":,[1],"systemRoles":[1,2,3,4,5},,7,8,"company":9,{10,11,"id":12]1,,"id":},,"createdAt":1version36711rmission":,1,"modifiedAt"},1492618536711,{"date":"entityStatus":1490985000000"ACTIVEt","vendor":{"name":"Gowthaman Basuvaraj","tenant":{"id":1,"id":1},"company":{"entityStatus":"ACTIVE","id":1},"version":1}}]"docType":"PO","sentVia":"PHONE","documentNo":"PO-003","quotations":[3],"indents":[1,2],"office":{"name":"HO","id":1,"entityStatus":"ACTIVE"},"lineItems":[{"id":7,"slNo":1,"inventory":{"id":1,"entityStatus":"ACTIVE"},"qty":12.0,"taxGroup":{"id":1,"entityStatus":"ACTIVE"},"basicPrice":100.0}],"id":7,"createdAt":1492619922227,"modifiedAt":1492619922227,"createdBy":{"name":"Gowthaman Basuvaraj","id":1,"entityStatus":"ACTIVE"},"entityStatus":"ACTIVE","tenant":{"id":1,"name":"365Build"},"company":{"id":1},"version":1},{"date":1490985000000,"vendor":{"name":"Gowthaman Basuvaraj","id":1,"entityStatus":"ACTIVE"},"docType":"PO","sentVia":"PHONE","documentNo":"PO-004","quotations":[3],"indents":[1,2],"office":{"name":"HO","id":1,"entityStatus":"ACTIVE"},"lineItems":[{"id":9,"slNo":1,"inventory":{"id":1,"entityStatus":"ACTIVE"},"qty":1.0,"taxGroup":{"id":1,"entityStatus":"ACTIVE"},"basicPrice":300.0}],"id":9,"createdAt":1492620625319,"modifiedAt":1492620625319,"createdBy":{"name":"Gowthaman Basuvaraj","id":1,"entityStatus":"ACTIVE"},"entityStatus":"ACTIVE","tenant":{"id":1,"name":"365Build"},"company":{"id":1},"version":1},{"date":1490985000000,"vendor":{"name":"Gowthaman Basuvaraj","id":1,"entityStatus":"ACTIVE"},"docType":"QUOTATION","sentVia":"PHONE","documentNo":"Q-001","vendorReference":"VQ-001","office":{"name":"HO","id":1,"entityStatus":"ACTIVE"},"lineItems":[{"id":3,"slNo":1,"inventory":{"id":1,"entityStatus":"ACTIVE"},"qty":10.0,"taxGroup":{"id":1,"entityStatus":"ACTIVE"},"basicPrice":300.0}],"id":3,"createdAt":1492618719442,"modifiedAt":1492618719442,"createdBy":{"name":"Gowthaman Basuvaraj","id":1,"entityStatus":"ACTIVE"},"entityStatus":"ACTIVE","tenant":{"id":1,"name":"365Build"},"company":{"id":1},"version":1},{"date":1490985000000,"vendor":{"name":"Gowthaman Basuvaraj","id":1,"entityStatus":"ACTIVE"},"docType":"PO","sentVia":"PHONE","documentNo":"PO-002","quotations":[3],"indents":[1,2],"office":{"name":"HO","id":1,"entityStatus":"ACTIVE"},"lineItems":[{"id":6,"slNo":1,"inventory":{"id":1,"entityStatus":"ACTIVE"},"qty":10.0,"taxGroup":{"id":1,"entityStatus":"ACTIVE"},"basicPrice":300.0}],"id":6,"createdAt":1492619069630,"modifiedAt":1492619069630,"createdBy":{"name":"Gowthaman Basuvaraj","id":1,"entityStatus":"ACTIVE"},"entityStatus":"ACTIVE","tenant":{"id":1,"name":"365Build"},"company":{"id":1},"version":1},{"date":1490985000000,"vendor":{"name":"Gowthaman Basuvaraj","id":1,"entityStatus":"ACTIVE"},"docType":"PO","sentVia":"PHONE","documentNo":"PO-004","quotations":[3],"indents":[1,2],"office":{"name":"HO","id":1,"entityStatus":"ACTIVE"},"lineItems":[{"id":8,"slNo":1,"inventory":{"id":1,"entityStatus":"ACTIVE"},"qty":1.0,"taxGroup":{"id":1,"entityStatus":"ACTIVE"},"basicPrice":300.0}],"id":8,"createdAt":1492620242016,"modifiedAt":1492620242016,"createdBy":{"name":"Gowthaman Basuvaraj","id":1,"entityStatus":"ACTIVE"},"entityStatus":"ACTIVE","tenant":{"id":1,"name":"365Build"},"company":{"id":1},"version":1},{"date":1490985000000,"vendor":{"name":"Gowthaman Basuvaraj","id":1,"entityStatus":"ACTIVE"},"docType":"PO","sentVia":"PHONE","documentNo":"PO-002","quotations":[3],"indents":[1,2],"office":{"name":"HO","id":1,"entityStatus":"ACTIVE"},"lineItems":[{"id":5,"slNo":1,"inventory":{"id":1,"entityStatus":"ACTIVE"},"qty":10.0,"taxGroup":{"id":1,"entityStatus":"ACTIVE"},"basicPrice":300.0}],"id":5,"createdAt":1492618954551,"modifiedAt":1492618954551,"createdBy":{"name":"Gowthaman Basuvaraj","id":1,"entityStatus":"ACTIVE"},"entityStatus":"ACTIVE","tenant":{"id":1,"name":"365Build"},"company":{"id":1},"version":1},{"date":1490985000000,"vendor":{"name":"Gowthaman Basuvaraj","id":1,"entityStatus":"ACTIVE"},"docType":"PO","sentVia":"ORAL","documentNo":"PO-005","quotations":[3],"indents":[1,2],"office":{"name":"HO","id":1,"entityStatus":"ACTIVE"},"lineItems":[{"id":10,"slNo":1,"inventory":{"id":1,"entityStatus":"ACTIVE"},"qty":5.0,"taxGroup":{"id":1,"entityStatus":"ACTIVE"},"basicPrice":500.0}],"id":10,"createdAt":1492620938241,"modifiedAt":1492620938241,"createdBy":{"name":"Gowthaman Basuvaraj","id":1,"entityStatus":"ACTIVE"},"entityStatus":"ACTIVE","tenant":{"id":1,"name":"365Build"},"company":{"id":1},"version":1},{"date":1490985000000,"docType":"INDENT","sentVia":"PHONE","documentNo":"I-002","utilized":true,"office":{"name":"HO","id":1,"entityStatus":"ACTIVE"},"lineItems":[{"id":2,"slNo":1,"inventory":{"id":1,"entityStatus":"ACTIVE"},"qty":5.0}],"id":2,"createdAt":1492618682333,"modifiedAt":1492620938270,"createdBy":{"name":"Gowthaman Basuvaraj","id":1,"entityStatus":"ACTIVE"},"entityStatus":"ACTIVE","tenant":{"id":1,"name":"365Build"},"company":{"id":1},"version":3},{"date":1490985000000,"docType":"INDENT","sentVia":"PHONE","documentNo":"I-001","utilized":true,"office":{"name":"HO","id":1,"entityStatus":"ACTIVE"},"lineItems":[{"id":1,"slNo":1,"inventory":{"id":1,"entityStatus":"ACTIVE"},"qty":1.0}],"id":1,"createdAt":1492618654267,"modifiedAt":1492620938265,"createdBy":{"name":"Gowthaman Basuvaraj","id":1,"entityStatus":"ACTIVE"},"entityStatus":"ACTIVE","tenant":{"id":1,"name":"365Build"},"company":{"id":1},"version":3}]

    confirmed bug 
    opened by gowthaman-basuvaraj 7
  • Need Reference to Controller/Method in Filters

    Need Reference to Controller/Method in Filters

    I have an annotation

    @Retention(RetentionPolicy.RUNTIME)
    @Target({ElementType.METHOD})
    public @interface AllowIf {
        Permission[] value();
    }
    

    and i want to Annotate the method with it, citing allowed permissions

        @AllowIf(Permission.UPD_PORT_PROPERTIES)
        public Response cfgState(ConfigState configSave) throws IOException {
          
    
            return Response.withOK().andJsonBody(configSave)
        }
    

    I am looking for the ability to check the annotated permissions and if the user does not have any of the assigned permission then a Forbidden response can be sent

    At present, I think there is no way to get the Controller Class/Method, I could try doing an Url match with the list of routes but that'll be error prone.

    Is it possible or am I missing something?

    if not, then adding the controllerClass and controllerMethodName from Attachment to the Request object will be suffice

    opened by gowthaman-basuvaraj 7
  • Add ability to add connector ports via JVM

    Add ability to add connector ports via JVM

    I tried to deploy the simplest application, generated from Maven archetype, to Heroku. Heroku demands to set a listening port from the command line. You need to write something, like: java -jar app.jar -Dserver.port=$PORT, where $PORT is substituted with Heroku`s port value.

    According with paragraph:

    If mangoo I/O can find a environment specific value (e.g. dev.application.port), the value will overwrite the default value (e.g. default.application.port).

    I have tried to overwrite a HTTP port, but it didn`t work (see the output line: HTTP connector listening ...:*** 8080 ***).

    ilya$ java -jar target/mangooioapp.jar -Dprod.connector.http.port=8181
    
    14.03.2017 18:23:09,911 [main] INFO  org.ehcache.core.EhcacheManager - Cache 'mangooio-application' created in EhcacheManager.
    14.03.2017 18:23:09,917 [main] INFO  org.ehcache.core.EhcacheManager - Cache 'mangooio-auth' created in EhcacheManager.
    14.03.2017 18:23:09,921 [main] INFO  org.ehcache.core.EhcacheManager - Cache 'mangooio-request' created in EhcacheManager.
    14.03.2017 18:23:09,924 [main] INFO  org.ehcache.core.EhcacheManager - Cache 'mangooio-sse' created in EhcacheManager.
    14.03.2017 18:23:09,927 [main] INFO  org.ehcache.core.EhcacheManager - Cache 'mangooio-wss' created in EhcacheManager.
    14.03.2017 18:23:09,983 [main] INFO  io.mangoo.providers.TemplateEngineProvider - Using class io.mangoo.templating.freemarker.TemplateEngineFreemarker as implementation for Template Engine
    14.03.2017 18:23:10,241 [main] INFO  org.xnio - XNIO version 3.3.6.Final
    14.03.2017 18:23:10,250 [main] INFO  org.xnio.nio - XNIO NIO Implementation Version 3.3.6.Final
    14.03.2017 18:23:10,313 [main] INFO  io.mangoo.core.Bootstrap - 
                                                    ___     __  ___  
     _ __ ___    __ _  _ __    __ _   ___    ___   |_ _|   / / / _ \ 
    | '_ ` _ \  / _` || '_ \  / _` | / _ \  / _ \   | |   / / | | | |
    | | | | | || (_| || | | || (_| || (_) || (_) |  | |  / /  | |_| |
    |_| |_| |_| \__,_||_| |_| \__, | \___/  \___/  |___|/_/    \___/ 
                              |___/                                  
    
    
    https://mangoo.io | @mangoo_io | 4.2.0
    
    14.03.2017 18:23:10,314 [main] INFO  io.mangoo.core.Bootstrap - HTTP connector listening @localhost:8080
    14.03.2017 18:23:10,316 [main] INFO  io.mangoo.core.Bootstrap - mangoo I/O application started in 1141 ms in prod mode. Enjoy.
    
    enhancement 
    opened by ismagilov 7
Owner
Sven Kubiak
Sven Kubiak
Firefly is an asynchronous web framework for rapid development of high-performance web application.

What is Firefly? Firefly framework is an asynchronous Java web framework. It helps you create a web application Easy and Quickly. It provides asynchro

Alvin Qiu 289 Dec 18, 2022
An evolving set of open source web components for building mobile and desktop web applications in modern browsers.

Vaadin components Vaadin components is an evolving set of high-quality user interface web components commonly needed in modern mobile and desktop busi

Vaadin 519 Dec 31, 2022
Vaadin 6, 7, 8 is a Java framework for modern Java web applications.

Vaadin Framework Vaadin allows you to build modern web apps efficiently in plain Java, without touching low level web technologies. This repository co

Vaadin 1.7k Jan 5, 2023
CUBA Platform is a high level framework for enterprise applications development

Java RAD framework for enterprise web applications Website | Online Demo | Documentation | Guides | Forum CUBA Platform is a high level framework for

CUBA Platform 1.3k Jan 1, 2023
The modular web framework for Java and Kotlin

∞ do more, more easily Jooby is a modern, performant and easy to use web framework for Java and Kotlin built on top of your favorite web server. Java:

jooby 1.5k Dec 16, 2022
Apache Wicket - Component-based Java web framework

What is Apache Wicket? Apache Wicket is an open source, java, component based, web application framework. With proper mark-up/logic separation, a POJO

The Apache Software Foundation 657 Dec 31, 2022
Micro Java Web Framework

Micro Java Web Framework It's an open source (Apache License) micro web framework in Java, with minimal dependencies and a quick learning curve. The g

Pippo 769 Dec 19, 2022
True Object-Oriented Java Web Framework

Project architect: @paulodamaso Takes is a true object-oriented and immutable Java8 web development framework. Its key benefits, comparing to all othe

Yegor Bugayenko 748 Dec 23, 2022
ZK is a highly productive Java framework for building amazing enterprise web and mobile applications

ZK ZK is a highly productive Java framework for building amazing enterprise web and mobile applications. Resources Documentation Tutorial ZK Essential

ZK 375 Dec 23, 2022
A simple expressive web framework for java. Spark has a kotlin DSL https://github.com/perwendel/spark-kotlin

Spark - a tiny web framework for Java 8 Spark 2.9.3 is out!! Changeset <dependency> <groupId>com.sparkjava</groupId> <artifactId>spark-core</a

Per Wendel 9.4k Dec 29, 2022
A web MVC action-based framework, on top of CDI, for fast and maintainable Java development.

A web MVC action-based framework, on top of CDI, for fast and maintainable Java development. Downloading For a quick start, you can use this snippet i

Caelum 347 Nov 15, 2022
A server-state reactive Java web framework for building real-time user interfaces and UI components.

RSP About Maven Code examples HTTP requests routing HTML markup Java DSL Page state model Single-page application Navigation bar URL path UI Component

Vadim Vashkevich 33 Jul 13, 2022
Javalin - A simple web framework for Java and Kotlin

Javalin is a very lightweight web framework for Kotlin and Java which supports WebSockets, HTTP2 and async requests. Javalin’s main goals are simplicity, a great developer experience, and first class interoperability between Kotlin and Java.

David (javalin.io) 6.2k Jan 6, 2023
The Grails Web Application Framework

Build Status Slack Signup Slack Signup Grails Grails is a framework used to build web applications with the Groovy programming language. The core fram

grails 2.7k Jan 5, 2023
jetbrick web mvc framework

jetbrick-webmvc Web MVC framework for jetbrick. Documentation http://subchen.github.io/jetbrick-webmvc/ Dependency <dependency> <groupId>com.githu

Guoqiang Chen 25 Nov 15, 2022
🚀 The best rbac web framework. base on Spring Boot 2.4、 Spring Cloud 2020、 OAuth2 . Thx Give a star

?? The best rbac web framework. base on Spring Boot 2.4、 Spring Cloud 2020、 OAuth2 . Thx Give a star

pig-mesh 4.3k Jan 8, 2023
Java Web Toolkit

What is JWt ? JWt is a Java library for developing web applications. It provides a pure Java component-driven approach to building web applications, a

null 48 Jul 16, 2022
RESTEasy is a JBoss project that provides various frameworks to help you build RESTful Web Services and RESTful Java applications

RESTEasy RESTEasy is a JBoss.org project aimed at providing productivity frameworks for developing client and server RESTful applications and services

RESTEasy 1k Dec 23, 2022