What about Spring Framework?

2019-04-10 10:00 AM (3 months ago)

Spring Framework / Spring Boot is by far the most popular Java framework. If you are looking for a framework with a very large community and for which paid support is available, look no further, you will not find anything better! We used Spring a lot before starting Spincast.

The problem we had with Spring, is that we found ourself asking those questions too often:

  • "How can I modify that default behavior?"
  • "How do I configure this component?"
  • "How can this work since I didn't even configure it?"
  • "What does this annotation actually do? Can I tweak its behavior?"

Our experience with Spring Framework is that it tends to be a little bit too magical, it tends to hide implementation details too much so your application is harder to configure and tweak. In the name of "Defaults that are good enough 80% of the time", Spring sometimes seems to favor simplicity over providing full control.

Any real-world application will be part of that 20% requiring a lot of manual tweaking, so why not base it on a framework that favors flexibility and control from the ground up?

Yes, it is very easy to start a new Spring Boot application using their pretty Initializr! But as long as you have developed at least one real application in your life, you know that this kind of simple bootstrapping is smoke and mirrors: you will have to modify/change/replace components at some points or another. You will have to manually control what is actually happening behind the scene.

Also, Spring relies a lot on annotations: that contributes to the "easy to use" aura. But, as we explain here, we are not big fans of annotations.

In the other hand, the very first goal of Spincast is to make modifying anything a borderline trivial task. If you find something that is not easily modifiable and should be, it will be considered as a bug and will be fixed.

Here is how you tweak almost anything in a Spincast application:

  1. You identify the class containing the code you want to tweak and the interfaces this class is bound to in the Guice context.
  2. You extend this class to override/tweak/add anything you need. There are no private methods so sky is the limit here.
  3. In your application's Guice module, you bind your custom implementation.
  4. Done. No magic. No components hard to extend.

Even Spincast's core components can be modified using those simple steps.

In other words, we would say that the main difference between Spring and Spincast is that Spincast favors long term flexibility and control from the ground up, while Spring seems more preoccupied with providing something that is easy to start with.


(this news is taken from the About section of the site)

Spincast Process Utils plugin + other utilities

2019-04-09 10:00 AM (3 months ago)

The new Spincast Process Utils plugin provides utilities to manipulate processes and external programs.

The main features are:

  • "Running a goal on an external Maven project" - Allows you to programmatically compile/package/install an external Maven project. The Maven project can be on your classpath: it will first be extracted to the file system before the goal is executed.
  • "Executing an external program" - Allows you to easily execute an external program and keep control over the created process.

By combining those utilities, it is now possible to test code inside a .jar file! Indeed, running tests from an IDE (or using the command line) doesn't always represent the production environment, where everything is bundled in an executable .jar file.

Finally, two new utility methods are provided by the SpincastUtils component:

Spincast Swagger UI plugin

2019-04-09 10:00 AM (3 months ago)

Now that Spincast has support for OpenAPI documentation, it makes sense to provide plugins for related tools!

This new plugin, Spincast Swagger UI plugin, integrates Swagger UI with Spincast so you can display your REST API specifications in a friendly HTML interface.

Spincast Gson plugin

2019-04-04 5:00 PM (4 months ago)

If, for some reasons, your prefer to use Gson rather than Jackson as a way of converting Java Objects into JSON and back, this new plugin is for you.

The Spincast Gson plugin is a complete replacement for the default Spincast Jackson Json plugin that is provided in the default Spincast artifact.

Some custom serializers and deserializers are provided. Also, the GsonBuilder is easy to access so you can add your own configurations to help build the final Gson instance.

OpenAPI support

2019-03-30 8:00 PM (4 months ago)

We are happy to announce that Spincast now has a plugin to generate OpenAPI / Swagger specifications! This allows you to document a REST API developed using Spincast easily.

The plugin, Spincast OpenAPI Bottom Up, uses a bottom-up approach (also called "code first" approach) as it starts from the code of your application to generate the associated OpenAPI specifications as JSON or as YAML.

This plugin reuses a lot of code from the battle-tested and well-maintained official Swagger Core reference implementation. Doing so, the plugin should respect the OpenAPI specifications very well and should also be future-proof.