-
Notifications
You must be signed in to change notification settings - Fork 0
Frameworks
NB: Page still in progress.
This is intended to provide a quick 'what you need to know' orientation so new developers can use these frameworks appropriately in Clotho.
Guice is a dependency injection API from Google. "Dependency injection" is a design pattern that separates behavior from dependency resolution. It makes code more modular, easier to write, and easier to test. For a brief introduction, see the Guice Motivation page, which is the first page of the Guice user's guide.
Shiro is the Apache Foundation's Java security framework. Clotho uses Shiro for authentication and authorization.
Lombok is a set of Java annotations that allow you to write more compact Java code by hiding away boilerplate. For example, if you apply the @Getter
annotation to the variable int foo
, then the annotation preprocessor emits the function int getFoo() {return foo;}
. See the features page for a relatively short, digestible list of the Lombok's annotations. One annotation Clotho uses frequently that's not on the features page is @Slf4j
, which creates an slf4j.Logger
instance named log
.
Jackson is a Java JSON library. It allows binding POJOs ("Plain Old Java Objects") to JSON. So if I have a class Name
with fields firstName
and lastName
, then Jackson will emit a JSON object with the same fields. Then we can stuff it right in a Mongo database, or send it to a Javascript front-end using a websocket.