How to build REST API fast with almost no knowledge of vert.x and without plumbing code
For a year and a half I have been working mainly developing REST APIs with different functionalities using Vert.x with Java. As you can imagine, every time I started a new project I did not re-code everything from scratch, but instead took advantage of previous projects and the know-how obtained and began to copy-paste a lot of code to be able to focus on the business logic. This process, although faster than reinventing the wheel, was slow and somewhat complicated. For this reason I decided to develop a project that I could clone every time I had to develop another REST API. The result was ssv-api (Starter Single Verticle API)
ssv-api is a REST API project template based in vert.x
framework ready to deploy with lots of plumbing code, examples, use cases and
documentation to quickly develope an API with almost no knowledge of vert.x and
without any waste of time. During its development I realized that it could
serve many people who are in my situation and others such as:
- Developers who want to quickly and efficiently develop an
API without microservices architecture (for now) concentrating only on the
business.
- Developers and students who want to learn to work with the
vert.x framework.
- Developers who need to develop an API with vert.x and have little or no knowledge of vert.x.
Why Vert.x?
Vert.x is based on the Netty project, a high-performance asynchronous networking library for the JVM. Vert.x is useful for a large range of applications: high volume message / event processing, micro-services, API gateways, HTTP APIs for mobile applications, etc. Vert.x and its ecosystem provide all sorts of technical tools for building end-to-end reactive applications.
Functionalities:
If you use ssv-api as the basis for your next REST API, you
will get the following functionalities implemented and documented (others, such
as database access, are under development):
- HTTP BASIC AUTHENTICATION
- Access to configuration file
- Enabling and disabling endpoints
- Endpoints with GET, POST, PUT y DELETE
- Cross-Origin Resource Sharing (CORS) support
- Execution of blocking code and non-blocking code
- Asynchronous HTTP responses
- System logs
- Builtin SwaggerUI documentation
- Administration endpoints
- Handling HTTP query parameters
- Handling of POST body parameters
- Handling of Multipart files
- Scheduling periodic tasks
- Unit tests for each endpoint
- Postman Collection for testing purposes
- Fatjar generation
- Simple jar generation
- Execution of ant tasks to generate a directory with
everything necessary for the deployment
If you decide to try ssv-api you will find all the necessary
information at https://github.com/jgarciasm/ssv-api
Leave a comment with any question you may have, I will make sure to get it answered.
Comments
Post a Comment