Skip to content

jdami/vertx-zero

 
 

Repository files navigation

Vertx Zero Up Framework

Maven Central Apache License 2 Build Status Gitter Maintainability
Waffle.io - Columns and their card count

This project is based on Vert.x, the idea came from Spring-Boot framework. It could help developers focus on business requirements instead of more details of Vert.x. The project contains two parts "Up" and "Zero". "Up" means running up, "Zero" means no configuration provided, you could run your project with default configuration only.

Micro Service architecture is a future focused method to design and build mature system and help more companies to implement project faster, based on this idea, Vertx Zero Up Framework came out. It's micro-service oriented framework and will be verified by real projects. Also it provide a tool set to help developers to do correct things. The last point is that because of Event Driven Model, it's high performance framework.

This framework contains four sub-projects, all these projects are put in vertx-gaia project

  • vertx-gaia/vertx-co: Core Library of Zero Up Framework
  • vertx-gaia/vertx-tp: Third part integration components in Zero Up Framework
  • vertx-gaia/vertx-up: Zero Up Engine with nested vert.x web container
  • vertx-gaia/vertx-rx: Zero Up Engine with nested rxjava web container instead of web container
  • vertx-import: Zero Usage dependency project to perform development, provide uniform dependency for your projects.
  • vertx-zeus/*: Zero Examples, it contains all the tutorials of this framework

1. Envrionment

If you want to use Zero framework, you can add following dependency into you pom.xml to use Zero:

Before 0.4.5.1 ( Direct )

    <dependency>
        <groupId>cn.vertxup</groupId>
        <artifactId>vertx-up</artifactId>
        <version>0.4.5</version>
    </dependency>

From 0.4.5.1 ( Inherit )

    <parent>
        <artifactId>vertx-import</artifactId>
        <groupId>cn.vertxup</groupId>
        <version>0.4.5.1</version>
    </parent>

2. Boot Up

In your project, you can provide main entry only as following to run Zero ( Annotated with @Up ) .

import io.vertx.up.VertxApplication;
import io.vertx.up.annotations.Up;

@Up
public class Driver {

    public static void main(final String[] args) {
        VertxApplication.run(Driver.class);
    }
}

Once the Zero is up, you can see following logs in your console ( The default port is 6083 ):

[ ZERO ] ZeroHttpAgent Http Server has been started successfully. \
    Endpoint: http://0.0.0.0:6083/

3. Documentation

For all tutorial testing cases, you can import following resource with Postman Tool

https://www.getpostman.com/collections/d64b2efe4d47599efe6e

  1. Standalone Mode
    1. D10001 - Getting Start
    2. D10002 - Origin Story, Hi Zero
    3. D10003 - JSR311, @Path...EndPoint
    4. D10004 - JSR311, @GET,@POST...Http Method
    5. D10005 - JSR311, @QueryParam...Parameters
    6. D10006 - JSR311, @PathParam...Parameters
    7. D10007 - JSR311, @FormParam...Parameters
    8. D10008 - JSR311, @HeaderParam...Parameters
    9. D10009 - JSR311, @CookieParam...Parameters
    10. D10010 - Zero JSR311, @BodyParam...Parameters
    11. D10011 - Zero JSR311, @BodyParam...Pojo
    12. D10012 - Zero JSR311, @StreamParam...Parameters
    13. D10013 - Zero JSR311, @StreamParam...File/FileUpload
    14. D10014 - Zero JSR311, @SessionParam...Parameters
    15. D10015 - By Typed Parameters
    16. D10016 - JSR311, @Consumes...Media Type
    17. D10017 - JSR311, @Produces...Media Type
    18. D10018 - Non-Blocking, Enable EventBus
    19. D10019 - Non-Blocking, Mode 1 Sync Mode
    20. D10020 - Non-Blocking, Mode 2 Ping Mode
    21. D10021 - Non-Blocking, Mode 3 One Way Mode
    22. D10022 - Non-Blocking, Mode 4 Async Mode ( Java Style )
    23. D10023 - Non-Blocking, Mode 4 Experimental extension
    24. D10024 - Non-Blocking, Mode 5 Async Mode ( vert.x style )
    25. D10025 - ( Recommend ) Non-Blocking, Mode 5 Experimental extension
    26. D10026 - JSR330, @Inject Simple Java Object
    27. D10027 - JSR330, @Inject One Implementation
    28. D10028 - Zero JSR330, @Inject Multi Implementation
    29. D10029 - JSR303, @NotNull
    30. D10030 - JSR303, @NotNull message
    31. D10031 - JSR303, @NotNull message template
    32. D10032 - JSR303, @DefaultValue for parameters
    33. D10033 - JSR303, @Null for value
    34. D10034 - JSR303, @AssertTrue/@AssertFalse for boolean
    35. D10035 - JSR303, @Min/@Max for numeric
    36. D10036 - JSR303, @DecimalMin/@DecimalMax for decimal
    37. D10037 - JSR303, @Size usage
    38. D10038 - JSR303, @Digits for decimal
    39. D10039 - JSR303, @Future, @Past for date
    40. D10040 - JSR303, @Pattern for regular expression
    41. D10041 - JSR303, 2.x version
    42. D10042 - JSR303, Pojo First
    43. D10043 - Zero JSR303, Body Validation
    44. D10044 - Programming Styles
    45. D10045 - Interface Style
    46. D10046 - Utility X Turn-On
    47. D10047 - Utility X, JsonObject Processing
    48. D10048 - Utility X, Pager Processing
    49. D10049 - Utility X, Sorter Processing
    50. D10050 - Utility X, Errors
    51. D10051 - Utility X, JsonArray/Unique Extract
    52. D10052 - Utility X, User Data
    53. D10053 - Utility X, Normalized Response
    54. D10054 - Utility X Input, Agent Mode
    55. D10055 - Utility X Input, Interface Style
    56. D10056 - Utility X Basic Future
    57. D10057 - Utility X, thenParallel
    58. D10058 - Utility X, thenParallelArray/Json
    59. D10059 - Utility X, thenScatterJson
    60. D10060 - Utility X, thenError
    61. D10061 - Jooq/mysql, Configuration
    62. D10062 - Jooq/CRUD, Read Operation
    63. D10063 - Jooq/CRUD, Write Operation
    64. D10064 - Jooq/CRUD, Fetch One Operation
    65. D10065 - Jooq/CRUD, Fetch List Operation
    66. D10066 - Jooq/CRUD, Filter Syntax
    67. D10067 - Jooq/CRUD, Paging/Sorting
  2. Micro Mode
  3. Error Code List

4. Logging in Zero

You also could use following function in your coding to get Logger component.

// Zero Logger initialized, connect to vert.x logging system directly but uniform managed by zero.
import io.vertx.up.log.Annal;

// Then in your class
public final class Statute {

    private static final Annal LOGGER = Annal.get(Statute.class);
    ......
}

About

Zero Configuration for vert.x

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 96.8%
  • PLpgSQL 2.6%
  • Shell 0.6%